Cowboy Code
Tuesday, June 20th, 2006What is cowboy code? To some it may hearken you back to the days of the noble cowboy and to thoughts of Gene Autry’s Cowboy Code but to me it means something entirely different. Let me define it:
Cowboy Code - Any unmanaged, undocumented, or otherwise unknown piece of code that runs a business process which provides a modicum of value to the organization. Cowboy Code is normally created in a heat-of-the-moment fashion to solve an unplanned business process or to fix an unexpected emergency and is left to run unmonitored and forgotten until the day it breaks. Cowboy code may also include inappropriate uses of technology or unnecessary uses of technology to “showboat” in an attempt to get attention. Cowboy Code does not have any auditing, logging, or reporting mechanisms and the programmer that wrote the code has typically long since left the organization.
In every shop I work I seem to always be on the roundup of this cowboy code. Cowboy code has many guises: batch files, DTS packages, Access databases, Visual Basic scripts, scheduled tasks, SQL Server jobs, and the dreaded compiled code without source are but a few of the many sources of cowboy code.
Perhaps as programmers we need our own code of conduct as did the cowboys of yore. A Code that would dictate proper conduct, reward good behavior, and establish camaraderie among programmers.
June 21st, 2006 at 9:44 pm
Sounds like you are kind of the Cowboy Code sheriff.
It’s suprising how wild this “Cowboy Code” can run. Even in shops that seem like, and boast themselves as, a “tight” run ship (or posse in this case). Don’t let them pass this off to you as “Extreme Programming” either, pardner. You have to admit that having them gone when you have to correct it is usually good, too. It avoids the likely gunfight to follow…