Your Codebase Needs OSHA

Published: (January 6, 2026 at 08:23 PM EST)
4 min read
Source: Dev.to

Source: Dev.to

I’ve never been able to function well in a messy space. It’s not about neatness—it’s something deeper. When things are scattered, mislabeled, or blocked, it doesn’t just irritate me—it hurts my brain. I can’t think clearly when the environment is working against me.


A Real‑World Example

Years ago I worked in a warehouse. Stock was piled haphazardly, aisles were blocked, and nothing was where it was supposed to be.

“The mess isn’t just annoying, it’s dangerous. Someone is going to trip.”

I pulled a manager aside, explained the risk calmly and clearly, and pointed out that I was slower because I had to step around chaos. The response?

Fast forward to now, and I hear the exact same thing.


Codebases as Hazardous Worksites

  • Landmines: missing labels, mis‑wired logic, hidden traps that spring only when you step on them.
  • Exposed nails: TODOs left in the code, business rules only half‑remembered.
  • The mantra: “That’s just how it is.”

But it isn’t. It’s not how it has to be. We’ve forgotten what “unsafe” looks like when the damage isn’t visible.

Cognitive injury is injury

“Code that burns you out, gaslights your sense of competence, pushes you into late nights because the architecture actively resists understanding? That’s a safety issue.”

If a forklift driver refuses to operate a machine with no brakes, we call it a safety problem. Why is it different when it’s your mind being pushed past its limit?

Demanding safety is not a personal failure.
You’re not being difficult—you’re being responsible.


The Business Reality

I get it: you’re under pressure to deliver, you don’t want another delay, another debate, another story point spent on something you can’t see.

The truth: the mess is costing you.

  • Incidents
  • Missed hand‑offs
  • Longer onboarding times
  • Attrition

Just because the injuries don’t leave bruises doesn’t mean you’re not bleeding money.

You don’t have to become a code‑quality zealot.


Symptoms of an Unsafe Cognitive Environment

  1. Slowed productivity that management can’t see.
  2. Second‑guessing basic tasks.
  3. Carrying more state in your head than the system does in memory.
  4. Burning hours predicting failure modes instead of writing features.
  5. Loss of trust in your tools—and in yourself.

“What’s taking so long?” – the classic question that signals injury.

And perhaps the worst part? You stop talking about it—not because you don’t care, but because it feels futile—or worse, risky. That silence is how unsafe systems survive.


What Safety Looks Like

The Basics

  • Breathe. It gives you confidence to make changes without gut fear.
  • Predictability. It lets you onboard a new dev without handing them a rosary and a support group.

Existing Safety Gear (we already have it)

  • Type systems
  • Linters

When someone disables them to move fast, the reasoning gets side‑eyed—because we know what it means.

Safety gear only works when you use it.

Imagine telling a factory worker that safety equipment is optional. Sound ridiculous? Or worse… familiar?

Why Safety Protocols Appear After Injury

  • OSHA didn’t spring into being because someone cared deeply about ladders.
  • It only appeared when the harm became impossible to ignore.

Our post‑mortems aren’t written in blood, but they’re still written in pain: sleepless nights, lost weekends, burnout, escalations, resignations.

Typical post‑mortem phrases:

  • “We didn’t realize how interconnected that system was.”
  • “There wasn’t enough time to write tests.”
  • “It was fragile, but we didn’t know how fragile.”

We call these incidents. Lightning doesn’t strike often, and it doesn’t always hit the same file.


Velocity vs. Safety

  • Velocity is a scalar. It tells you how fast a team is moving—nothing about why.
  • It doesn’t care if speed comes from clean architecture or unpaid overtime.
  • Velocity can be manufactured—by skipping safety.

OSHA doesn’t measure success by speed. It measures success by absence of injury.

Unsafe behavior isn’t a personal flaw—it’s a systems problem.

Unsafe environments are more expensive over time—even if they’re faster short‑term. Safety is cheaper than accidents, but only if you invest before the harm.


The System’s Role

A safe environment doesn’t rely on every person being brave.

It relies on the system not allowing unsafe behavior to proceed.

  • Post‑mortems become signals, not just stories.
  • Velocity without safety isn’t delivery; it’s a recipe for attrition and delay.

We don’t need to reinvent how to protect ourselves.


Call to Action

You’ve seen the injuries. Here’s the choice:

  1. Keep squeezing the system until something breaks.
  2. Decide that safety matters.

The truth is simple: Incidents are more expensive than prevention.

Once you see it that way, it’s hard to unsee.

What kind of system do you want to be responsible for?

We’re all responsible for something. And someone is counting on you to make the right call.

Going to inherit the next hazard.
That part’s still up to you.

Back to Blog

Related posts

Read more »