Stupid Error

Ovid on 2007-08-23T14:26:45

I hate it when I make silly mistakes like this:

my $pivot_date = DateTime->new(
    year  => 2006,
    month => 08,
    day   => 01,
);

I should know better than that. I was staring at the MySQL datetime format too much :)

Update: In retrospect, I should have entitled this post "Zero errors!"


Me too!

grantm on 2007-08-23T23:08:44

Coincidentally, I made that exact error in ruby yesterday. Fortunately, '8' is not a valid octal digit so vim's syntax highlighting alerted me to a problem before I even tried to run it.

speaking of Vim

rjbs on 2007-08-24T00:32:15

vim i_ctrl-a will only interpret a leading-zero number as octal if there are only octal digits in it. That is why I only write code in the Vim scripting language. No bugs possible!