Article 5M4JG CodeSOD: Time Sensitive Comments

CodeSOD: Time Sensitive Comments

by
Remy Porter
from The Daily WTF on (#5M4JG)

One of the arguments against comments in code is that they create a need to have two things updated: the code and the documentation have to be kept in sync. Inevitably, they'll drift apart.

David works with a junior developer who came onto the team with strong opinions about, well, everything. One of those strong opinions is that every single line needs to have comments. Each and every one.

This is the end result:

// update timeout status to 24rscontact.ActivationValidUntil = providers.SystemDate.SystemDateTime.AddDays(30);

So, just a slight drift between the code and the comment. What's 29 days of drift between friends?

buildmaster-icon.png [Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today! TheDailyWtf?d=yIl2AUoC8zAENnZ52W5smo
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments