Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Make Illegal States Unrepresentable - Techniques for Safer Code Design

Code Sync via YouTube

Overview

Explore techniques for making illegal states unrepresentable in software development through this conference talk from Lambda Days 2022. Learn how to write more comprehensible code, reduce bugs, and minimize testing requirements using strongly-typed functional programming approaches. Discover beginner-friendly methods to apply these concepts to your own projects, improving code quality and system reliability. Examine real-world examples, including financial systems and coffee ordering scenarios, to understand how to model complex processes while eliminating impossible states. Gain insights into algebraic data types, required dependencies, and declarative coding practices that lead to safer refactoring and easier-to-maintain codebases.

Syllabus

Introduction
What went wrong
Outline
Financial System
State
Single State
Illegal States
Diagram
Representation
Impossible
The Ideal
Can you do it
Do something else
People really like coffee
Coffee is very complicated
Programming a robot
Ordering coffee
Ordering Irish coffee
What is the issue
Espresso
Other Illegal States
Why
Irish Coffee
algebraic data types
required dependencies
no exceptions
algebraic datatypes
not a magical solution
another scenario
tasty ratio
legal states
invariants
examples
more examples
brewing coffee
model brewing
desiredstatespace
imperative interface
adding expectations
implementing prep flow
type parameters
declarative code
easier to comprehend
potential bugs
fewer tests
safer refactoring
parallel refactoring
statespace
techniques
next steps
resources
bug
question

Taught by

Code Sync

Reviews

Start your review of Make Illegal States Unrepresentable - Techniques for Safer Code Design

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.