It seems these days that 90% of my work is cleaning up after other programmers. My annoyance with this fact – and the solutions I think you as programmers, designers, etc. should use – will probably become one of the major themes of this blog.
There’s a desire among us to create, and that’s a worthy desire. However, the requirements for so many small business sites are so simple and common that creating new code from scratch to run them is not only inefficient, it’s downright dangerous. There’s no such thing and “clean” code – all code is buggy to one degree or another. Custom code, which has been exposed to a much smaller audience of developers and seen limited public release, has the potential to be among the buggiest, most insecure code of all.
It seems every developer has tried to attack this problem by building their own content management system (guilty as charged). This, again, would seem an elegant solution, but you need to weigh the benefits against the real costs of such an undertaking. Are you willing to take the time to document your code, not only in the form of comments but also in the form of a user manual that also covers administration? Are you writing code that only you can understand, or are you taking into account the programmer who will come after you? Are you addressing a problem that could be easier solved by modifying something off the shelf?
If you’re building a site for a client that’s nothing more than a sales letter and a lead generation form, or a few informational pages or any of the other common formats for a small business website, there’s no reason in the world you should build it from scratch with completely custom code – you’re wasting your time and the client’s money.
I’m riled up on this topic because of the recent spate of Gumblar attacks. I’ve now cleaned out several custom-built sites using a script I wrote that, thankfully, automates about 90% of the process, but still leaves quite a bit of hand-editing. Were these sites built on a common platform, it would be a simple matter of backing up the database, reinstalling the software, re-importing the database and cracking open a beer. Instead, I’ve found myself wading through thousands of files looking for and deleting the lines that indicate an infection, then testing my work and praying I didn’t miss anything.
This may all seem hypocritical in light of the fact that I now advertise a CMS I built specifically for the audience I serve – small business owners. My defense for building the TKM Website Manager is that there is no other CMS out there that presents a user interface to non-technical users in a way that makes immediate sense to them. Every other CMS is built for web geeks or bloggers or some other audience of hobbyists – not a single one is built specifically for non-technical small business owners. In other words, the TKM Website Manager addresses a very specific need and a very specific audience and is intended to be reused again and again.
The next time you’re starting a project for a client, plan out the project before you start programming. Don’t take shortcuts – actually do the requirements gathering and needs analysis. If the deadline is too tight for this, I argue that the project is not worth doing. In the long term, it’s far less expensive for the client if you take the time to really think the whole project through before you lay down a line of code. While you’re planning, keep asking yourself, “Is there something out there already that can do this for me?” Remember Larry Wall’s three virtues of the programmer – laziness, impatience and hubris. The client ultimately doesn’t care about how clever a programmer you are; they care that you get the requirements met and the job done.

