Gardening is my preferred metaphor for software. When I grow a new piece of software, there is a very predictable path I go through as I attempt to manage it’s complexity. It is, in fast-forward, the history of programming language design. That process is short enough to capture in about 400 characters, as two tweets.

Growing software, in two tweets:
1. Write main. Put your program in there.
2. main too big? Extract functions. Use global vars.
3. Too many functions? Group functions and their data (replacing global vars) into objects.

— grahamking (@grahamking) March 12, 2018

  1. Too many objects? Group objects into packages. Make some methods private.
  2. Too many packages? Split out a new project, either library or network service.
  3. Iterate from 2 when other functions grow too big.

— grahamking (@grahamking) March 12, 2018