Friday, June 30, 2006

Being Mr. Clean

I'd like to share some of my experiences as a coder in the Mr. Clean role, where've i've had thru the last 3+ years, been the person cleaning up the code for other people.

And maybe it's having to do that constantly, that has made more my focus on the basics, rather than soem advanced cf programming.

So i'd like to share some of my systematic approaches I have to improving the code.

1. Documentation

Commenting is essential as more programmers are aware of, but when you have a lot of coldfusion files and applications, it's time to step up and document your applications as well.

And this doesn't have to be something highly complex.

For example if your a dba, you'd create a Entity Relationship Diagram as both document and reference material.

As a coder create an Informational Architechture of your Applications

Pick an Application on your site.

A. What files/folders does it contain
B. What custom tags/includes/cffunctions does it use
C. What datasource/databases does it use?
D. Any kind of major current problems going on with it?
E. And if you have the information, perhaps a small history would be nice as well.

This is all about my belief in the importance of preparing for the worst, and also providing training information, for either a peer, a successor, your manager, etc.

2. Source Control

This may sound sad or amusing, but not every company has source control in place, or knows what one is easiest to use and deploy. Or what ones can be cheap to try out and cause the least problems

This takes time and trying different ones out.

3. Pick and Document a Method/Framework

It doesn't matter to me what method you pick, but document as much of it as possible, what naming conventions your gonna use, coding styles, working in any kind of teamwork styles etc.

Even if your using the most known framework in cf world, each company tends to have it's own unique flair for how they implement it. So document it, for your posterity's sake.

4. Know and Train to be expert on all levels of application development.

Where you may start out by being a part of a team, using methods like fusebox where you only have to code in certain aspects of coldfusion application development, in the end, if someone leaves, or you move on, you may not always have the option of just coding in what you've done so far.

So I still believe that training in all aspects are important, good coding styles, using your variables/incoming data, parsing/manipulating strings/data, interaction with databases in writing great sql, basic layout and design.

I am not claiming to be an expert, I just suggest it's wise in the long haul to know as much as possible.

Now of course, it may not always be easy to implement all of these ideas, right away at full 100%, so you need to find small things, small incremental ways, so that you're gradually becoming the full rounded, long term thinking/planning developer.

I hope someday where I can stop having to go to places and be Mr. Clean, and just write good code.

Thank you.

P.S. Happy Forth of July

No comments:

Post a Comment