← trail log

#06 · July 14, 2026 · ▲ 2,950m · 2 min · gear

Ultralight gear, heavy codebases

Counting grams in a backpack changed how I count dependencies in a bundle.

The ultralight crowd has a saying: take care of the ounces and the pounds take care of themselves. I used to laugh at people sawing toothbrush handles in half. Then I carried a 19kg pack up a 1,400m climb and stopped laughing.

The spreadsheet

Every ultralight hiker eventually builds a spreadsheet. Every item, every weight, every "do I really need this?" The surprising part is not the big items. It is the pile of small, reasonable things that add up to three kilograms nobody chose on purpose.

Open any mature frontend codebase and run a bundle analyzer. You will find the same pile:

None of these was a bad decision on its own. Together they are the extra three kilograms.

Base weight, not total weight

Hikers separate base weight (gear) from consumables (food and water). Consumables shrink as you go; base weight never does.

In a web app, base weight is the JavaScript that every route pays for. Route-specific code is a consumable. Keeping base weight low is the single decision that pays off on every page view.

// base weight: everyone pays for this
import { format } from "date-fns";

// consumable: only the route that needs it pays
const Chart = dynamic(() => import("./chart"));

Comfort still matters

The ultralight purist sleeps on a pad so thin it barely exists. I tried that once. I now carry a pad that is 200g heavier and I sleep like a stone. Cutting weight is about choosing what to carry, not about suffering. The same goes for code: delete with intent, keep what makes the team faster.