Never use a working template

A common feature of many IDE are templates, which greatly speed writing code. People often create their own “cut-and-paste” templates as well.

An important rule to remember here is that no template should ever “work” out of the box. This way, if (for whatever reason!) you don’t fill it in, you know it will fail fast. This helps avoid bugs that can be quite subtle: template code which fails slowly. 🙂
Continue reading “Never use a working template”

/** Still no comment */

Cedric takes exception to my earlier post another who didn’t get what I was saying. I think that says a lot for my ability to explain ideas, uh?

Continue reading “/** Still no comment */”

Commenting example

In response to Chris Justus again, here’s how I’d comment his example.

Continue reading “Commenting example”

/** no comment */

Chris Justus managed to totally miss my point. He assumes that I was advocating for crappy uncommented code. That is not the case.

Continue reading “/** no comment */”

How not to comment code

I’ve often encountered the attitude that code or scripts should be commented to the extent that someone unfamiliar with the language being used can understand what’s going on. I most recently encountered this with a set of Ant build scripts I had developed.

Doing this would be bad.

Continue reading “How not to comment code”