What Army Artillery Taught Me About Writing Better Code

I used to load artillery rounds into a howitzer. Now I load functions into machine learning pipelines.

And strange as it sounds, artillery operations taught me more about writing clean code than any tutorial ever could.

Because both require the same thing: discipline.

Repetition Builds Mastery

In the military, we drilled everything:

  • Clean the gun.
  • Load the round.
  • Check the coordinates.
  • Fire.

Same steps. Every time. No shortcuts.

That mindset carries over to coding. You learn best by doing—and repeating. No one becomes a great developer by skimming blog posts. It’s reps. It’s consistency. It’s pushing code, reviewing mistakes, fixing, and doing it again.

Clean Code = Clear Mission

In artillery, if you skip a step, someone gets hurt.

In software, if you skip a step, your system breaks.

Discipline means documenting your work. Following standards. Thinking about the next person who’ll read your code like you’d think about your battle buddy relying on your checklist.

Even in Tech, Routine Saves Lives (or Deadlines)

Discipline is your edge:

  • Show up every day.
  • Write even when it’s not perfect.
  • Test your code like it matters.

Because it does.

If you’re a veteran entering tech, don’t underestimate the power of your military discipline. It’s your secret weapon.

Follow along daily at jameshenderson.online to explore where structure meets software—and how your military mindset can build the future.