About Me

I am a computer programmer. I do programming professionally and for a laugh.

Technical stuff on programming, java, DSLs, etc...

Thursday 31 March 2016

On Software Reuse

Imagine you are running a delivery service that takes packages from London delivers them to a destination in Venice. What vehicles do you use?
  • A bike carrier to pick up the package 
  • Some sort of air travel 
  • Some further van like delivery 
  • A motor boat of some sort 
You do not build and use one of these do you?

WaterCar Panther at High Speeds.jpg
By Kmr1985 - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=37330203

This would do the job in one go with one vehicle from pickup to the delivery point. You can argue low maintenance cost, a single mechanism, re-use etc.

So why not? Because it is a bad idea.

This vehicle is the lowest common denominator for all the different kind of vehicles it is trying to be. It is a compromise at all levels. It has many forced design ideas, in software terms it is force programmed. It may do the job at the end, but very badly.

Mind you it is okay to use the same engine in your car, aeroplane and boat.

But a single vehicle for the whole job? #Maybenot.

Same with software system. Reuse is a good sell, but be careful not to try and force mould a software idea to do irrelevant things. You will end up with a bad compromise.

No comments:

Post a Comment

Followers