Sunday, April 6, 2008

About being a good programmer

I consider myself to be a good programmer. I am my own worst critic, I always question methods and don't use methods "just because I did last time". I always assess if they are appropriate for the new challenge.
I also try to keep up with new technologies and trends in development and although I can be a bit too enthusiastic about certain things, I never really use new technology just because it's new.

At the office my team is currently at the end of a very big (for us) project. As always, the time was short and the deadline was set in stone, but no one really knew exactly what we had to build. So me and 6 colleagues started working on the project. It was jump-started by a Software Architect, who created the very basic architecture and then I took over.
The system is basically a routing and handling system for product provisioning and we envisioned a program where we would just write a plug-in for a specific product to handle the product specific tasks. That way we can easily extend the system for new products.
In the initial planning we had the system to handle 4 products, of course this soon turned into 5 products and then 6 products. So me and two other colleagues set off, each assigned his own product(s), to build the plug-ins.
One of the colleagues copied the basic architecture of his plug-ins from my plug-ins, but the other colleague took a whole different route.

After initial programming was done and we were in the test phase, we finally had time for code reviews. So as I was reviewing the code of the colleague who took a very different route then I did, I found it hard to determine what he was doing. I didn't get it and his solution seemed overly complex to me. Then he explained his architecture....

I was shocked. His architecture was much better then mine. I was so set in the mind-set of my architecture that I failed to see the beauty of his decisions. I was shocked and ashamed. Ashamed because I thought my design was better then his before he explained it to me.

This reiterated a very important lesson to me. I am not perfect, I won't always do the best thing. I might not even be close from time to time.
One of the things I consider add to me being a good programmer, is that I will admit if I am wrong and that I will accept a better solution, even if my solution was the inferior one. I'm not too proud to admit I am not perfect, but somehow, this time, it kind of sneaked up on me.

The lesson I take away from this? Don't judge too soon and don't think you've got the best solution. There will always be a better solution.

No comments: