Once a year, without exception, I go through a depressive mood about the state of the codebase and bemoan the crazy hiring environment Last Minute Gear exists in (a story for another day).
This year, a friend echoed the same sentiment that my mother does on a much more frequent basis (but probably not with my mom’s same level of frustration of anxiety) — how do you have so much code to write, what’s so hard about what you’re doing, why do you have to keep coding, why can’t you reach an equilibrium state?
The immediate answer is that success favors those who don’t rest on their laurels, especially given Last Minute Gear’s ambition to compete against retail, which is continually redefining itself and improving in a capitalistic mission to sell more stuff. With things like Amazon Prime Now and Amazon Go, how can we compete unless we have something at least as good?
The deeper answer is one I realized earlier this year, but failed to put on paper at the time. Code suffers from scope creep for the same reason that everything else does — exceptions***. See, if I were building the flow that works in 80% of cases, I would have been done several times over and never have to change things ever again (at least on the back end). But for those pesky exceptions.
To borrow from the classic intro-to-coding-exercise-for-non-coders, write out the instructions for how you brush your teeth…
1) Remove cap
2) Squeeze toothpaste onto toothbrush
(Of course, the answer, what the classic example is designed to teach, is that even in a linear fashion, there are many many more steps that our minds automatically resolve for us).
But what if there’s no cap? What if the cap is a flip-top vs a twist-off? What if the toothpaste tube is nearing end and can’t be squeezed? A litany of exceptions emerge from just the first two steps!
That’s how code grows. It’s exponential, so that when you have a “simple” user checkout flow of ~10 steps (Last Minute Gear’s most basic flow), you have to catch a hundred exceptions for every combination of ways that a user might go back, and forward, and back again, and click around.
Of course, a good developer writes code that is flexible to deal with different permutations, but any code that deals with any permutation outside the ordinary is still bulkier than code that is only written to deal with the ordinary.
Which is why when you ask me, is there really a full-time-job’s worth of development work at Last Minute Gear? Yes!
I blog about life & work on my entrepreneurial journey. We’re building the best outdoor gear shop at Last Minute Gear!
***Unfortunately, in my opinion, code errors feel less forgivable than in other professions that suffer from scope creep from exceptions handling (every legal contract ever). Maybe in Silicon Valley where people are start-up friendly, that’s less the case. But even so, I feel like people would panic more about entering sensitive info into a website and seeing an error, than doing so in paper form. I’ve keenly noticed that I’m personally less forgiving of grammatical errors on websites than I am offline.