maths_fan said:
What style do you prefer?
Where to place brackets?
I always place brackets one above the other, and always have a bracket as
the only entry on its line.
How to name variables, functions, constants, etc.
Generally I think one should use mathematical conventions - eg i for a loop
counter, x for a general real and y for a dependent one, N for a count etc.
An angle would be theta.
You do have problems with namespace collisions in C.
How do you format your source code?
Without tabs, 2 spaces of indents.
A function needs a comment to expalin what it does, what parameters it
takes, and what it returns. Usually heavy commenting of the function body
should be unnecessary because the function should be simple enough for
another programmer to see what is going on.