4 ms·
JS aside, I recently tried my very best to introduce proper logging and error handling to otherwise "look ma, no handlebars" codebase. Call it a thought experi
by zeroq 1y ago
JS aside, I recently tried my very best to introduce proper logging and error handling to otherwise "look ma, no handlebars" codebase.
Call it a thought experiment. We start with a clean implementation that satisfies requirements. It makes a bold assumption that every star in the universe will align to help us achieve to goal.
Now we add logging and error handling.
Despite my best intentions and years of experience, starting with clean code, the outcome was a complete mess.
It brings back memories when in 2006 I was implementing deep linking for Wikia. I started with a "true to the documention" implemention which was roughly 10 lines of code. After handling all edge cases and browser incompatibilites I ended up with a whooping 400 lines.
Doing exactly the same as the original lines did, but cross compatible.
- 01HNNWZ0MV43FF 1y agoHandlebars like on a bike, or like the templating language?
- RadiozRadioz 1y agoThey mean the bike analogy
- dullcrisp 1y agoI guess I’ll ask, did you try using exceptions?
- 9rx 1y ago> We start with a clean implementation that satisfies requirements ... Now we add logging and error handling. If error handling and logging isn't necessary to satisfy requirements, why bother with them at all?