"It Works on My Machine" — The Universal Developer Curse

LEVEL 0

The Problem

The scene: A meeting room. A developer. An operations engineer. A bug report.

Ops: “The application crashed in production last night.”

Dev: “That’s weird. It works on my machine.”

Ops: “Well, it doesn’t work on the production server.”

Dev: “Are you sure you deployed the latest code?”

Ops: “Yes.”

Dev: “Did you restart the service?”

Ops: “Yes.”

Dev: “I don’t know what to tell you. It works on my machine.”

This conversation is common enough that it became a meme. Developers print stickers that say “It works on my machine.” It’s funny because most developers have seen some version of it.

But why? Why does code that works perfectly in one place fail in another?