Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can anyone recommend a good introduction to using state machines in code? Especially something in javascript/python? I know what an SM is and how it works, I just want to know how to use an SM library to actually do all these cool things.


A lot of the IBM Developer articles are apparently crap, but I found this one interesting and well done, some years ago.

The article date looks different, now, and IBM has redesigned the site since I originally read it, but I think -- at a glance -- that it's the same article.

http://www.ibm.com/developerworks/library/wa-finitemach1/

http://www.ibm.com/developerworks/web/library/wa-finitemach2...

http://www.ibm.com/developerworks/web/library/wa-finitemach3...


I have to think that somewhere around 2007 IBM started offering massive bonuses for writing site content and HOWTOs.


Your reply motivated me to look, and my vague recollection is correct: I exchanged a couple of brief emails with the author back in 2007, when the articles did indeed first come out.

However IBM did it, they were entered into some sort of site publishing schedule such that he'd lost track of just when they were coming out.

Seemed a nice enough fellow. From the articles and his bio, I imagine (perhaps incorrectly) his motivation was more pedagogical than remunerative.


There are other JS FSM libraries, but I ran into this one recently, which has an online demo:

The blogpost about it:

http://codeincomplete.com/posts/2011/8/19/javascript_state_m...

The online demo:

http://codeincomplete.com/posts/2011/8/19/javascript_state_m...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: