News for hackers. Stuff that matters.
Re:How I Learned to Stop Worrying and Love the State Machine by mephitix on Monday February 26, 2018 @05:38PM (#16469636)
Building a game is a probably the best way to learn and apply state machines since a lot of it is all about how to manage state effectively since there are so many pieces of state and interactions between them.

Also, since Bob is too humble to say it - http://gameprogrammingpatterns.com is an amazing architecture resource for programmers in all disciplines, not just gamedevs.

He's got another book called http://craftinginterpreters.com/ that I've been eager to check out.

Re:How I Learned to Stop Worrying and Love the State Machine by w0utert on Tuesday February 27, 2018 @10:10AM (#16473958)
Game programming is probably the best way to learn to program many, many kinds of things ;-)

On the topic of state machines, I totally agree with the observation that games are a prime example of their usefulness. I've been working on and off on a relatively simple game that uses a Lua scripting backend to implement the game logic, and over time I've been refactoring this particular part many times, slowly converging to a solution resembling an event driven state machine implemented using reactive programming techniques. It's very interesting to see how even a very simple game already forces you to either apply concepts like state machines, events, etc, or end up with horrible crappy code that is hard to debug and not fun to work on.

Re:How I Learned to Stop Worrying and Love the State Machine by turboladen on Tuesday February 27, 2018 @01:59AM (#16471586)
Crafting interpreters is great!
Re:How I Learned to Stop Worrying and Love the State Machine by munificent on Tuesday February 27, 2018 @01:52PM (#16476605)
\o/