I also recommends some common software practices, such as putting the numerical constant first in the comparison statements like if, while, for and ?:
for example:
if (1000 < stack_size) {
...
}
while (10 != num) {
...
}
for (int i=0; 20 == value; ++i) {
...
}
Why does it emphasize this rule ? It will help you to avoid ambiguous assignments in the conditional statements.
A common mistake in for loop
=====================
for(int i=0;i < X; i++)
whenever we write "for" loop we are tend to use the post-fix operator ++ instead of pre-fix ++. First one need to understand what is the difference between i++ and ++i, and when to use what.
i++ is more complex and takes more clock cycles than ++i. So please make it a habit to use ++i instead of i++, this may make your code a little bit faster.