Cowboy Coding

Day 230 Week 34 Q3  Thursday, August 18, 2022

Changing the code on a live published site is called Cowboy Coding for the same reason Americans are regarded as Cowboys by many people in Europe or Asia. Things can go horribly wrong, and you can break your site, which can break your business or your brand, in the best case, temporarily.  Even if you are really good at something, eventually, you can and will make mistakes. Hey, even doctors occasionally do it and they too are working on Live Sites. Breaking a Site is never a good thing, even if it is done with the hope of fixing it, but there are some things that you just can not stage or prototype or experiment on without risk. You get the message.

Back to Cowboy Coding – there is a tradeoff between testing, optimizing, perfecting, de-risking and speed of deployment. And in a world where people seem to think more is better instead of better being better, there is an increasing tendency to be less careful in the name of speed. But trust me – mistakes are made. Reliable products become unreliable, and so do people! Not only do websites break, but so do relationships, processes, prototypes, models, and you name it. There is no getting around it in the world, but the good news regarding websites is the risk of breaking them in ways that do damage to your business can be very much reduced by simply having a different version of the site that you make changes to this the one that is up and live and published and operating as your connection to the world.

The process is called staging and consists of making a clone of your live site, which you can then experiment upon, hoping to improve it but sometimes breaking it in the process can cause a lot of gnashing of teeth and pulling of hair. I know I have been a Cowboy Coder and broken my site, although only a few times in over a decade, but it does hurt and waste a lot of time. And in fact, this is the reason I always preferred HTML sites over Content Management System Sites like WordPress. Because you always had the prior code which preserved the Context. Can you back up WordPress, sure, but the context can still get lost, and by the way, backing up and staging are not the same thing. Staging is a step before going live, which, when tested and debugged, can then be easily and quickly made live with a click.

As systems become increasingly complex, context becomes increasingly difficult to preserve. This can sometimes also be the case for relationships. If you want to be aware of and protect context but not be frozen and paralyzed, you need processes to move forward that permit mistakes without destroying what is of value. Backups and staging are ways of paying forward to reduce risk. But then again, the very act of creating anything does have inherent risks. If you are a creative outlier, as I suspect most of you who are reading this are, then some of you may be prone to extemporaneous improvising, which I can assure you work better in jazz than blog posting. In one case, the notes go by in fractions of a second, and in another, your experiments can be up for days. 

I wonder if jazz musicians are Cowboy Coders?