Quoted via No New Tools โ€” Shawn Blanc, which pegs the extrapolatable message perfectly:

Increasingly, I feel like a lot of my tools are dressing-up as tools, because they donโ€™t offer any savings in time or effort, just slightly different methods to mindlessly shift information from one bucket to the next. And if one bucket has a hole in it, you get another, smaller bucket to catch anything coming out of the hole in the first bucket. This goes on and on with more holes and buckets, and before you know it, you have an intricate network of buckets whose reason for existance [sic] is to catch the information you canโ€™t manage in the first place. You are stuck in bucket recursion, adding tools to patch the shortcomings of other tools. Those patches are how you know you have dress-up tools.

The original is specifically targeting design tools, but I think we could easily forward that to third party libs as well. We use NHibernate at work. It's neat. But I just edited seven files so that I could query a database with complicated logic like...

SELECT * FROM MonsterLocations WHERE Zip IN (10001, 10002, 10003)

So to do the same thing as that simple SQL statement, I had to create an entity based on the table, a repository to handle all the sorts of WHERE statements I might want to run, a map of the entity to the table, etc etc.  I don't begrudge the tests, much, though they're really simple stuff like, "Can I inject really conventional values into each field?" which isn't where the real value of TDD is.  And I'm missing a few of those overly simplistic tests right now.

Further, there "should" have been more files, as I've stopped using ViewModels by rote and instead usually return anonymous classes based on good LINQ selects.  If you're passing huge ViewModels to the client and then processing them fully on the server, be careful that you haven't created too complex a client model.


It's nice to have tools, and I understand why folks enjoy ORMs.  The usual argument is that if we ever change database engines, NHibernate means we're already 80% there, but was it really worth the extra hours on hours of overhead just in case we want to swap engines later?  It's been years of extra code and no change so far. 

Code based on NHibernate is, by definition, lightyears away from being a minimally viable product.  Enough tools/libs.  Keep it simple.

Labels: , , ,