JANUARY 24, 2026

From CNC
to code

Four years on a factory floor, rewritten as engineering instinct.

Before I wrote production software for a living, I wrote G-code. Four years at Weng Seng, programming computer-numerical-control machines to cut parts that had to fit together within a hundredth of a millimeter. When I tell engineers that story they usually nod politely and change the subject. It happens to be the best training I've had for the work I do now.

A re-run has a price tag

In software, a bad build costs you a CI minute. In a machine shop, a bad build costs you a block of metal, an hour of spindle time, and sometimes a replacement cutter if the program sent the tool somewhere it shouldn't have gone. You learn very quickly to read your program before you run it. You learn to imagine the cutter's path. You learn to simulate.

That instinct — think first, run second — is the single most transferable habit I brought with me. It looks like patience, but it's really just the memory of wasted brass. Code is cheap to run; that doesn't mean it's cheap to run wrong.

Tolerance is a product value

A CNC part is either in tolerance or it isn't. There is no "works on my machine." The spec is a number; the measurement is a number; either they line up or they don't. When I moved into software I kept bumping into "it depends" — on the client, on the locale, on whether the cache was warm. Most of the time "it depends" was an honest description of the system. Some of the time it was a refusal to pin down a number.

"What does the spec say? What does the measurement say? Where are they different?"

— The only three questions on the shop floor

I ask those same three questions of every system now. The spec is the product doc; the measurement is the telemetry; the delta is where the work lives. Most bugs, most user complaints, and most arguments in planning meetings come from teams that have either skipped one of the three or been sloppy about it.

The repeatability bar

A machine shop runs on repeatability. You don't get to ship a batch of parts that happened to come out right once. You ship a program that produces the same part, part after part, for the next ten thousand cycles. That's the bar.

Software engineers talk about idempotency, determinism, reproducible builds — as if they're optional. They're not. They're the same bar, dressed differently. If your deploy works once and then flakes, it doesn't work. If your test passes on a warm cache and fails on a cold one, it doesn't pass. A CNC programmer would tell you, politely, to take the program off the machine and keep writing.