Complexity Is the Mind Killer
github.com
github.com
I know it's a bit of a hindsight thing, but the time to change the approach was when I was about to write script no 2. I should've invested a little bit of time into research and proper structure, but didn't. A bit of complexity saved me in later development...
Complexity is not planned, it is created though expediency. Devs use that database because they’ve done it before, they know how to use it, and they have a bunch of code segments to reuse. It gets them one step closer to solving the problem. An elegant solution, presumably some form of binary serialization, would require a learning how, and maybe rethinking objects to strip out cruft and make serializable state, and then coming up with an efficient access pattern. All these things are nice elegant composable tools available somewhere, but not at the top of mind like MySQL, which you’ve been using since your first programming course.
I’ve been doing a lot of work with C++20 templates recently. The simplicity and reasonability benefits can be enormous, but the time it takes to learn, design, and craft them is completely oblivious to the person reviewing the code, if it ever gets reviewed at all. In a corporate setting, the only thing anybody sees is lines of code. Remote work has strengthened this anti-pattern. Nobody sees the time or diligence with which you craft solutions. Elegance looks like nothing.
On refactor though... sometimes it's not about 'prettier' it's about being able to be maintained.