Tips for New Programmers
A few minor things they might not cover in whatever book or class you're using (and way more important than ancient maxims like Keep It Simple Stupid)...
Writing Comments in your Code
Documenting intent in code comments is important. Some programmers believe that the source code is the documentation - they've never had to maintain someone else's code.
Documenting what each line of code does, however, isn't desirable, unless it's not obvious. So comments like "This implements a piecewise-linear approximation of a sin() function" - awesome.
Comments like "This adds 1 to the count" - terrible, unless it's some ungodly mess of functions to do that thing - in which case, there's probably something horribly wrong with the code, and the reason for that mess is worth documenting, not what it does.
Write Readable Code
Write readable code. Readable is more important than optimal - because code always has bugs. (And you in 6 months time will thank you).
(more...)