-
build up a test suite, and a testing library to go with it
-
command-line TODO app
- steps:
- start with bare-bones Todo class
- add persistence
- move list logic into class
- flat tests
- test blocks
- clean state between each test
- add "started" status (trinary vs binary state)
- persisting
- start without setting filename
- steps:
-
a big part of getting better at coding is overcoming the fear of breaking things
-
it's not that the risk diminshes (the projects get more complex and the problems are new)
-
mitigate risk
- version control
- abstraction
- you don't drive a car by pressing a button for the spark plugs to fire
- you don't use a computer by flipping switches (anymore)
- staging
- testing
-
learn how something works by testing its limits
- examples:
- bicycle
- baby crying
- teenager
- tree/rock climbing
- what's scary about testing limits?
- falling down
- no reset button
- in software, we don't have those problems
- except after it's released
- so break while you still have a reset button
- examples:
-
different kinds of testing
- unit
- multiple approaches
- isolate that piece
- isolate that piece and everything below it
- multiple approaches
- integration
- interaction-y things are hard to test, so move as much out of there as you can
- more details
- unit
-
testing forces you to write better code
- write things to be testable
- look at it from the outside in
- the UX perspective
- encourages you to break it into smaller pieces
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.