Commenting on Comments

I brought up the program I made the other day to show my supervisor what I had been doing and as it was loading I mentioned to him that I had done of good job of commenting this source and that it was going to be a stunning example of well commented code.

When it loaded we both looked at it, then looked at each other, him with a ‘what are you talking about?’ look on his face, and me probably looking guilty as a comment-less screen stared at us.

“Wait wait, I’ll scroll up. See? There they are!”

He said that was a very nice effort, but five comment lines in one hundred lines of code do not equal well commented code.

It felt like a lot when I was writing it!

Though no one here really comments their code very much, I suppose when there are only three programmers it isn’t that hard to have everyone understanding what is going on, and if not you can just ask the person who wrote it. Most things seem so straightforward when I code them that putting in comments seems pointless. The ones I had put into this particular program were mostly there for my own benefit, so I could see what steps had been programmed in and what was still needed.

I wonder if properly commenting your code if a necessary practice in big companies?

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s