First we had the extremely smart Frans Bouma talking about the importance of proving your algorithms as a development methodology, which at least had the virtue of being funny. We then had one of the single most productive developers in Alt.Net talking absolute garbage about maintainability. At least Patrick Smacchia is still talking sense. Let’s go back to what Ayende’s saying.
Maintainable is a value that can only be applied by someone who is familiar with the codebase.
This is the exact defence I have seen of most of the worst systems I have ever encountered, from dodgy spreadsheets to distributed Access macros to over-engineered C++. I have personally, to my shame, delivered systems that had exactly these problems: they were well architected (to my definition of a good architecture), they were easy to modify (by me), followed consistent conventions (known to me). That’s not a good system. Even if you replace “me” with “us” you haven’t got a good system. This is what I would term the “I’m incredibly smart” anti-pattern.
The problem with the “I’m incredibly smart” anti-pattern is: often the projects using it have incredibly high velocities. Until someone leaves. Companies often don’t have too much of a problem with this, especially during a recession. Also, they know that the next bunch of developers who work on it will probably want to either a) rewrite everything or b) run the project in maintenance mode until it’s as bad as any legacy system. The good news is that the latter scenario definitely isn’t happening to NHibernate.
Part of the problem is that maintainability should be a concept that is separate from the IQ of the developers: NHibernate is developed by extremely smart people, that shouldn’t have any impact on its maintainability as a code base. However, this doesn’t mean that Joe Graduate on his first coding job should be able to pick up and modify the code. Maintainability isn’t a case of the lowest common denominator. If so, we’d have to ensure we never used the following:
- yield return
- lambda expressions
- and frankly, NHibernate
I’ll talk a bit more about the middle ground in a later post.