Archive for March, 2008

Documenting the code in Doxygen

Friday, March 28th, 2008

So, the entire code base has been converted to C++. A quite enjoyable experience, actually.

Despite my fears, C++ can be quite nice when handled correctly. The language itself offers so many options, that you can easily be tempted to “code until it works”, which will get you quite far into dead ends very quickly. Settling for a coding standard early on helped me a lot, but there are still things to do (like establishing a consistent exception handling strategy).

Anyway, one of the initial reasons for moving to C++ (except for all the other obvious reasons) was to make it easier to document the code using Doxygen. And so, I have started doing that too.

So far it has worked very nicely. You basically only have to set up a decent configuration file (the default one gets you quite far, and doxywizard helped me with the rest), and a simple three-liner Makefile so that you can easily ‘make’ the code documentation at will with a few simple key presses.

If anyone ever hesitated about using doxygen (or any other similar tool, such as Javadoc), stop worrying and just use it - it’s extremely simple and gives you a great overview of your code!