We’ve all heard it. We’ve all said it.
“Works on my machine”: I dread it.
Margaret pulls down the latest code and finds an issue. She pops into the team Slack:
“hey i’m getting an error starting up the app, anybody know what’s up?”
A couple minutes later, there’s a reply from Naomi:
“works on my machine 🤷”
Margaret feels frustrated. She just wants the app to start up, the way it did yesterday. And the reply sounds like it’s blaming her for what definitely seems like a bug in the app.
Let’s interpret things in the most charitable way—that Naomi really is trying to help here. Her intention is to show Margaret she’s listening, and provide a data point to help solve the problem. But depending on Margaret’s mindset and the kind of day she’s having, the impact could be very different.
There are a bunch of different things that could be going on here.
- Margaret’s setup could have a problem that causes the bug to appear.
- Naomi’s setup could have a problem that causes the bug not to appear.
- The project’s dependencies could be nondeterministic.
- The bug itself could be nondeterministic.
And OK, maybe the ideal answer to solve these issues once and for all is a better CI environment. Or using dedicated virtual machines for development. Or Docker. Or a new programming language. But this isn't that kind of a post.
But in any case, while “works on my machine” is literally true for Naomi, it’s also not that helpful. If it helps at all, it’s as the start of a conversation.
What if instead, Naomi says:
“works over here; maybe we can see what’s different between us? i’m running MacOS 10.14.6 / OpenJDK 10.0.2 / Gradle 5.6.2 - how about you?”
Now Margaret has some clear next steps to narrow down possible causes by comparing her setup against Naomi’s and drilling into more specifics as needed. This takes Naomi an extra minute or so, and feels like more of a commitment to helping get Margaret’s problem solved. But this is part of what being a team is all about: helping each other move quickly, prioritizing team throughput and blockage-removal over personal velocity.
There are lots of other ways Naomi could help (pairing, video chat, etc.), but the key lesson for me is that “works on my machine” doesn’t work. So the next time we find ourselves with the urge to “works on my machine” someone, let’s evolve that quickly to more of a “let’s figure out what’s different together!”