Vanity of Vanities

Starring at the glare coming from the computer monitor, the light does not shine upon my heart. Looking at the code, I am deeply frustrated. You know what a good design pattern is. You have a good architecture view of the system. However that will not stop the hacks leaking into a good design. It is out of my control. I believe every problem has at least one clean solution, and I am willing to invest more time to discover this solution. One does not need to add in dirty hacks to make a solution work - coding is such an art. But it might not be what your team members think. Some of them might have not tried hard enough. Some of them might probably prefer dirty hacks. I don't know what they are thinking, but it does make my life a mystery.

What is the point seeking good design pattern in software development, when many people simply ignore it and put in dirty hacks?

Then I remembered what the Preacher said.

Vanity of vanities, says the Preacher, vanity of vanities! All is vanity. What does man gain by all the toil at which he toils under the sun?

Ecclesiastes 1:2-3

Last few days were quite hectic for me, as we are quite busy at work, trying to commit in all the functionalities for the new release, before we branch the repository for testing. Usually I got a chance to browse around the code base to fix random glitches that come up, and sometimes I was confronted with some unpleasant surprises.

I have to confess that I am a control freak in coding. In daily life I am usually quite tolerant and lay back (well, some of you might not agree), but when it comes to software development I become very intolerant and narrow-minded. I usually have "heart-attack" kind of feeling when I see "unpleasant" code, whether it is at work, at home or a random open source project that I've just downloaded. At the same time, I do enjoy reading through good designs, well documented code with consistent layout.

While I can still enjoy good code as a great piece of art, I need to learn to be patient and tolerant in this area. I can become quite emotionally distressed at work when I am confronted with bad designs, and it usually has bad effects for the rest of the day (and my colleagues suffer too). I need to tell myself that it is just a piece of code, just a combination of on and off's. Take a deep breath. Fix up the bad design if it still has a cure, otherwise document the hack so we can come back a bit later. And the move on...