Search This Blog

Sunday, January 24, 2010

Comments

I am reading Clean Code with a friend of mine. This is a great quote

The proper use of comments is to compensate for our failure to express ourself in code.


Imagine if you were reading a novel and the author scribbled in a handwritten note to explain a complicated paragraph. How silly would that be?

2 comments:

  1. lol, this reminds me of some code we saw the other day:

    var lastIndex = 12; // index of "overall" data

    Why not just name the variable overallDataIndex?

    ReplyDelete
  2. Good point. I agree. I am glad you are interested in this stuff so you can keep my honest.

    ReplyDelete