Wednesday, June 6, 2007

Six ways to write more comprehensible code

As a developer, time is your most valuable resource. These six tips on how to write maintainable code are guaranteed to save you time and frustration: one minute spent writing comments can save you an hour of anguish.

Tip 1: Comment like a smart person.
Tip 2: Use #define a lot. No, a LOT.
Tip 3: Don't use variable names that will mock you.
Tip 4: Do error checking. You make errors. Yes, you.
Tip 5: "Premature optimization is the root of all evil."
Tip 6: Don't be too clever by half.

read more

0 comments: