Sunday, December 16, 2007

Wake up from the perfect code world

I caught an interesting article regarding programming from reddit. It's about programming should not be taken lightly as those books on the shelf "Programming XXX in 24 hours" since there are no such books for mathematic or physic. It is a long term effort of learning to achieve not just to code for yourself but also for others programmer who is going to maintain your code.

On the next article, which is a reply to the first one, stated that programming should be master on the foundation. Practices on programming should be done on daily basis to improve the skill, just like a musician.

I agree on both articles and I really support the ideas of they provided; if you're always working on a new project or perhaps pick up a language on your leisure. So what happened if you join a company to maintain their existing system and found out their product is written with bunch of junk code and hard to maintain. Highly skill programmer will not able to do a thing and here is why:

1. Cost: You will be stop if you're trying to refactor the code to make it more easier to maintain or perhaps improve the performance. Because by doing so, no revenue generated for the company as customer didn't notice or request for it. You will be costing the company valuable man hour if you attempt to do so. Beside that, most of the time will spent on supporting the software as it has generate so much of bug report that you don't have time to refactor it.

2. Risk: You can't refactor as it might cause new bug on a the transactional system. A system where money is involved and having a bug causing the whole system down will be big lost for the customer. Nobody wants to take that risk. There are also a mindset of "If it is working, don't touch it", which proves to be right.

3. Management: You have the idea, the solution, the plan to make the whole thing worked and presented it to the management to approve it. Due the 2 factors above, your idea will nevertheless be washed down to the drain. However, there always a exceptional cases where large company with enough money to spend on for such project. I have seen in done before but chances like this does not usually happened.

The 2 articles above, for me, is more suitable for solo experience and long term skill improvement. Both shows the essential idea of how to become a great programmer. However, both good and bad programmer does exists. No matter how highly the skills are, there no way to run from dealing with bad codes.

So, wake up from the perfect code imagination world and welcome to the real world.

Update - Related artiecle: Nobody Cares What Your Code Looks Like