Thursday, July 06, 2006

In which the protagonist discusses (or whines about) work

It feels kind of like I've gotten nothing done in the last two weeks. This isn't quite fair because I've only had four days of work in the past two weeks (last week I was at Fermilab from Monday until late Wednesday and this week I had Monday and Tuesday off). The major reason I feel so unproductive is because I've gotten to a point where everything on my todo list depends on the completion of one unpleasant, complicated, bug-ridden task. I wrote a bunch of code and was trying to make sure it was doing what I wanted it to... but that involved writing more code and running it through ROOT to make plots. The plots kept coming out totally wrong - but was the problem with my original code or with my ROOT macros or with ROOT itself? Today I finally killed my brain with trying to think of every possible thing I might have done wrong and asked the local ROOT guru for advice. He suggested a few things I'd already tried, then he looked at my code and didn't see anything wrong. Then he decided the only thing that made sense was that ROOT was working in some way that wasn't what we expected. So I tried storing the data I was plotting in a different kind of object... and joy - my plots came out the way I expected. Moral 1: debugging sucks. Moral 2: Instead of going through your code four million times and feeling dumb because you're clearly too stupid to recognize what stupid thing you've done, blame ROOT and move on with life.


This is a picture of the water cooler down the hall from my office. The hot water lever broke off last summer and this was how it was fixed. Physicists are awesome. :-D

0 Comments:

Post a Comment

<< Home