Friday, December 7, 2007

Don’t do it yourself!

A few years back I met a friend of mine who was in the software components business and while he was explaining to me what his components did I was thinking "who in the World is going to buy those?”, “anyone can now easily do what you are offering with a few lines of code”. However, knowing that my friend was a very smart fellow I gave in, downloaded and reluctantly started using his components here and there in my code. To my surprise it did not take long for me to fall in love with those drag and drop components that took care of setting everything for me.

I started keeping a simple log indicating the minutes I was saving every time I dragged one of those components on my forms. When I wrote 3 minutes on my first log entry a “forget this” thought was floating on the back of my mind but I decided to do it for one whole week…

Have you ever looked doubtfully on a credit card statement where the biggest expense item is $50 and yet somehow the total adds up to $3K! If you have, you understand the doubt I had when those “pitiful” minutes added up to a total of 170!

That was like a wake up call – the proud programmer in me had kept me away from exploring the vast repository of off the shelf components – “I don’t need components, I can do those things myself – not only will my code do the job better but I will have complete control over it and I won’t have to rely on a vendor or another when things don’t work, and besides, I won’t save much time anyway” was my usual reasoning. But, man had I proved myself wrong!

The more I explored the market the stronger became the realization that there are hundreds of extremely intelligent programmers out there pouring their knowledge and energy in creating those incredible, time and frustration saving components but I had “shunned” them – to my own detriment!

Since then I resolved to never ever write a line of code that I don’t have to – I take my time to know and test what’s available out there and I start every project with a list of components and parts that I can use. Nowadays, a much bigger portion of my time is spent in architecting than in bricklaying and it feels good.

A recent meeting with a few bright guys from an IT department prompted me to write this and issue a call to all programmers out there – PLEASE DON’T DO IT YOURSELF if you don’t have to!

PS if you feel the urge to refute this on the grounds that it is better to do it yourself sometimes depending on the situation please don’t waste your time – yes, there are cases when you absolutely must write it yourself but that is not the point here.


Steve said...

I think a good general rule is if you can rewrite a component in say, eight hours, go ahead and write it. I've always found components problematic...

Gaël said...

I think you need to be sure of the quality of the components and it is neccesary to have a good confidence in the quality/support of their code. we did use some component in Delphi (and the VCL is allready wonderfull) and in java we use a lot of library (mainly from the jakarta project). But some time we have regretedusage of some bad quality components. So in short, if you find a reliable source of component,use it but take time to test them before you depend on them.