Solving problems with software
Solve one problem at a time, don’t be overwhelmed by everything.
Steps:
- Identify concrete tasks that will solve the problem.
- Write a little code implementing a concrete task.
- Write tests for your code and deploy ASAP.
- Repeat 1. - 3. until the problem is solved.
- Refactor for change by decoupling.
- Refactor for readibility by reviewing mental model, naming and cleverness.
Design programs as layers of API:
- Primitive layer - do one thing well, not exported, unit tested
- Low layer - builds on primitive layer, may be exported, unit tested (might replace primitive layer tests)
- High layer - for ease of use, exported, unit/integration tested
When am I done?
- 70 - 80% test coverage
- ask what can change, from technical and business perspective, and refactor the code to be able to handle that change
Source: Bill Kennedy’s Ultimate Go Programming video course.