"Lucky me," Ryan wrote, "I got assigned to work on Legacy, an application whose name accurately describes itself. I'm pretty sure that this system manages to have a WTF/line ratio greater than 1.0, especially if we include the 'minor' ones, like the System.Environment.Exit calls peppered throughout library code that causes the app to inexplicably exit."

"But beyond minor annoyances like that, or the random number generator class that seems to exist solely to duplicate the behavior System.Random, I discovered this gem inside a class method."

// Sanity check
const int expected_length = 199 + 6;

Ryan adds, "I don't even want to know why a constant is declared inside a class... or what makes 199 + 6 better than 205. My head hurts."

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!