Good videos, with context.
"Making Impossible States Impossible" by Richard Feldman

"Making Impossible States Impossible" by Richard Feldman

elm-conf
9 HN recommenders · discussed 2017–2026
Open YouTube ↗

About this video

Richard Feldman's elm-conf talk on designing models so that bugs from impossible application states cannot occur, using Elm's compiler and types. It demonstrates techniques for making invalid states unrepresentable.

Why it appears in the archive

HN repeatedly recommends it as a talk that changed how people model data, with ideas that apply well beyond Elm to any typed language.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

joshuahornby · 2018-01 · strong rec

"Making Impossible States Impossible" by Richard Feldman [VIDEO] Really changed how I think about programming.

Read original comment ↗
jasim · 2018-09 · strong rec

The type system is a lot more expressive than the ones found in Java/C#/C++, thanks to Algebraic Data Types. Yaron Minsky (Jane Street, largest OCaml user) coined the term "make invalid states unrepresentable" to explain how ADTs help in enlisting the help of the compiler to help us express our intent correctly, and Richard Feldman (NoRedInk, largest Elm user) has given an absolute gem of a talk that dives into that idea with relatable, concrete examples. It is titled "Making Impossible States Impossible" and should clarify this concept nicely. [VIDEO]

Read original comment ↗
kilian · 2018-10 · strong rec

Making impossible states impossible" by Richard Feldman: [VIDEO] has really changed the way I approach dealing with data in my code and was very insightful.

Read original comment ↗
terminatornet · 2023-05 · strong rec

highly recommend the talks "making impossible states impossible" and "make data structures" by richard feldman. [VIDEO] [LINK] the talks are geared towards elm but I think they offer some great advice applicable to programming in general.

Read original comment ↗
terminatornet · 2024-04 · strong rec

one of my favorite talks on this topic, "Making Impossible States Impossible" by Richard Feldman: [VIDEO] the talk is Elm lang focused, but the concepts still apply to other languages.

Read original comment ↗
aczerepinski · 2017-09 · rec

There's a great talk on this subject by Richard Feldman from Elm Conf. I haven't used typescript so I'm not sure if the techniques translate well. [VIDEO]

Read original comment ↗
jasim · 2017-12 · rec

There is no escaping the mapping. It doesn't matter if it is Reason or PureScript, Elm, or Fable - you have to parse the incoming data into a static type if you want to enjoy the benefits of types. The good thing is that you can build the rest of your system with a firm guarantee on the shape and structure of the data. No null checks, no missing keys. If you are careful with your parsing you can raise exceptions or return None if the incoming data is not well-formed (missing keys or even extra keys). Reason/BuckleScript when run on a Javascript runtime also has a `Js.t` type which is basically the Javascript object. You do have to define the shape of it similar to how you'd define a record type, but you don't need to convert it into a native record. JS arrays are also natively supported - it maps 1:1 to BuckleScript's array. I like to convert arrays into lists since they are better suited for value-based programming (pattern-matching over [head, ...tail] inside recursive functions). And if you create your types in a way that invalid states are impossible, you've just reduced the cognitive load needed to work on the system for the rest of its life by an order of magnitude. Here are some resources on this wonderful programming technique: - [LINK] - [VIDEO] - [LINK] - [LINK]

Read original comment ↗
jasim · 2018-11 · rec

That'll be a great addition to the book. Can I also recommend Yaron Minsky's talk on OCaml, specifically the part where he talks about "making invalid states impossible": [LINK] I've found this to be the single most valuable programming technique I've learnt. Richard Feldman dives deeper into the topic with a lot more examples in [VIDEO]

Read original comment ↗