Skip to content

one line of code

We all have those days. The result of a long day’s labour is just one line of code. Well, that was my day for yesterday. And for today. I also wrote several debugging routines, and made quite a few testing changes, but they were all deleted from the final code check in, so they don’t count.

Mesa has had a couple of bugs in Excel import/export running on Intel. They didn’t show up in initial testing, but became apparent soon after. The obvious cause was byte ordering. Not so obvious was where.

However, Mesa has been working, and very thoroughly tested, on Intel since 1993. Also Sun, and HP PA-RISC, both a little later, of course. Longer than it has been running on PPC, in fact. But we rewrote the Excel support code in 2000/2001, when only PPC suppport was required; before that we only supported strings, numbers and formulas, but no formats. The new code took advantage of our existing byte ordering, but two dodgy lines of code crept in. One was my fault, in the re-port to Intel – I used a 16 bit integer routine where I should have used a 32 bit integer swapping routine, and that didn’t show up in the internal tests (because it worked for average, business-typical numbers).

There’s something like 20-30 hours of debugging in correcting these two issues, and that’s not counting reconstructing the project to match the new 10.4, Xcode 2.2 templates.

Post a Comment

Your email is never published nor shared. Required fields are marked *