Article 6MN6Y Coded Smorgasbord: Minimal Commentary

Coded Smorgasbord: Minimal Commentary

by
Remy Porter
from The Daily WTF on (#6MN6Y)

Comments explain a lot about our code. And sometimes, the comments explain more than the code itself.

Alastair found this lovely comment, which demonstrates an excellent, if confusing, understanding of a boolean "or":

// Only add delivery option if it has no weight bands or at least one weight band.

The developer has left the company, so no one knows what the code should do if someone orders a negative number of weight bands.

Leith knows what they want to do in response to this comment:

# This function needs to be document or deleted

Deleted. The vote is deleted.

Samir inherited some code from someone who knows what they should do- but arguably isn't doing it.

/* all the code under here is bad, and I should feel bad*/

Finally, Brian riddles us this:

/// <summary>/// Requests the additional time./// </summary>/// <param name="?">The ?.</param>protected new void RequestAdditionalTime(int milliseconds)

The ? needs to be set correctly to get you additional time.

otter-icon.png [Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!
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