To Live By
If you need more than 3 levels of indentation, you're
screwed anyway, and should fix your program.
The following coding guidelines checklist is by no means exhaustive, but has proven to be useful for many programmers. It has been built up over more than 30 years of programming experience across a myriad of different systems and languages. While not impossible, it would be difficult for a piece of code to pass this checklist and yet still not be "good". Naturally, as with all things, sensible judgment should be used when applying this checklist, as not every point is valid for every possible situation.
NOTE: There is no attempt to explain the "whys" of each point here – for that, you should search the web for more detailed articles, of which there are many. This list is purely intended as a brief, concise checklist for professional programmers to run through very quickly, typically right before a piece of code is finally committed to a version-control system and declared finished.