Too much flexibility

Hanni at BileBlog occasionally hits the nail and this time it's his rant against the flexibility fetish rampant among Java programmers.  I suspect it was their obsession with the Design Pattern that lead Java programmers down this path.  Design Pattern is a useful tool but you can hurt yourself if you pull on it too much.

Being able to mold and fuse everything in your software is good, but such flexibility isn't useful if it isn't actually used.  I seriously doubt if more than 10% of all the extra flexibilities and abstractions being built into Java software are ever used.  All that 'fat' makes the software bigger, slower, and more difficult to understand.

Dive into any popular open source Java code and you'll see lots of design pattern artifacts like Factories, Adaptors, Managers, and Observers most of which has only one or a couple of implementations.  These sort of habitual abstraction often forces late comers to get lost in the abstractions to understand process and data flow.

I think the best example of flexibility is the mammal skeleton structure because flexibilities are like joints, points that can bend.  Joints in our bodies don't bend in all directions.  They also exist only where it's really needed.  Each joint has cost associated with it so if the benefits don't outweight the cost of having a joint a a certain location, it shouldn't be there.

Evolution doesn't happen in anticipation; it happens in real time.  Don't add flexibility in anticipation, but add it when you actually need it, where you need it, and no more than what you need.  Based on my experience, I would add that real flexibility comes from preventing assumptions from leaking across component boundaries.  Limiting surface areas between components will help in reducing the chance of such leaks.