Bulk and Cut as a Metaphor for Codebase Growth

Originally posted 2022-01-23

Tagged: software engineering

Obligatory disclaimer: all opinions are mine and not of my employer


In bodybuilding, “bulk and cut” refers to a cycle of gaining weight (building both fat and muscle), and then losing weight (dropping fat while retaining muscle). Over multiple cycles, you grow muscle more efficiently than if you used an incremental muscle-building strategy. (Supposedly.)

As with lots of nutrition advice, evidence for bulk and cut is slim, but it’s a seductively simple idea. It’s easier to get your body to build muscle during a period of caloric excess, and afterwards you can focus on burning off fat while retaining your muscle growth.

Bulk and cut is a great metaphor for ideal codebase growth.

The bulk is when your codebase expands to meet new product requirements. During the bulk, your codebase accumulates “muscle” - useful functionality and abstractions. It also accumulates “fat” - redundant or obsolete functionality and abstractions.

The cut is when you trim the fat from your codebase, creating a cleaner basis from which to start your next bulk cycle. The result is a lean, value-creating codebase that you’re proud to show off, and a solid starting point for your next bulk and cut cycle.

One reason I like this metaphor is because you can empathize with the codebase that’s gone through the “bulk and bulk” program. Imagine how a bodybuilder might feel after one of those! They would feel bloated and unhappy with their body, and that’s just how an engineer would feel in that codebase. Cutting after bulking is the responsible way to grow your codebase/body.

Another reason I like this metaphor is because bulking is just as important as cutting. Building new code is so much more effective when you’re not worried about your muscle-to-fat ratio. Not only that, it’s much easier to figure which code is fat and which code is muscle retrospectively, than to try and figure it out prospectively.

There are obvious parallels with the concept of “tech debt” here. I like the bulk and cut metaphor better because the accrual of “fat” is a natural and inevitable byproduct of bulking, which is how many people try to explain this nebulous idea that “some tech debt is good”.