DEV Community

Cover image for Explain It To Me Like I'm... Well... Me, But Dumber
Ben Link
Ben Link

Posted on

Explain It To Me Like I'm... Well... Me, But Dumber

I once knew a guy who derived great pride from writing clever code...

  • All variable names were reduced to single characters because "long variable names slow me down".
  • Log messages were cryptic things like "a < 5" which required you to know why that mattered.
  • Zero comments. Zero READMEs. When I asked for documentation, he said "well just look in the main function and follow it from there".

He was absolutely wizard-speed at debugging his work... but literally no one else could help. I once had to fix a problem while he was on vacation - it took me 6 hours to decipher the messages so I could fix a 5-minute problem.

We All Do This (To Some Degree)

Oh, maybe we're not quite that extreme in your coding habits, but you and I often make a major assumption when we write code:

We assume that we're going to be at our best when we have to maintain it.

It's an incredibly improbable assumption, isn't it? I mean, sometimes we joke that the surest sign an application is "sentient" is that it breaks at the most inopportune moments: at 3 AM, or right before a demo. You know, at stressful moments when we might be distracted or sleep-deprived.

And THAT's Who We Should Write Code For

If we write our code to be clever, we're writing for our best self. We are making the assumption that we'll understand that cool trick when things break and we're trying to decipher and diagnose. We choose not to add comments around the logic, thinking "Well it's obvious why this is here"... but at 3:00 in the morning? It might not be.

Blink That's So 2021

I know you're probably thinking like an AI-bro right now. "Dude, I haven't written any code in 6 months, I just tell Claude to do it. Your sermon on Clean Code is outdated."

If you've followed the channel for any length of time, you know my answer to this. If you haven't, I suggest you go check out Requiem for a Species: How AI Destroys Humanity.

Even if AI doesn't end up destroying humanity, think about how you help Claude improve: you add context. Even if you've completely handed the keys over to the bot, you still owe it to yourself to write this stuff out.

The Wrap-up

At the end of the day, there are two types of developers:

  1. Those who write code to show how smart they are.
  2. Those who write code to show how much they respect their time.

The first guy is a "wizard" until the first bug hits. The second guy is the one who actually gets to enjoy his vacation.

Optimize for the 3:00 AM version of yourself. Everyone else—including the AI—will thank you.

Top comments (0)