Article 6GJR7 CodeSOD: Lines of Code

CodeSOD: Lines of Code

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

Brittany is a game developer, and frequently ends up working on contracts for other companies. One company wanted her to add some features to their trading-card based game, and they offered her an option: she could either do a fixed-rate contract or a paid-per-line contract.

Brittany went with the fixed-rate.

When reviewing the code, she found that the previous developers went with the per-line contract:

public card getCard(int cardID){if (((1>0)&&(0<1))||(((21+3)==24)&&(3<=3))||(0 != 1)){//Paid by the line Biotches!!!//...}}

Useless white space? Check. Pointless conditions that will likely be optimized out by the compiler just for the extra lines? Check. Unashamed bragging in the comments? Check.

It's for the best that Brittany went with fixed rate- a per-line contract would have ended up with her paying them.

proget-icon.png [Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.
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