|
|
|
|
|
by steve_adams_86
1105 days ago
|
|
Early in my career I remember being really bothered by a guy who insisted we use a finite state machine for handling some stuff I’d already written and was pretty happy with. In my mind it was such overkill and he was being academically ostentatious or something. I now love having opportunities to lean on finite state machines because I’m more aware of how dumb my primate brain is and how helpful it is to have guard rails. So, multiple layers of dumb: I couldn’t figure out that this guy was smart enough to see how dumb we were in the context of the problem we were solving, and he was ultimately trying to save me from myself. This was around ten years ago. I’ve also been told I’m a great teacher, haha. Sealed. |
|
A bunch of mid-level devs on the team wanted to model our new thing as a state machine. But it dealt with a LOT of edge cases. Including real fun things like "that actually CAN be a valid state transition if Customer Service does it to manually resolve an issue caused by a previous bug or something, or just to make a customer happy, even."
I was the guy who eventually convinced them not to by illustrating just how many states and transitions this machine would actually have to have to do everything it needed to. A lot fewer people want to write thousand-node state machine descriptions than who want to write 20-node ones.
(How did I know that would happen? Because I'd previously been a mid-level engineer who jumped straight to "state machine!" for something and it added countless complexity and pain to the project. :D )