2 ms·
I find it more troubling that someone would think they needed any of these patterns to implement php sessions. What you fail to grasp was the code was so compl
by milesvp 9y ago
I find it more troubling that someone would think they needed any of these patterns to implement php sessions.
What you fail to grasp was the code was so completely unnecessarily complicated that it introduced a fuckton of subtle bugs that were difficult to track down. Things would look like they're working, and then reports of terribly broken behavior forcing an emergency rollback followed by days of trying to figure out what bullshit state things were in to repro the problem.
Worse, is so much of the code was some misguided attempt to future proof the code in ways that make no sense. When your code will never have more than a couple dozen simple sql queries you will never benefit from a polymorphic sql class intended to allow the swapping out of your sql backend with another vendor. It's easier just to rewrite that small piece of code when the time comes.
Just because you can implement fizzbuzz using a dozen design patterns doesn't mean the problem actually requires it.