Someone gave a technical talk today about the code quality in OpenOffice. He's an engineer working on improving various aspects of OpenOffice, and the talk was somewhat of a retrospective and personal opinions on the codebase.
Before I begin, I should mention that I like OpenOffice. I find it useful, stable, and generally a worthy competitor to Microsoft Office. In particular, its importers do a very good job of translating from Microsoft's formats to open formats.
I have heard people complain about the code quality in OpenOffice, in particular the fact that it's severely threatened by bit rot. This is in part because the codebase is enormous (over 5 million lines), and in part because there is no overseeing authority.
The first vignette was about a feature (or lack thereof) in Impress (the equivalent of PowerPoint). If you don't move the mouse for about 3 seconds during a presentation, the cursor should disappear (it's distracting). Apparently, this feature was implemented in Impress in 2002 by 3 different people, but it was never approved into the codebase because the Sun usability folks (which still control OpenOffice) could not agree on what is a reasonable time interval (should it be 1.5 seconds or 2 seconds or ... ?)
The second vignette was about the first bug this engineer fixed in the codebase, namely:
#define protected public // eine kleine Schweinerei
If you know anything about Object Oriented Programming, this is about as gross and blatant violation of OOP principles as you can imagine. Apparently, someone was in a rush, and instead of refactoring a protected method into public, he decided to make all protected methods public. There is also a "rule" on the team that you never modify code that has German comments.
I always felt that Open Source, as a philosophy, works remarkably well despite the fact that it seems it shouldn't work at all. However, I also feel that the Closed Source philosophy is just as viable, since financial pressures are very effective and in fact drive just as much innovation (consider the fact that Microsoft, although much maligned, does produce some of most usable interfaces around, and it's no accident that lots of open source projects copy them).
In my personal experience working on Microsoft Office, the attention to detail and code quality, was extremely impressive. Never once would anyone have dreamt of implementing the kind of hacks I heard of in this talk about OpenOffice. I do believe that open source projects suffer from code quality issues and bit rot, and I have heard lots of similar stories about MySQL and other high-profile successful projects.
I suppose one lesson is that Open Source zealotry (as well as zealotry in general) is really out of place and should be regarded with due skepticism.
1 comment:
Sounds like a pretty balanced view.
So you worked on MS Office. I didn't know that, cool! You must have written the bits that do all the clever things. ;-)
Post a Comment