On Friday, 20 April 2012 at 04:40:56 UTC, H. S. Teoh wrote:
But I suppose my experience has been colored by the trauma of working with an over-engineered C++ system that only one guy understands, resulting in people who came after him rewriting their own versions of
code that they didn't dare reuse 'cos they didn't understand it,
eventually ending up in a patch-upon-bandaid-upon-patch codebase with umpteen ways of doing the same thing that *nobody* understands, not even
the original guy.

One example. The system had this elaborate database abstraction class hierarchy that could do wonders: automatically populate data structures, automatically ensure data consistency, periodically do self-maintenance, replicate itself and sync with backup servers, etc., -- if we only knew how to use it. Problem is, only the guy who wrote it knew which obscure class objects to instantiate to make the thing sing to our tune, so somebody got frustrated and wrote what is essentially a wrapper function that takes a raw SQL string and executes it, thus bypassing the entire beautiful database abstraction code completely. Since everybody else didn't understand the original code either, they started using this SQL bypass function everywhere... only to discover that the system broke in subtle ways when you didn't go through its beautifully over-engineered abstractions. So more and more dirty hacks were introduced that piled on top of each other like festering infected bandages that fail to address
the real wound underneath.


Oh yeah, I've seen that story too in a couple of other places. C++ seems to make exceptionnally easy for "mad coders" to screw up a whole system with overengineered pieces of crap. One of my colleagues spent more than a year rewriting a system that turned into a black box that nobody could maintain.

My opinion is, when a team works in this language, code reviews should be an obligation, else there is always a guy like that, who has his genius idea that nobody else understands and puts his crap all over the place. Basically, the only piece of C++ software I've seen that never became a huge piece of steaming crap was a system that was systematically code reviewed by the main software architect and a couple of highly skilled engineers.

I suspect D is not much better on this topic, it's possible to write extremely complex code with it too. Actually, it's possible to write complex and unmaintaineble stuff in any language (even in Python), but I believe the more complex the language, the easier it is to screw things up and the more important code reviews are.

Reply via email to