RRU 079: State Machines and State Charts with Farzad Yousef Zadeh
React Round Up17 Sep 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.

Avsnitt(310)

Exploring Micro Frontend Architecture with Florian Rappel - RRU 283

Exploring Micro Frontend Architecture with Florian Rappel - RRU 283

Welcome to React Roundup, the podcast where we keep you updated on all things React related! In today's episode, we have an enlightening discussion featuring Paige Nedringhaus as host, our panelist TJ...

24 Jan 202553min

React Component Tests for Humans with Miroslav Nikolov - RRU 282

React Component Tests for Humans with Miroslav Nikolov - RRU 282

On this episode of React Round Up we chatted with Miroslav Nikolov, a UI developer at one.com, about his approach to unit testing React components. Miroslav discussed writing components in a human-fri...

8 Jan 202539min

Run NextJS and Node in the Browser ft. Eric Simons - RRU 281

Run NextJS and Node in the Browser ft. Eric Simons - RRU 281

Eric Simons joins the round-up to discuss the latest advancements made by StackBlitz that enables you to run NodeJS in the browser. Eric expands that to the work they've done with the NextJS team to r...

1 Jan 202547min

All Things Voice Recognition and JavaScript with Ian Lavery - RRU 280

All Things Voice Recognition and JavaScript with Ian Lavery - RRU 280

Returning guest, Ian Lavery from Picovice.ai, joins the hosts to talk all things voice recognition. He dives into new languages the company has tackled over the last year (and what languages it plans ...

25 Dec 202445min

React Ecosystem: Libraries, Tools, and Third-Party Integrations - RRU 279

React Ecosystem: Libraries, Tools, and Third-Party Integrations - RRU 279

In today's episode, Lucas and Peter dive deep into the world of front-end frameworks with a captivating discussion featuring PRANTA Dutta, a seasoned React Native developer. Pranta shares his journey ...

18 Dec 202454min

Error Reporting and Bug Monitoring with James Smith - RRU 278

Error Reporting and Bug Monitoring with James Smith - RRU 278

In this episode of React Round Up we chatted with James Smith from Bugsnag. We talked about the importance of error monitoring and reporting, and how to actually implement those workflows in your prod...

11 Dec 202444min

How to Structure Your React Projects - RRU 277

How to Structure Your React Projects - RRU 277

Akash Joshi Is a frequent blogger across many of the larger blogs across the internet.He joins the Round Up to share his opinions on how you should put your React applications together as well as some...

4 Dec 202435min

Building Component Libraries with Kathryn Grayson Nanz - RRU 276

Building Component Libraries with Kathryn Grayson Nanz - RRU 276

Senior Frontend Engineer Kathryn Grayson Nanz joins the React Round Up team to talk about all things component libraries. Kathryn shares her experiences building not one but two component libraries, a...

27 Nov 202448min

Populärt inom Business & ekonomi

badfluence
framgangspodden
rss-jossan-nina
varvet
uppgang-och-fall
rss-borsens-finest
avanzapodden
bathina-en-podcast
svd-tech-brief
fill-or-kill
rss-inga-dumma-fragor-om-pengar
24fragor
rss-kort-lang-analyspodden-fran-di
lastbilspodden
rss-dagen-med-di
rss-den-nya-ekonomin
borsmorgon
dynastin
kapitalet-en-podd-om-ekonomi
market-makers