Your codebase is 80% glue. Do you know where the gold is?
Here's a fact about gold mines that surprises exactly no one who thinks about it for four seconds: they are almost entirely not gold. A productive mine moves mountains of ordinary rock to follow a seam that might be a few grams per tonne. The rock isn't a scandal. The rock is the job.
But notice what makes the whole enterprise sane: the mine knows where the seam is. There are maps. Surveys. Assays. Every decision — where to dig, what to guard, what the operation is worth — flows from knowing, with instrumented confidence, which few percent of the mountain is the point of the mountain.
Your codebase has the same composition and none of the maps.
The two substances
Every production codebase is a blend of exactly two substances, and telling them apart is the most valuable classification nobody performs:
Glue. The CRUD endpoints. The wrapper around Stripe. The wrapper around the OTHER payment provider from the migration that never finished. Serializers, parsers, webhook receivers, email senders, the auth middleware that does what every auth middleware does. Glue is honest, necessary, professional work — and it encodes no secrets. Any competent team could rebuild your glue in months, because your glue is their glue is everyone's glue. It follows vendor documentation the way rock follows geology.
Gold. The pricing model that took three years of customer pain to get right. The matching algorithm. The scheduling heuristic with fourteen unglamorous special cases, each one a scar from a real incident. The risk-scoring function that is, functionally, your moat rendered in code. This is the seam — the accumulated, irreplaceable judgment that is the actual reason your company exists as a separate economic entity rather than a Zapier configuration.
How much of each? In CodeNSM's own fleet telemetry, the census is remarkably consistent: the overwhelming majority of functions in a typical production codebase — commonly around the 80% mark — are integration and plumbing roles, with the unique business logic a thin minority, routinely outnumbered several-fold by wrappers and format-shufflers. (Whether that ratio is a law or just a strong habit of the fleet is the kind of thing we pre-register hypotheses about rather than assert.) John Ousterhout's A Philosophy of Software Design gives the theoretical rhyme: he divides modules into deep ones — small interfaces hiding real functionality — and shallow ones, interfaces wrapping very little. Your gold is deep. Your glue is, almost by definition, shallow. And shallow, in every codebase we've ever seen, is the majority party.
Again: the ratio is FINE. The mine is mostly rock. The problem is what happens when you can't tell which is which.
What not-knowing distorts
Hiring. You recruit senior engineers with the pitch "come solve hard problems," and it's sincere — you're thinking of the seam. Then they arrive, and the work queue is statistically dominated by rock: the third payment wrapper, the webhook retry logic. Stripe's Developer Coefficient survey put a number on the industry-wide version of this: developers spending over 40% of their week on maintenance and bad code, and the report's framing — billions in lost productivity — is really a statement about expensive people applied to commodity material. Without a gold map, you can't even DESIGN the role so your scarcest judgment lands on the seam. Everyone digs wherever the tickets say.
Valuation. Two startups each have 60,000 lines of Python and identical ARR. One is 95% glue around a modestly clever workflow; the other has a genuinely novel engine wrapped in the usual plumbing. These companies should not be worth the same multiple — one of them can be re-implemented by any acquirer's platform team in two quarters, and the other can't. Yet in a data room, both look like... 60,000 lines of Python. (Part 20 of this series is about how little anyone checks.) A founder who can't draw their own seam map is negotiating the price of a mine using a photograph of the mountain.
Review and testing attention. This one compounds daily. Attention is your scarcest engineering resource, and without the map it gets allocated by recency and noise rather than by substance. The gold — often old, stable, and quiet — gets skimmed in review ("that file again, LGTM") while some fresh glue gets forty comments about naming. Tornhill and Borg's Code Red research found low-quality code carrying up to fifteen times more defects and dramatically less predictable change times; now ask yourself where you can least afford that variance. If a serializer has a bad month, you get support tickets. If the pricing engine has a bad month, you get a board meeting.
Rewrites and migrations. The most expensive projects in engineering — the framework upgrade, the microservices split, the Great Rewrite — are exactly the projects where the glue/gold distinction should drive every line of the plan, and never does. Glue should be rewritten fearlessly; it's commodity, and the vendor docs are the spec. Gold should be moved the way museums move a Vermeer — slowly, with the original kept intact until the copy is verified against production behavior. Without the map, teams do the opposite of both: they lovingly hand-port wrapper code that could be regenerated in a day, and they "clean up" a pricing function's fourteen weird special cases, not recognizing them as fourteen incidents' worth of paid-for wisdom. Half the horror stories that begin "the rewrite went fine until..." are really stories about gold that got handled like glue.
The labeling thought experiment
Here's one you can actually run, and I'd genuinely encourage it:
- Take your top-level source directories — or the fifty biggest files, whatever's tractable — and have two senior engineers INDEPENDENTLY label each one G (glue: any competent team rebuilds this from vendor docs) or IP (gold: this encodes judgment a competitor doesn't have).
- Compare the two label sets. The disagreements are the interesting part — every mismatch is a place where your organization doesn't share a theory of what it owns.
- Now the uncomfortable follow-ups: What fraction came out IP? (Write your prediction down first. Most people guess high — nobody wants to believe they've spent three years building wrappers.) Does your best engineer's calendar concentrate on the IP files? Do the IP files have your best test coverage, or your oldest?
The exercise takes an afternoon and reliably produces one genuine shock per company — a "wait, THAT is load-bearing IP?" or its darker twin, "wait, we have three people maintaining that and it's a wrapper?" (Doing this labeling continuously and mechanically — every function classified by role, with the business-logic-versus-plumbing split falling out of the census — is one of the first views CodeNSM shows, and the prediction-versus-census gap is reliably the widest number on the screen.)
The mine that mislaid its seam
One last turn of the metaphor, because it earns it. A mine that loses track of its seam doesn't just dig inefficiently. It guards the wrong tunnels. It insures the wrong shafts. When it sells, it gets priced as a pile of rock, because rock is all the buyer can verify. And when a cave-in happens, it discovers which tunnel mattered by which collapse ends the company.
Your codebase is mostly glue, and that's fine — it always was, for everyone. The 80% isn't the risk. The risk is a company where nobody can draw a line around the 20%... or the 5%... or whatever your seam turns out to be, once someone finally surveys the mountain you've been standing on the whole time.