Code or Comments : People and thoughts

 

thecodeandthecomments

Ah! you forgot to write comment here at line no 233. Correct that and check it in …

“Nothing can be quite so useful as well placed comments ” ..

hmm… comments !!!

Really ?

I have been writing code since last 3 years..but every-time my manager asks me to write comments, I hate him ..

Comments are not “Pure Good”. Indeed comments are a necessary evil …

If we have talent to subtly wield languages to express out intent, we would not need comments very much …

Comments in the code are lies …

Comments in the code are to compensate our failures to express ourselves in the code.. Yes, I actually mean failures..Comments are always failures.

Every-time you write a comment, you should feel failure of  your ability to express…

Why am I so down on comments? Because they lie !!!

Not always, and not intentionally…but too often. The older a comment is, and the farther away it is from the code it describes, the more likely it is to be just plain wrong. The reason is simple. Programmers can’t realistically maintain them.

And the reason ? The reason is this habit of programmers..Code changes, code evolves, it moves from here to there…comments ?

Comments can’t follow , comments remain there, And all too often the comments get separated from the code they describe and become orphaned blurbs of ever decreasing accuracy.

It is possible to make the point that programmers should be disciplined enough to
keep the comments in a high state of repair, relevance, and accuracy. I agree, they should.
But I would rather that energy go toward making the code so clear and expressive that it
does not need the comments in the first place…

I hate comments in the code…

Because it is well said my someone ..

“Code never lies, comments sometimes do…”

Truth can only be found in one place :

CODE

 

 

 

4 thoughts on “Code or Comments : People and thoughts

  1. Clients appreciate documentation effort because they love people with proper documentation. It happens in IT Industry non-technical person become manager. But the person with good development experience would love to opt for role like ARCHITECT since they don’t to loss their coding touch/experience. For coders comments might be of little help but it is standard practice in IT industry to document the code while check-in.

    Like

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.