Use Tests as Executable Documentation
- All code is for communication, to: (1) humans, and (2) machines.
- Unreadable code communicates to (2) but not (1).
- Documentation communicates to (1) but not (2).
- Ideal documentation communicates to both equally well.
- Therefore, tests are an executable form of documentation.
- The only thing worth testing is the public interface, so [[Don't Test Internals]].