Dan J.

Dan J. lives in Vancouver, BC. He's been developing software for going on eight years, during which time The Daily WTF has gotten him through many a terrifying codebase.

Jun 2013

Affidavit Deficit

by in Tales from the Interview on

Dave D. and his wife counted themselves lucky: they'd been in the right place at the right time more than once. When a family member's health began to fail, they were able to sell their software business and retire to help him manage. In their forties, their good fortune and low-key lifestyle meant they wouldn't have to return to work unless they wanted to.

After a couple of years, things had settled into a routine and Dave was ready to consider new opportunities. A local startup was courting him for a senior position, and their engineering team, relatively young and untested, seemed excited to have a steady hand at the tiller. But this startup was unusual: no hiring decision could be made on nautical metaphors alone. They - specifically, their overlords at WTF Ventures, Inc. - prided themselves on fusing the discipline and professionalism of the corporate world to the innovation and foosball-playing of startup culture.

You Can't Spell "Date" Without "Database"

by in CodeSOD on

At Shaun's company, the fiscal month ends on the 18th. Nothing wrong with that, but there's plenty wrong with this Perl code that finds the most recent fiscal month-end:

my $date='0000-00-00';
my $dd = 1;
my $mm = 1;
while(substr($date,8,2) ne '18') {
    my $sel0="select date_format(date_sub(date_sub(now(),interval $dd day),interval $mm month),'%Y-%m-%d')";
    my $setup=$dbh->prepare($sel0);