Once upon this morning
This morning, for the first time in a while, I cycled to work. It had been a few weeks since the last time cut between flights and also believing my bike pump didn’t work. I started cycling candidly when I noticed something strange but not unusual. The seat was moving a bit but nothing alarming. A little risk never killed anyone. I kept going for a good seven maybe eight minutes. This seat didn’t move all along so I felt fairly safe. I kept cycling, taking turns after straight lines and vice versa. At some point, the seat started moving again and came off.
Luckily, at that point, I had an empty road for myself. You know these small pathways you walk through gleefully in the morning if walking is your thing. I stopped. Then, I looked at the bike and decided to try and fix it on the spot without tools. At least the wrong ones. My own hands. I positioned the seat back on its spot, then readjusted the screw. From there, I thought I can probably tighten it enough so I can reach a shop on my way and cycle to it.
This is when I remembered that one time I cycled from Leicester Square where the same thing happened under crazy rain. That time the odds were in my favour, I made it all the way home cycling for twenty-ish minutes. Not today, today was gonna be different, but I didn’t know that. How could I? In my past experience, the one time I faced a similar situation I got away with it.
The risk increases then goes away
Back to today, after screwing my seat back, I continued my ride. About five minutes later, at the red light between Great Dover street and Borough High street, the light turned green. As I press the pedal the seat comes off just enough to think: “This was at the moment JD knew, he fucked up”. Luckily for me, the cars behind me let me get off the bike and walk to the side. As it should be in a civilised country.
From there I did what I should have done from the start. I texted work to say I would not make it to that standup call and I walked to the bike shop. It took me about ten minutes. I bought a Y wrench and fixed my seat on the spot. About twenty minutes later I was at my desk enjoying some oats with crunchy peanut butter and banana ready to start the day.
Where is the software in this?
But what does this have to do with software? I hear you say. Well, we are a reckless species. We tend to take chances and shortcuts because of an instant gain. In this story, thirty minutes is poor if the biggest risk is death. I got lucky, despite by three times, failing to recognize I took an imbalanced risk.
One can do the same writing software, not writing tests may seem like a gain of time, it always does. For sure, you will get away with it and it will build as part of your experience that you can live without tests. But someday, that bug-shaped car will hit you in a way you can’t imagine. Will you be lucky enough to stand back up? Probably, letting a bug through isn’t as damaging to your career as death. Well, that works unless that bug loses your company money and/or reputation big time.
As said in a previous post, taking risk is part of life. Heck, it even is something that allows you sometimes to discover beautiful things like that you enjoy jetski or podcasting. But not writing tests is just lazy and leaves you open to writing smelly code. The lack of tests prevents from cleaning the code without risk. You can hardly gain deeper insight. This will make you slow to deliver software with fresh features. You will most likely become a living bug machine. Nobody wants that.