Extend what?

I just spent part of my day writing some code to make it easier to embed a fairly high profile open source piece of software in unit tests.  For the most part it is a very useful piece of software and it has a beautifully narrow API.  Unfortunately the design of some of the key server classes is not...shall we say, brilliant.  I could rant for hours about how this isn't exactly rocket science and how I wish that people would try to learn from frequently made mistakes, but I'm not.

If you design and implement a piece of server software, please make sure that it is possible to fully configure and embed the server itself in just a few lines of code.  And no, I am not interested in using a crapload of onion programming inheritance hierarchies of test classes.  I'll write my own unit test classes thank you very much -- you can keep your antiquated junit 3 base test classes and roll around in the mud with them if it pleases you.  Don't expect me to infect my code by having to extend your ill designed base classes.

Also, if you insist on using singletons then at least learn how to design singletons properly and, more importantly, when not to use them.  It is exceptionally tedious to have to serialize unit tests or fork off new JVMs just because people can't be bothered to design things properly.


No comments:

Post a Comment