Off with their I/Os!—Or How to Contain Madness by Isolating Your Code
summary
Claim: isolate all I/O at the outermost layer so the computation lives as pure functions in a functional core, using pandas.read_csv, sklearn StandardScaler and logistic regression objects in memory. Build a thin worksheet abstraction (gspread-backed and Excel-backed implementations returning numpy arrays) and use dependency injection to pass a test double; tests shrink from ~25 minutes to fast unit tests and integration tests only, and swapping gspread for local Excel works without changing core logic.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:25Disclaimer
- 8:11Pure Functions
- 11:11Onion Architecture
- 17:30Confusion Matrix
- 24:46Dependency Injection
- 25:53Abstraction Layer
- 29:29Class Inheritance
- 29:50Duck Typing
- 34:45Ios Should Occur at the Highest Level
related talks
52mGo Fully Functional and Take Your Legacy Code with You!
25mTestable Architecture: Keep 'em Separated
01h 01mMoving IO to the edges of your app: Functional Core, Imperative Shell
46mBoundaries
40mScaling Python - Bank Edition
26mBetter living through components
35mAvoiding code spaghetti by making ravioli
01h 29mArchitecture Beyond Clean & Hexagonal
