Tuesday, April 21, 2009

Your Codes Shall Live After you...

Prior to now, I have never worked in an environment where I had to inherit a code base to work with (well except those times I have had to peek under the hood of some open source codes I needed to tweak) It is either I write the needed codes myself or I do.

But recently that I just got a job where I get paid to play around with computers, the internet and write codes, sooner or later I know I am going to be confronted with that situation; To build on codes whose original authors have long left the company and are nowhere to be found. It is not as if am that concerned about this happening, guess am more preoccupied with the thought of the quality of codes I will be giving up for inheritance when I finally take my leave from the company.

Am presently working on a project where I am building, more or less, from scratch and with every line of code I write, that thought keeps hounding me.

Guess the saying: the good evil deed men do shall live after them, is also true for you as a developer. Your codes too shall leave after you. And I don’t think I would want to leave behind an arcane legacy :) so to prevent this from happening I went ahead and got myself a book on how to write quality and manageable codes. A pretty nice book on software development I’ll say.

But then again when it comes to coding style, it’s worth stressing that its sorta like Religion where you can’t claim that a particular method is the way: the most efficient. But the trick is to come up with a style based on some fundamental guidelines and adhere to it. It’s about maintaining consistency. Whichever style you decide to adopt the key is to stick to it and maintain it across board.

So guess am doing my bit in ensuring the quality of codes out there, I can only ask of you the same. Do find the following online articles on the topic helpful, like I did. They are PHP centric ;)

An article from devshed, tim kadlec on the 5s, and Reinhold Weber's tips

No comments: