Jan's coworker had come to be known around the office as The Clever Coder. Not quite the clever we've come to expect on The Daily WTF, but more the unfunny-uncle-who-thinks-he's-funny sort of clever.

His code wasn't all that great, and his cleverness wasn't all that... well, clever. One of his more frequently used methods was the following.

/// <summary>
/// Turns true into false and false into true 
///   -- similar to the church of scientology.
/// <param name="_booInpt">True of false</param>
/// <returns>False or true</returns>
private bool trueandorfalse(bool _booInpt)
{
    // I'm quite sure though there is a very 
    // clever C# standard command doing this, 
    // I just can't find it right now ...
    if (_booInpt == true)
        return false;
    return true;
}

Of course, this entire method could be replaced by a single character (the ! operator). But then again, that wouldn't quite be as clever.

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