Tuesday, January 03, 2006

KOrganizer bug alert: Grid layout broken

Attention KOrganizer users: Please be warned that if you set your "hour size" in the view configuration small enough (for me, 8 or fewer pixels, but this varies depending on your screen resolution) then the labels on your hours grid will not display accurately:

[KOrganizer hours grid screenshot]

As you can see, the appointment's set for 9:30, but from the label it appears to be 10:00. What's the cause of this bug? Well, here's the bottom of the grid, which may give you a hint:

[KOrganizer hours grid end screenshot]

Wow. The programmers never tested what happens when the user sets the grid size small enough so that more than 24 hours fit onto the screen. I like to have a view of all 24 hours of the day in my planner (it helps to track late-night or early-morning flights and submission deadlines), so I've had it configured this way for a long time. Older versions of KOrganizer worked fine --- it would intelligently detect when the grid was too small, and adjust the size so that it just filled the screen --- but code for labeling the grid was tweaked in 3.5, and I guess this got broken.

I actually missed a job interview call because of this bug, and of course I am pissed, mostly at myself for relying on software too much, but also slightly at the programmers. I can't be too pissed, because they wrote a very useful piece of software that's free, and that I use all the time. Nevertheless, it seems like this sort of thing simply should not happen. The very first thing I'd do, after writing code like this, is to test the boundary conditions: what happens when you set the pixel height to a tiny value? A large value? This sort of thing should be almost reflexive.

No comments:

Post a Comment