Arnold Vriezekolk writes, "one of the guys on our team likes to be thorough. Very, very thorough."
/* This program will only run if the laws of mathematics hold */
if(1 == 0)
fprintf("Oh crap - we are not running in the correct Universe\n");
"This is in our production code," notes Joseph Daigle, "I can only hope they rolled a die to ensure this was actually random."
public static int RANDOM_PRIME_NUMBER = 215;
"I stumbled upon this while clearing up an Excel Automation project," Veggen Skrikk writes, "I wonder who's that lucky fellow!"
/*3 times because if we have filter on some column -
clean only that data, and after that cleans everything
else (2.), and the 3. is for lucky :) */
Phil writes, "the 2.2 release of the Android SDK pays homage to WTF moments with an actual API change to the log code."
// What a Terrible Failure: Report a condition that should never happen.
Log::static int wtf(String tag, String msg)
"I found this snippet in the middle of a large class written by a colleague of mine," Matt writes, "I think the comment and the snippet itself sum up my experiences with this particular developer perfectly."
Map<TransactionId, List<BillingTransaction>> workMap
= new HashMap<TransactionsId, List<BillingTransaction>>();
// Do not remove the following line. HashMaps are crazy and point
// to old reference data even if they were instantiated fresh!
"I stared at this code hoping something would shout 'April Fools!'," wrote Stephen, "unfortunately, nothing of the sort happened."
public static boolean isAlphaNumeric(char c)
return !isLetter(c) && !isDigit(c);
"I found this while going through a (thankfully, long gone) colleague's code," Craig wrote, "there were atleast four of these in the code."