Monads for Testers
summary
Shows how functional programming in Scala on the JVM helps testers avoid bugs by using Option to eliminate nulls, Either instead of exceptions, immutable case classes with copy to prevent state mutations, and map/flatMap chaining to flatten error handling. Presents a small discount-by-country example, explains making the compiler enforce exhaustive cases, and advocates pure functions, monads and property-based testing to simplify tests and enable safe parallel runs.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:09Why it's hard
- 2:16Exception problems
- 9:45Eliminating exceptions
- 19:06Mutability problems
- 25:27Pure functions improve quality
- 34:14What are monads
- 40:28Functional impact on quality
- 42:16Q&A
related talks
50mMonads for Testers
46mTesting in the world of Functional Programming
36mTesting for Lawful Good Adventures
46mThe Essence of Testing
31mSCALATEST: YOU'RE ASSERTING IT WRONG
45mTDD, as in Type-Directed Development
28mLanguage Support for Property-Based Testing
32mMUnit: your new favorite Scala testing library?
