I did both EE and CS undergrad (we didn't have Computer Engineering at the time). In EE we started talking about FSMs very early on, in quite a bit of depth. In CS though, we didn't really talk about them until the Computability course in 3rd or 4th year, and even then it was in the very theoretical Finite Automata sense; applying FSMs to software design wasn't really a thing that was ever covered.
From the EE material, I started loosely applying those concepts to software design, but it wasn't until my first job in industry where I was lucky enough to be exposed to a system that was very deliberately designed as a system of FSMs.
We based the design of ours off of a pretty famous paper, whose name is entirely escaping me at the moment. Damn.
http://www.wisdom.weizmann.ac.il/~harel/SCANNED.PAPERS/Visua...
I'm curious to know what famous paper it is so that I can go and read it!
I emailed the mentor who first introduced me to it to see if he remembers what it was called. Watch this space!
I think the only course where I explicitly designed programs using state machines was compilers (other than writing things to simulate state machines in my theory courses).
> Another in the series "Show HN what is it that people
> actually learn in their first two years of undegrad CS"
This is my entire technical blogging output from 2004-2018. Combinatorial logic, surreal numbers, function-oriented programming, everything.So there's learning about state machines in that context and then there's learning about state machines by actually building them in complex pieces of software, or replacing spaghetti code with FSMs. That's when I personally realized how valuable they are.
That is something I never learned in school - and something I learned throughout a career of experimenting, making mistakes, reading from books like http://gameprogrammingpatterns.com, learning from peers, and reading articles like this.
There's CS and there are coding jobs. And sometimes they don't overlap...
Finite state machines as used to accomplish practical computing tasks other than grammar recognition were something I didn't see at all in undergrad CS (with the very slight exception of networking where we did see a state diagram for TCP).
(Also, I did my CS undergrad at UC Berkeley and I don't recall ever studying state machines. All the useful engineering bits and design patterns I picked up after getting my first job.)
Thankfully I enjoyed screwing around with game programming, and picked up Matt Buckland's Programming Game AI by Example[1]. I've used essentially the same FSM design described there over and over in my career.