dnlgrv

Zoom levels

I’ve been recently trying to think of my work as operating at different “zoom levels”. We often fall into these modes automatically, but it’s something you can consciously do if you identify the need.

Let’s say you’re trying to trace a bug or dive into the underlying library code, you’re about as zoomed in as you can possibly be. You’re deep in the code, looking in one very specific area for a very particular problem. When you’re that far zoomed in, you can’t really think about the wider picture. You need focus, the clarity of that zoom level, and you only load the context that is involved with the specific problem you’re trying to solve.

When it comes to a task like refactoring code, you need to zoom out 1 step and take in a bit more of scene. Take a look at different areas to figure out if making a change here is going to break something elsewhere. This is often our “default” zoom level if you’re working as a full stack developer, as you consider the HTML, CSS, request handling, and the database layer all at once. You need that wider zoom range while you build something, but you don’t need the granular detail of how everything you’re using works under the hood.

The widest zoom range is where those big changes come into the field of view. Are we upgrading our entire Rails app from version 6 to 7? Should we be handling assets differently by migrating from Sprockets to Propshaft? Our deploys are taking longer than usual, maybe it’s an issue with how we’re writing our tests.

You can zoom out even further, and you often will if you’re involved in the business or management side of things at your company, but as programmers we tend to operate somewhere in those 3. And what’s interesting is that you need to move freely between those different zoom levels at different points in the day.

If you’re working intensely on a particularly complex feature, you really want to be at Zoom Level 1. Zoom Level 2 for putting all those pieces together. And Zoom Level 3 once you’ve finished a piece of work and want to see if there are any patterns starting to form. You don’t want to try and jump between these levels quickly either and take a break in between switching.

I’ll often open a new editor or change directory just to a particular problem space rather than operating in the entire app (you don’t want the noise of the other files getting in the way). You could call these “focus modes” but you should be focusing all the time anyway, which is why I’ve settled on zoom levels.