Good Programming Practices

[Note: I did a Google search on 7/20/05 and found no references at all to "comment-driven programming" or "comment-driven coding." So maybe I'm the first to use the term. It just seems like a good way to describe what I'm talking about here.]

So here it is, my opinion on what constitutes good programming practices. This is my philsophy as formed over 20 years or so of programming. It's only my two cents, and of course there are those (many, I'm sure) who disagree. But I'm putting my opinion out there in case others find it helpful. There are also those out there who agree with me as well, of course.

One thing you'll often hear is, "That's just STYLE. It's just a matter of STYLE." In my opinion we really need to make a distinction between style and programming practices.

1. Style is where you put your curly braces, and if you put spaces after parens ( like this ) or no spaces (like this).

2. Style is not about using the correct flow control or doing an ''if'' when you really should have been doing an ''else if''.

There's a big difference between style and practice. We can debate a lot about spacing, indentation, and the like. But the truly cogent arguments tend to revolve around issues that I'd rather refer to as programming *practices*, even while one could also argue for one *style* over another.

Many of my ideas will not be original, but rather the inspiration of others or culmination of community best practices. Some of my ideas will be original. But the point here is to try to put these together into one whole. If nothing else, at least I hope to make you think about the issues and then make up your own mind after having heard another point of view.

Please click Next to continue.