Being a founding engineer has been a wild ride. I have learnt a lot over the last year and a lot of generic advice/quotes seem to make sense, one way or the other. But one stands out, ie: Murphy’s Law.
According to wikipedia:
Though similar statements and concepts have been made over the course of history, the law itself was coined by, and is named after, American aerospace engineer Edward A. Murphy Jr.; its exact origins are debated, but it is generally agreed it originated from Murphy and his team following a mishap during rocket sled tests some time between 1948 and 1949, and was finalized and first popularized by testing project head John Stapp during a later press conference.
Murphy's original quote was the precautionary design advice that
If there are two or more ways to do something and one of those results in a catastrophe, then someone will do it that way.
This design advice is solid. The only problem, there are way too many ways to do anything now days, espcially on the internet. It’s almost impossible to keep a tab on it.
For eg: We have a multi-file upload in one of our creation flows. We tested it thoroughly(atleast we thought we did), tried all variations of it. One day, a user tries to upload a simple image and it fails! Turns out the user was using Safari in incognito mode, that needs proper handling for drag and drop case :)
What’s the right way to tackle this? Write tests? Have a UI testing framework? Use popular libraries that will hopefully cover most cases? … The list goes on.
There is no one right answer. There are multiple things you can do, given the amount of time you have and make the right tradeoff. But i think instead of manually implementing it, the right choice would have been to go with a popular and Well-maintained library.
One this note, these 2 quotes come to mind:
The best code is no code at all. Every new line of code you willingly bring into the world is code that has to be debugged, code that has to be read and understood, code that has to be supported. Every time you write new code, you should do so reluctantly, under duress, because you completely exhausted all your other options. - Jeff Atwood
and
The fastest code is the code which does not run. The code easiest to maintain is the code that was never written. - Robert Galanakis
Everyone wants to be a 10x engineer. Build their own stuff, do whacky things, just make sure that the 0.1x engineer inside you doesn’t die :)