Remy Porter

Computers were a mistake, which is why I'm trying to shoot them into space. Editor-in-Chief for TDWTF.

Sep 2013

Fields of Booleans

by in CodeSOD on

A long time ago, we learned the true values of boolean fields. But sometimes, {true, false, file_not_found} isn’t enough. Sometimes, you need more truthiness.

Wayne supports an application that uses its own custom macro-language to define how to generate Word documents. It’s database driven, and many of the documents depend on one notable table with 160 columns.


Indexed Image

by in CodeSOD on

A common task for JavaScript is to do something clever, like display a random image . Those of us old enough to remember the late 90s might recall an era when that was the coolest trick you could build into a web page.

Marcus found this approach to this problem, which is the sort of code that seems just plain ugly at first glance. At second glance, you can’t help but wonder- what were they thinking?