14 Jan 2003 pfremy   » (Journeyer)

I am using and patching CppUnit. This is such a beast!

CppUnit was developed after JavaUnit, which was developed from SmallTalkUnit, which was written by the author of Extrem Programming. I think something has been lost somewhere on the way from SmallTalk unit to Cpp Unit.

Some core principles in Extrem Programming are:

  • use the simplest design that work
  • you are not going to need it
  • refactor mercilessly
  • do things only once in your code

    I look at CppUnit and I see exactly the opposite of this. Ironically, CppUnit is used to develop test suites in the Extrem Programming spirit. Briefly, CppUnit has:

    • a very complicated architecture. There are so many classes that delegates anything to another one that you don't get a clue about who does what.
    • lot of empty classes. This comes from historical reasons I think. They changed the internal but kept the classes around.
    • lot of duplicated interfaces, probably for the same reason
    • despite so many classes, it does not have extensiblity where I need it.

    It looks to me as the typical example of over-engineering. People have read Design Pattern and they want to apply it desperatly. And they also read about templates and want a maximum number of them.

    CppUnit should fit in 3 or 4 classes. No more. I'll rewrite it one day.

  • Latest blog entries     Older blog entries

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!