Coding to the Cowboy Code
I found a long-forgotten note on my desk today; a trip-wire wound taught with the tension between two very different ideas with very similar names.
"Cowboy code vs cowboy coding" it said and my mind engaged a gear left untouched for years.
Sometimes we accidentally put names to things in different contexts that end up sounding the same, and on some rare occasions, these accidents can help us learn something more about ourselves. This is one of those times.
In software development circles, there's a term sometimes used in a fairly derogatory way to describe a certain type of coder: The Cowboy Coder, who produces Cowboy Code. There's even a Wikipedia entry for it:
"Cowboy coding is software development where programmers have autonomy over the development process. (...) A cowboy coder can be a lone developer or part of a group of developers working with minimal process or discipline."
This term roots in a societal image of the cowboy as a radical maverick, a fiercely independent soul who does things their own way often in disregard for rules or how it affects others. Much of the western genre of books, television, and film is built on this mythology, and so being a "cowboy" is understood as being somewhat reckless, resistant to authority, and strong-willed, but also skilled and successful.
I've met many people who fit the personality and work ethic described by the term "Cowboy Coder" in my travels through the open source landscape, and I occasionally come across them in corporate settings. I'm also sure I've been called a cowboy coder myself a couple of times, or at least someone has applied the same attributes to a description of my work.
What I find fascinating about this whole thing is this description of a cowboy in no way matches up with what I know of actual cowboys (which admittedly is not much, but enough to know this stereotype is not fair or fitting).
This hunch was solidified when I came across a reference to the "Cowboy Code" a few years ago, which is what spurred me to scribble it on a note.
The Cowboy Code
From what I've been able to ascertain, this "Cowboy Code" or "Code of the West" was an unwritten code cowboys lived by, and there are a couple of versions of it floating around on the web (a simple search for "cowboy code" gets you lots of inspirational western-themed images etc). The most well-known of these comes from Jim Owen's 2004 book "Cowboy Ethics – What Wall Street Can Learn from the Code of the West" (which I have not read) and it goes like this:
- Live each day with courage.
- Take pride in your work.
- Always finish what you start.
- Do what has to be done.
- Be tough, but fair.
- When you make a promise, keep it.
- Ride for the brand.
- Talk less and say more.
- Remember that some things aren't for sale.
- Know where to draw the line.
Granted, this is from a business book, so of course it's going to be applicable to business, but I think it's especially applicable to web development, precisely because many web developers find themselves working in similar circumstances as the mythical cowboy: Alone or in a small team, wrangling very large projects with porous edges, and holding high level of both autonomy and responsibility.
So let's see if we can contextualize the Cowboy Code in terms of web development:
1. Live each day with courage
Building websites and apps means building and facilitating information exchange between people. You are giving people capabilities they otherwise would not have had. This in itself requires courage, but real courage comes into play any time you need to step up and represent the people affected by your work. Accessibility, privacy, user rights, etc are all vitally important issues often left to the web developer to manage, and each of us needs to find the courage to protect these rights even when that means delaying projects or going against the will of our employers and clients.
2. Take pride in your work
Working on projects you have no control over it can often feel like what you do doesn't matter or that you're just a cog in a large machine. This leads to boredom, apathy, and eventually burnout. Taking pride and ownership in your work is essential not only for you to be able to do your best work every day, but for you to care about your work and your contributions to the world. What we do matters to someone, otherwise we wouldn't be doing it. Finding that reason helps us realize why we should care, and that in term helps us discover the importance of our work. Which is something to be proud of.
3. Always finish what you start
In our house there's a floor board which was never properly painted. It's been like that for 8 years now. On the web, unpainted floorboards are pretty much the norm, and it results in rough edges and unexpected behavior. Because the web is a moving train and there's always a new project on the horizon, a new thing to learn, etc, it's easy to leave the finishes unfinished. This is a bad habit that over time has become a standard for us all. Finishing your work not only finishes the work - it also frees up space in your mind to think about other things because you don't have that nagging feeling that something has been left unfinished.
4. Do what has to be done
Stand up for yourself and your users. When your boss or client or team sidesteps accessibility or privacy or user rights or any other essential part of responsible and ethical web practice, do what has to be done: Stand up and speak truth to power. It is not easy to be the contrarian, but it is a vital role to ensure the web remains accessible and user-centric.
5. Be tough, but fair
When mistakes are made, it's easy to either ignore them or overreact depending on who made the mistake. Being tough - facing the problem head on and making firm and unwavering decisions - is crucial to move forward through adversity. Not being tough means decisions remain undecided and lingering and uncertainty starts creeping in. While being tough, it's also vital to be fair, to others and to yourself. Budgets and timelines are not always flexible, and we have to be fair about what is possible with the given constraints. Mistakes will happen, and everyone makes them. We have to be fair and graceful with others and ourselves and allow mistakes to happen without undue penalty so people don't start hiding their mistakes for fear of reprisal.
6. When you make a promise, keep it
Some things don't need further explanation, so I'll leave it at that.
7. Ride for the brand
Whether you're working for a company, contracting for someone, or working for yourself, every line of code you write, every decision you make represents you and your work. Do work that fairly represents you (and your employer) every day, no matter what.
8. Talk less and say more
Time is valuable, especially in our current attention economy. All the old adages around listening and speaking less while saying more apply now more than ever. With all the noise surrounding us, being the person that carefully collects and analyzes data and condenses it into shorter and more meaningful forms makes you the most valuable person in the room.
9. Remember that some things aren't for sale
In my talks about ethics in design and technology I say "there is always someone desperate, or confused, or misguided, or careless enough to do the unethical thing." Because our work often involves handling other people's information, interactions, and private exchanges, our integrity is a valuable commodity. Our employers and clients want to pay us for that integrity, and rivals and people with nefarious intentions will try coerce or steal it from us. Remembering that your integrity is not for sale, that your principles and ethics are more important than money and fame, is essential for us to build a healthy web for us and those who come after us.
10. Know where to draw the line
During a random conversation with a stranger standing in line at an airport waiting for a delayed flight, an executive from a healthcare company I'm not affiliated with asked me if I knew someone who could help him hide a data breach. Knowing where the line is and why it's there is important. Knowing when and where to draw your own lines maybe even more so. Bad decisions on our part can cause real people real harm, and we often won't even know. It is our responsibility as web practitioners to know where to draw the line and then draw it. I told the guy what he was asking for was a crime, and reported the company to the authorities. By that time, news of the breach had already broken, but I would not feel comfortable staying quiet about my conversation, because that's where I draw the line.
Coding to the Cowboy Code
It's been a while since I've heard the term "Cowboy Code" used about someone's work. Might be because it has fallen out of flavor, or because I'm not in environments where it would be used. What I am hearing more and more is talk of codes of ethics for coders, and here we have a lot to learn. The Cowboy Code, or Code of the West, or whatever you'd like to call it, is one example of how common sense learnings from other professions are directly applicable to our own craft.
--
Morten Rand-Hendriksen is a Senior Staff Instructor at LinkedIn Learning (formerly Lynda.com) focusing on front-end web development and the next generation of the web platform. He has worked with and contributed to open source projects large and small for the past 16 years and is a firm believer in ethical open source as the path forward for us all.
Love it!
The cowboy code sounds so much like the fresh produce industry that I've been involved in for a long time. Whether one says cowboy or cowgirl (please not cowperson), it does tend to attract a certain breed of people, so the cross-over is interesting to me.
Thanks, I just subscribed, but had to check, as I thought I was already subscribed, but that is sidebar.io, by the looks of it separated at birth?
idk this title evokes “bro” culture to me. I’m female and work in the web industry and dislike much of misogynistic terms.
Thanks Morten!