News for hackers. Stuff that matters.
Re:UI = F(statesⁿ) by wonger_ on Friday February 16, 2024 @10:19PM (#39406024)
I agree: take the time to learn about state machines.

I remember the first time hearing about them and being totally confused by the wikipedia page. I think the first article that made sense to me was this one, because it used a webapp example: https://www.infoq.com/articles/robust-user-interfaces-with-s...

And then developing a few sample applications, especially with Elm or another language with custom types, really completed my understanding. The diagrams and math notation are more intimidating than the actual code.

Re:UI = F(statesⁿ) by ape_key on Friday February 16, 2024 @11:15PM (#39406307)
Nah, diagrammatic reasoning is part of it. Separate yourself from syntax.

Doodling on paper (or just mentally envisioning a data structure) is way more fun than writing actual code.

I certainly would dissuade the OP from trying Elm. Not as part of learning state machines at least. Too many things at once and not necessary.

Re:UI = F(statesⁿ) by solardev on Saturday February 17, 2024 @02:56AM (#39407392)
Thanks for sharing that link! I've tried reading about them in the past and always walked away more confused, but this article seems more readable. I'll give it a thorough read this weekend. Thank you!