┌──────┬──────┬──────┐
│ code │ code │ code │
│      │      │      │
│      │      │      │
│      │      │      │
│      │      │      │
└──────┴──────┴──────┘

Use a setup where you can have three columns of code in your main code editing environment.

This is a personal observation. There are people who like to program with just a thirteen inch laptop screen and they might have a point. But going from two columns to three columns reduced the brain crunch I feel when working with complicated code. And do you really think you have a better chance understanding a big complicated codebase when you have to jump from file to file to browser to log output and back to file while keeping the context in your working memory? Human brains are limited. Put it all in front of you and start working.

For years my main code editing environment was a big terminal window on a big external monitor arranged like this:

┌──────┬──────┬──────┐
│ code │ code │ bash │
│      │      │      │
│      │      ├──────┤
│      │      │ bash │
│      │      │      │
└──────┴──────┴──────┘

This isn't as good as three columns because I often end up working on two files and need context from one. Or I work with one file and need context from two. Previously I would switch between files, or split one or two of the panes. But that gave me headaches.

You might ask why I don't write simple code so that I don't need to look at many things at once. I do strive to write simple code. But most of the time I'm not working with code that I have written. In fact, I've ended up spending most of my career so far trying to wrap my head around big complicated codebases that others had produced. It's what most programmers do most of the time, I assume.

One column of code was added – where did the Bash instances go? To another (small) external monitor. Here is the complete picture (the exact contents of the monitors vary):

┌───────┐┌──────┬──────┬──────┐┌─────────┐
│ bash  ││ code │ code │ code ││ browser │
├───────┤│      │      │      ││         │
│ bash  ││      │      │      │└─────────┘
└───────┘│      │      │      │
         │      │      │      │
         └──────┴──────┴──────┘

You might worry about the added geekiness, energy cost and heat output. The geekiness can't be helped. Energy and heat shouldn't be a problem. – My small, old monitor stays much cooler than my main monitor. – And if you're working on making the world better (→ 80,000 Hours), your increased productivity will more than make up for the increased cost.

Some people (→ tonsky.me: Time to upgrade your monitor) recommend 4K monitors for programming. As a sidecar, I found a 17" old school monitor good enough. Three points about this:

  • Don't bother with height-adjustability; put it on a stack of books.
  • 17"@1280x1024 is the minimum. Slightly bigger/higher resolution would be nice. My main monitor has 109 ppi, which is adequate.
  • For MacBooks with only USB-C/DisplayPort: Use external monitors with a DisplayPort jack. HDMI adaptors suck, in my experience. They get super hot. And when I plug/unplug anything, the monitors turn off and on again.