The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » whyyy?! (RSS)
  • Wheels that keep on turning..

    ..and reinventing themselves. It's as if I can take any random file in the solution today and find parts of the CLR reimplemented. Some more totally pointless gems: public static List<T> GetList<T>(params T[ items) { List<T> list = new List<T>(items.Length); list.AddRange...
    Posted to Forum by JimLahey on 02-25-2013
  • Unconditionally conditional query composition

    This is really elementary stuff, but I acually said "WTF" (in longhand... voice?) when I saw it during a routine peer code review, so naturally, I had to immediately post it here. if ($this->hasSomeCondition){ $query = "SELECT * from myTable WHERE itemId = '$itemId'"; ...
    Posted to Forum by amyb on 01-24-2013
  • A shortcut for resetting member variables, except not.

    Just stumbled over something ugly in our code base: void SomeClass::reset() { memset((char*)this, 0x00, sizeof(SomeClass)); timestamp = 0.0; datestamp = 0; // some more initialization } This method is called by the constructor and in at least 2 other places in the code. If it wasn't followed by initialization...
    Posted to Forum by witchdoctor on 11-15-2012
Page 1 of 1 (3 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems