menu

Statecharts

Statecharts are a precise, visual way of modeling the behaviour of complex reactive systems. They describe how things work, and can help you get your code doing exactly what you want.

Channels
Team

Using FizzBuzz to explain guards, internal events, etc.

July 26, 2018 at 10:10pm

Using FizzBuzz to explain guards, internal events, etc.

July 26, 2018 at 10:10pm

I just completed (and linked up) the second FizzBuzz adventure.

https://statecharts.github.io/fizzbuzz-actions-internal-events.html

The main difference from "part 1" is that it splits the problem itself up into four separate problems (fizz, buzz, fizzbuzz, digit) and solves each one on their own, using internal events to coordinate between them.

If you want to get an understanding of how parallel states can be misused, and learn how automatic transitions, and in guards can work together, then give it a read. It's full of illustrations and 5 codepens showing the solution as it unfolds.


July 27, 2018 at 9:12am
🙌
like-fill
2
  • reply
  • like

July 30, 2018 at 7:27pm

I really enjoyed reading this chapter. Even though it's contrived, it seems to be a great way to dive into the more powerful concepts of statecharts. I know I learned some tricks.

like-fill
1
  • reply
  • like

Thanks @christianhg. Day. Made!

  • reply
  • like

This is really really good 👍

like-fill
1
  • reply
  • like