i-hate-state-machines
i-hate-state-machines
Finite State Machines Sux
28 posts
Make The Right Choice: Say No To Deterministic, Sequential Evaluations Of State!This is a gimmick blog
Don't wanna be here? Send us removal request.
i-hate-state-machines · 3 months ago
Text
Tumblr media
the finite state machine will never betray you
23 notes · View notes
i-hate-state-machines · 8 months ago
Text
I ran out of jokes, so, uh. I'm just gonna write programming thoughts here now and continue the bit when it comes up.
I'm a massive shill for procedural programming - I think breaking a program up into data types and things you do to those types makes the most sense - but there's one thing I do miss about OOP: interfaces and the specific flavor of polymorphism (and composition) they brought to the table.
I know polymorphism is largely a mark against OOP. But, really, the ability to switch data types out by just implementing another that uses the same interface? It's so nice and I miss it so much!
3 notes · View notes
i-hate-state-machines · 9 months ago
Text
using c++ as a math person is hilarious because nothing i've made in the last five years has required anything more complicated than the most unga of bunga c-style programming and trying to use "modern" c++ either breaks everything or turns a simple problem into an overengineered disaster, to my perennial chagrin
11 notes · View notes
i-hate-state-machines · 9 months ago
Text
"O cursed state, thou dost expand and grow,
With every branch, thy form doth chaos breed.
What once was swift, now doth move so slow,
In tangled webs, thy folly does succeed."
- Obama or smth
0 notes
i-hate-state-machines · 9 months ago
Text
class StateMachine:
def __init__(self):
self.state = "idle"
def transition(self, event):
match (self.state, event):
case ("idle", "delete_os"):
self.state = "deleting_os"
print("Initiating OS deletion...")
self.state = "error"
case ("deleting_os", _):
print("you forgot to implememt an error state you idiot")
case ("error", _):
print("Congrats, you've achieved nothing.")
case _:
print("No valid transitions from current state.")
sm = StateMachine()
sm.transition("delete_os")
sm.transition("confirm_delete")
1 note · View note
i-hate-state-machines · 9 months ago
Text
class EventDrivenSystem:
def __init__(self):
self.events = []
def trigger_event(self, event):
self.events.append(event)
self.process_events()
def process_events(self):
while self.events:
event = self.events.pop(0)
if event == "delete_python":
self.delete_python()
def delete_python(self):
print("Deleting Python... Yeah, probably for the best.")
eds = EventDrivenSystem()
eds.trigger_event("delete_python")
0 notes
i-hate-state-machines · 9 months ago
Text
Give a monkey a typewriter, and eventually, they'll write Shakespeare. Give a monkey a state machine, and eventually, they'll write... more state transitions.
...That was a stronger diss in my head.
1 note · View note
i-hate-state-machines · 9 months ago
Text
State Machines:
There once was a code full of states,
That slowed every process it mates,
It cluttered the stack,
With no turning back,
Now performance is sealed to its fate!
2 notes · View notes
i-hate-state-machines · 9 months ago
Text
Let me tell you something, folks—this so-called event-driven architecture? It’s a disaster. A complete and utter disaster. And let’s be clear here—this isn’t about coding or whatever nerdy stuff they’re talking about. No, no, no! This is about our buildings.
They want to replace solid, dependable structures with events? Events! What does that even mean?! Are we just supposed to live in some kind of floating structure made of webinars and launch parties? It’s insane! Where’s the foundation? Where’s the concrete? I don’t know about you, but I don’t trust any architecture where everything’s just reacting to events!
This is the problem with the tech elites—they think they can throw around big fancy words like ‘architecture’ and ‘event-driven’ and we won’t notice. But I’m here to tell you—I notice. And I say no! No to flimsy, event-based buildings! I want real walls, real roofs, and not some click-to-join nonsense masquerading as ‘structure’!
1 note · View note
i-hate-state-machines · 9 months ago
Text
My fellow coders, hardworking citizens of the digital world, I stand before you today to sound the alarm on a dangerous trend threatening our livelihoods. A menace, creeping into our systems, into our codebases, into our very jobs. That menace, folks, is none other than the state machine!
You see, state machines – these complex contraptions, these so-called ‘tools’ – are out here replacing good, honest programming labor. I mean, think about it! Back in the day, when something needed doing, a programmer would sit down, write out a simple, clear sequence of instructions, and get the job done with elbow grease, logic, and a little sweat. But now? These fancy state machines, with their transitions, their conditions, their ‘states’ – what’s next? Letting robots code for us? Where does it end?!
State machines aren’t just destroying clean, procedural code; no, no, no. They’re putting honest programmers out of work. And why? Because apparently, businesses want efficiency. Efficiency! Like that’s more important than giving people jobs! More important than ensuring developers stay bogged down in endless decision trees and convoluted loops, where their skills can really shine!
Back in my day, we didn’t have all these ‘non-deterministic automata’ hogwash. No, sir! If we wanted to transition from one thing to another, we called a function and dealt with the consequences like reasonable adults. But today, these machines are out here with their states and their transitions, doing the work of entire departments! It’s madness!
So I say, enough is enough! Let’s take a stand for the working coder, for simple, clean code, for the good ol' days where we didn’t need diagrams just to understand how our programs flow. The state machine is a job killer, folks, and we need to stop it before we all "transition" into the unemployment state!
Thank you, and together may we print("Hello New World")!
2 notes · View notes
i-hate-state-machines · 9 months ago
Text
State machines handling concurrency is like juggling with one hand tied - you're bound to drop the ball every time.
6 notes · View notes
i-hate-state-machines · 9 months ago
Text
Nothing screams 'efficient coding' like a state machine hogging memory with more transitions than a soap opera—because who doesn't love trading performance for a tangled mess no one can debug?
15 notes · View notes
i-hate-state-machines · 9 months ago
Text
State machines: when you just need a way to give an 'if' statement a full-blown midlife crisis.
2 notes · View notes
i-hate-state-machines · 9 months ago
Text
This is my oc EDA she is the best programming architecture waifu around much better than FSM Statist DNI
Tumblr media
shes a cyborg and runs off of her own event driven architecture that she wrote in C (don't ask how she wrote her own architecture) and listens to soundscapes written exclusively from recordings of deep space and smells like lubricant oil and has big natur-
3 notes · View notes
i-hate-state-machines · 9 months ago
Text
Object-oriented programming and state machines: because nothing says 'efficient design' like bundling your code with so many states, even Schrödinger's cat would be confused.
1 note · View note
i-hate-state-machines · 9 months ago
Text
Python is such a cool name for something that’s actually terrible and mean
9 notes · View notes
i-hate-state-machines · 9 months ago
Text
Using a state machine for anything greater than a programming example quickly reveals it's like making a plan foreach breath you take - tedious, unnecessary, and bound to suffocate you once you realize you also need to walk
4 notes · View notes