Last week was a frustrating one. I downloaded and installed a module that was supposed to provide some sort of integration with a Jabber server. It basically provides a user interface and a bunch of functions that I can call from within the toolkit I am using. It was a pain to install due to the lack of documentation and the documentation that did exist was badly written. After spending way too long getting everything up and running things didn’t work as they should have. But I have the source code. No problem right? Wrong! Going through the source code didn’t particularly help either. Why not? Not a comment in sight. Just a large amount of undocumented C code.
After spending a bit of time thinking about it I figure I have two choices: try to figure out what is going on or rewrite it. There is a fairly large amount of code so rewriting it could take me a long time. On the other hand because of the lack of documentation it could also take a long time to (fully) understand how everything works, which would be necessary before I could start fixing things.
I guess this could apply to any open source project. If the code is badly written but there’s lots of it and there’s no documentation, what should one do? Reuse or redo? I would be interested to hear from anybody who has had similar experience with open source software and what you did about it. As always, feel free to leave any comments.