The Tale of Two Carpenters

Why is it a good thing to have personal frameworks and libraries, why don’t I just build a monolithic system, that does one thing and does it good. Let me tell you a story of two capenters.

Adrian the first capenter likes build things. He can build anything giving the proper amount of time and motivation.

Sean also loves building things, but he hates doing the same thing twice.

One day a company approached both Adrian and Sean to build a special kind of chair for them. They did this so that they could pick the best from both. Adrian was the first to turn in his prototype. He has it all well planned and thought out. They liked it and told him they will get back to him before long. They have to wait another two days before Sean could turn in his own prototype. They also liked it, It looked so much like that of Adrian, they have both followed the specifications well. When the time for choice came, they chose Adrian over Sean because he took less time in building his prototype.

Problems started when the have a new staff member who wouldn’t fit into the chair because he was….rather big. They need to modify the SEAT. They called in Adrian and he said no problem, he went ahead to modify the CHAIR, adding a new kind of seat. It took him as long as it took him to build the chair to modify the seat.

Over time, these modifications were becoming more and more frequent and Adrian has to build a new kind of chair almost every other week just because of a slight modification. It came to a time that the company weren’t happy and began complaining. They went on the lookout for Sean, just maybe he could help them.

They found Sean and told him their problems. He laughed and said that it wasn’t a problem at all, and then he told them why his prototype took a bit longer to produce.

Sean, unlike Adrian didn’t build a CHAIR. He built the components that make up the chair. He built the front legs, back legs, arm rests, back rests, seat etc. It took him as long as it took Adrian to complete the chair. After building the chair, he started assembling them and that was why it took him longer. But now the company suddenly saw the solution to their problem. Adrian built a chair and so each modification no matter how small will alter the chair. Sean built components therefore he will need to modify only the component parts that are affected.

I told this story to say that as a developer, I strongly believe that you try as much as possible to have a personal library. It will help you a lot in the long run. Those days when I was still naive, when I hear “library”, I don’t see it as a thing that I must build. My software are large and monolithic. A little change to one part of the software will make me pull down the whole bunch. Now I know better. Whenever I see a feature that I have used twice, either in the same project or different projects, It is going into a library. I am happier now than then.

Also when you have a large project, please and please MODULARIZE. You don’t want to know what trouble you will save yourself or the person maintaining that project in the future.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: