~/talk

Preventing Bugs with Better Types - An Intro to Type Driven Design

slides:none on file

Shows concrete TypeScript and C#-friendly patterns: replace loose strings with enums and a Measurement type so kilometers vs miles can't be swapped, model cards with sum types for rank/suit and a product type for Card, and use tagged unions so Deck and Hand are not interchangeable. Implements Blackjack scoring that returns soft/hard points and normalizes soft aces to hard when over 21; examples compile and produce correct totals.

AI-written summary · about

  1. 0:00Introduction
  2. 0:39Agenda
  3. 1:58What Is Type-Driven Development?
  4. 6:56Mixing Up Units of Measure
  5. 9:35Modeling Blackjack: Finding the Nouns
  6. 14:50Sum Types: Rank and Suit
  7. 18:16Product Types: Card
  8. 22:39Modeling Deck and Hand
  9. 26:12Tagged Unions and the Player
  10. 28:54Scoring a Hand: Hard and Soft Points
  11. 34:14Recap
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.