Ask A Question

Notifications

You’re not receiving notifications from this thread.

The State_Machine Gem Discussion

Discussion for The State_Machine Gem
Innokenty Longway Innokenty Longway

Awesome! Chris, this is very useful. Thank you.

Reply

You're welcome! :)

Reply
Ganesh Kunwar Ganesh Kunwar

Thanks Chris for your useful Screencasts video. This is very useful.

Reply

thanks Chris for this info, very useful.

Reply

This was really good I love hearing/learning/ finding out about these little things that I dont think about or know about yet being a fresh programmer. From an experienced programmer, what would maybe be a cool app to make to help with practicing this even if it was just in one ruby file.

I think coming up with a simple 'idea' or 'game' to build to practice the idea comes so hard so that would be helpfull thanks man for all your services!

Reply

A crazy in-depth example is this for video games: http://jessewarden.com/2012...

They are a fantastic use case for state machines because you've got to keep track of so many things when it comes to power ups. Take just the ghosts in pacman for example: http://oddwiring.com/archiv...

I would say that if you want to try this out, try building a soda machine where you type in the various coins you put into the machine and it counts up and dispenses the soda (and change) once you've hit the correct price. You can just write these events out as strings into the console and that would be a good first experience with it.

Reply

I think https://github.com/state-ma... is the latest version for rails. Why don't you use it?

Reply

I think you are right! I have just not used the gem that often since the last time and this wasn't available then. It does seem to be a community supported version that is the most up to date. Thanks for sharing!

Reply

Hi Chris! Would it be possible to do more videos on state machines in regard to multiple conditions for each event and also something on views? Thanks a bunch!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.