Blog
A little... extension for C++
2010-08-23 18:13:44Loops are used on a daily base by almost every programmer. Especially for-loops occur quite often.
Now, have you ever felt it's quite cumbersome to code something like the following:
for (int i=0; i<10; ++i){
do_something_here();
}
while you just wanted to write
10 times {
do_something_here();
}
and wanted C++ to understand it?
Don't worry, here's the solution. Just include this little header file and everything will work fine.
read onFibonacci numbers - the other way
2010-07-07 11:27:55Every programmer comes to the point where he or she must/should/wants to implement a programm for calculating fibonacci numbers. But I think my way is quite a new one.
read onMaking of a winamp plugin
2009-12-26 18:54:09This post shows the basics of writing a very simple plugin for my favourite music player.
read on(Some of) my projects
2009-12-23 21:50:49In this post I want to present (some of) my (small) projects.
read onDynamic programming - a gentle introduction
2009-10-04 22:38:47Dynamic programming is a quite well-known technique, but often not completely understood. This article provides a basic insight into dynamic programming. It shows some little examples and tries to explain the requirements so that dynamic programming is applicable.
read onRadix sort for float numbers
2009-08-18 14:31:59Radix sort is a linear sorting algorithm. However, it is commonly applied to integral values. This article shows, that - under certain circumstances - radix sort can be applied to floating point values as well.
read onFour easy to avoid programming mistakes
2009-08-13 16:41:56After my first post about mistakes relatively often made, but easy to avoid, i collected four more.
read onA nice method for...
2009-08-13 15:05:36Consider the following Code (in Python):
def dosomething(a, b):
result=0
while (a):
if (a&1):
result+=b
b=b<<1
a=a>>1
return result
read on
Logarithm of float numbers
2009-08-13 12:52:47Some time ago, a teacher asked me, how computers logarithmize float numbers.
Of couse, one could use the power series
 = sum_k=1infty (-1)k+1 cdot dfracxkk..png)
The following article gives a general insight how floats could be logarithmized faster. It shows an approximative algorithm that can be extended to get more accurate results.
read onQuine
2009-08-11 19:07:30A program, that prints out its own source code, is called a quine. In every turing-complete programming language it is possible to generate such a program. This fact was proven by Stephen Kleene in his so called recursion theorem.
Today i wrote my first quine (in C):
int main(int argc, char *argv[]){char* s=\"int main(int argc, char *argv[]){char* s=%c%s%c;printf(s,34,s,34);}\";printf(s,34,s,34);}
read on
