Tuesday, July 29, 2008

Comment on Comments

Being a developer, I always add one or two lines of comments to my code. Here is a nice point by Steve, why the junior comments more and the senior comments less,

In the old days, seeing too much code at once quite frankly exceeded my complexity threshold, and when I had to work with it I'd typically try to rewrite it or at least comment it heavily. Today, however, I just slog through it without complaining (much). When I have a specific goal in mind and a complicated piece of code to write, I spend my time making it happen rather than telling myself stories about it [in comments].

It is always better to add few meaningful comments to your code.