Chris M is part of team that’s responsible for maintaining a giant mess that was once a fairly simple C++ application. Like so many organically grown behemoths, this application has its share of bad and rotting code.

Today’s example, however, is neither bad nor rotting. It’s simply bizarre. Code that never should have been, and that no sane person ever could have written …

enum TypeDlYesNo
{
    Yes,
    Not
};

Chris adds: The most annoying thing about this enum isn’t that DlYesNo doesn’t actually have ‘No’ in it, but that when you are looking at variables of TypeDlYesNo in the debugger (or casting to int) you need to remember that Yes = 0.

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