Monday, September 14, 2009

Comments - a good habit

I've just had to re-visit an area of my application which has been static for quite some time and I was glad that I have this great habit of using comments to usefully describe code.

For a long time I've been an advocate, not only in my own code but when mentoring staff in client sites, of commenting code to describe what is actually going on.

It was so easy to go back into the code and read the comments.  I then knew exactly what was going on and why.

I've never really understood the developer who rarely comments code or, when they do, don't reflect the actual logic of the code in the comments.

On client developments useful commenting is a must - after all you have no idea who will be picking up the code for that first amendment.

No comments: