RRU 079: State Machines and State Charts with Farzad Yousef Zadeh
React Round Up17 Syys 2019

RRU 079: State Machines and State Charts with Farzad Yousef Zadeh

Episode Summary Today’s guest is Farzad Yousef Zadeh, a developer from Iran with a unique path into computer programming. He started by studying astrophysics and aerospace engineering in college, then dropped out in his last semester because it wasn’t the right path. He then taught himself to code, working mostly in web programming and frontend development. Despite his change in course, Farzad remains passionate about observing the night sky. Farzad is here today to talk about the ideas in his talk Explicitness and Consistency in UI, where he talks about the difficulties of developing a user interface and how the experience can be improved by using state machines and state charts. He talks about his inspiration for the talk and how he has implemented state machines and state charts into his work. The panel backtracks and talks about the definition of state machines and state charts. A state machine, from an academic background, is a model for computing something. It's for managing and controlling, taking over branching and managing a finite amount of state declaratively. State machines are not so much about sharing or reusing, but about how your communicate a certain behavior. Despite the fact that event driven programming permeates the programming consciousness, thinking about state charts and state machines is actually more natural than it first appears. The panel explains how it’s the same principle as whiteboarding to solve a problem. Lucas asks how state charts are different from pure React. Farzad talks about how it’s important not to just treat your static states as first class, but also the transitions between them. Otherwise, you would end up with something that looks like a map with cities and towns, but no roads. Using statecharts and state machines makes testing an application much easier, and in some ways you let the machine test itself. The machine will know what to do with your states because you define the path, and the machine will take the path for you. They again talk about the difference between state machines and state charts. A state machine defines a finite set of states and defining the events that the machine can take and respond to when transitioning from state A to B. If you use only this, you will encounter a snag called ‘state explosion’ because not non-concrete things cannot be modeled. So, state charts were invented to compensate for this. A state chart brings the idea of an extended state, or the context and data you need to hold and reason from. Farzad talks about other types of machines and supports that exist for branching, entry actions, and exit actions. This is similar to the use effect hook in React. He gives examples of where you would use this logic and how it would be worked into frameworks. Farzad talks about how your machine is just a definition, a declarative model of how something is supposed to behave, and how having that separation between the definition of the logic and behavior vs the implementation of API has given us so much more freedom and portability The panel talks about how using state machines and charts is an investment in the long term maintainability of your code. They agree that using state machines and charts makes it easier to communicate with other developers, new team members, and even non developers. They talk about Cerebral.js and its contributions and model. As with everything in programming, state machines are not a silver bullet and don’t work in every situation. Farzad talks about situations where state machines can be unhelpful. It is still valuable to consider state machines and charts because it forces you to dedicate time thinking and organizing your thoughts so that you can build something maintainable that won’t just be thrown away. The panel discusses how thinking things out before starting to code can be beneficial. They finish by talking about how React Hooks has started them on the path to implement state machines and charts into their code. Panelists
  • David Ceddia
  • Lucas Reis
  • Leslie Cohn-Wein
  • Thomas Aylott
With special guest: Farzad Yousef Zadeh Sponsors Links Follow DevChatTV on Facebook and Twitter Picks David Ceddia: Thomas Aylott: Lucas Reis: Leslie Cohn-Wein: Farzad Yousef Zadeh: Special Guest: Farzad Yousef Zadeh.

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/react-round-up--6102072/support.

Jaksot(310)

RRU 006: Setting Up and Getting Used to Gatsby with Aman Mittal

RRU 006: Setting Up and Getting Used to Gatsby with Aman Mittal

Panel: Charles Max WoodCory HouseTara ManicsicKent C Dodds Special Guests: Aman Mittal In this episode of React Round Up, the panel discuss setting up and getting used to Gatsby with Aman Mittal. ...

10 Huhti 201845min

RRU 005: Prisma and GraphCool with Nikolas Burk

RRU 005: Prisma and GraphCool with Nikolas Burk

Panel: Charles Max WoodTara ManicsicKent C DoddsNader Dabit Special Guests: Nikolas Burk In this episode of React Round Up, the panel discusses Prisma and GraphCool with Nikolas Burk. Nikolas work...

3 Huhti 20181h 1min

RRU 004: Redux-Bundler with Henrik Joreteg

RRU 004: Redux-Bundler with Henrik Joreteg

Panel: Charles Max WoodTara ManicsicKent C Dodds Special Guests: Henrik Joreteg In this episode of React Round Up, the panel discusses redux-bundler with Henrik Joreteg. Henrik spoke at the first ...

27 Maalis 20181h 8min

RRU 003: Advanced Component Patterns and Downshift with Kent C Dodds

RRU 003: Advanced Component Patterns and Downshift with Kent C Dodds

Panel: Charles Max WoodNader DabitKent C DoddsCory House In this episode of React Round Up, the panel discusses advanced component patterns and Downshift. They talk about different component patter...

20 Maalis 20181h 4min

RRU 002: Webpack the Good Parts with Juho Vepsäläinen

RRU 002: Webpack the Good Parts with Juho Vepsäläinen

Panel: Charles Max WoodNader DabitCory House Special Guests: Juho Vepsäläinen In this episode of React Round Up, the panel discusses Webpack the good parts with Juho Vepsäläinen. He talks a lot ab...

13 Maalis 201853min

RRU 001: Getting Started with React

RRU 001: Getting Started with React

Panel:  Charles Max Wood Tara Manicsic Nader Dabit Kent C. Dodds Cory House Special Guests: None In this episode of React Round Up, the panel discusses how they each got into React and they pro...

6 Maalis 20181h 8min

Suosittua kategoriassa Liike-elämä ja talous

sijotuskasti
mimmit-sijoittaa
psykopodiaa-podcast
rss-rahapodi
rss-rahamania
herrasmieshakkerit
ostan-asuntoja-podcast
rss-lahtijat
rss-sami-miettinen-neuvottelija
rahapuhetta
rss-sisalto-kuntoon
inderespodi
leadcast
rss-laakispodi
rss-seuraava-potilas
timanttia-hiomassa
rss-juurisyy-johtamisesta-kilpailuetua
rss-vaikuttavan-opettajan-vierella
rss-porssipodi
rss-johtoajatuksia