Two software developers walk into a bar.

Dev1 says: “If you are thirsty, order water.”

Dev2 says: “Order beer if your age is greater than the drinking age.”

The waiter looks at them both and thinks: these guys talk funny.

They’re both speaking something that looks like English, but with slightly different accents. Dev1 might be speaking C#, Java, JavaScript, or TypeScript — they’re close enough that it’s hard to tell at first glance. Dev2 is clearly speaking Ruby.

This is the thing about conditional expressions. Depending on which language you’re most comfortable in, the same logic reads differently. One reads like a directive; the other reads like a rule. One sounds imperative, the other almost natural.

The Quote That Got Me Thinking

A colleague put it this way:

Sometimes using solely one format or the other is like making two British people speak Spanish to each other just because they’re on vacation in Spain. It doesn’t make sense if they’re only communicating with each other.

That’s a sharp observation. And it made me laugh, because it’s true. If two people share the same native language, forcing them into a foreign one just because of the environment they’re in is awkward at best, counterproductive at worst.

But then I started pulling on that thread a bit more.

What If They Went to Spain on Purpose?

Let’s say those two British developers went to the Aragón circuit to watch a MotoGP race, then wound up sitting at a nice beach in Costa Brava, beer in hand, watching the waves. In that case, yeah — talking to each other in Spanish makes no sense. They’re just two mates on holiday who happen to be in Spain.

My colleague’s point lands perfectly there.

But what if they didn’t just end up in Spain? What if they chose Spain deliberately, for a very specific reason? Here’s a possibility:

In order to massively elevate our command of the Spanish language and tighten the bond with our new Spain-based client, as British business partners, we want to go on a fully immersive vacation in Spain.

Now the picture changes entirely. If that’s the value they’re after, speaking Spanish to each other isn’t just acceptable — it’s the whole point. Maybe they’d even benefit from hiring a Spanish tutor to trail along and give them feedback as they go.

The Why Behind the What

This is the part that I often ponder: the question isn’t just “what’s the convention here?” The question is why are we here, and what are we trying to get out of this?

In software, we have plenty of similar moments. Should we write tests first or after? Should we use this pattern or that one? Should the conditional read like a directive or a rule? The answer almost always lives in the why behind the what.

When a team defaults to a shared format or convention without asking why, they might be making two British people speak Spanish to each other for no reason. But when a team makes a deliberate choice — even an unconventional one — because it serves a specific value they’re pursuing, that’s a different story.

Before asking how should we write this, it’s worth pausing to ask what are we actually trying to accomplish or experience? The answer might surprise you. And it might even change the language you choose to speak.

Leave a Reply

Trending

Discover more from Claudio Lassala's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading