Good Code Is—

Published on July 23, 2023, filed under (RSS feed for all categories).

I just discarded a 1,000-word response to Addy Osmani’s notion that good code was like a love letter (to the next developer maintaining it).

I discarded it because I didn’t end up enjoying, didn’t feel humble challenging something of good intention; and yet here we are with a post, about something seemingly old and obvious no less.

The Eternal Question

What is good code?

Is good code (like) a love letter?

Maybe.

If you ask me, a frontend developer, it starts with valid, semantic, accessible, required-only HTML, but agreement on each of these adjectives varies—“accessible,” yes, “semantic,” sure, “valid,” in theory, yes, but in practice, no, and when it comes to omitting optional markup, no thanks, the popular vote goes to XHTML–HTML.

So?

I doubt we can define “good code,” and wonder whether it’s definable.

Not because of disagreement, as suggested with HTML (and HTML alone), but because the terms are too charged and too broad.

“Good” and “Code”

“Good” comes with a ton of value judgments, each of which has reasons and sponsors. (“Good” has substantial problems, in case you’d like my latest book.)

“Code” first comes with a ton of languages, each with its own history and best practices.

And when you turn your head and observe the field, neither may matter.

What does “good” mean when things work—for the users, the developers, the business?

What does “code” mean when it changes with the wind—developers switching frameworks, languages, paradigms?

❧ If we can’t answer what “good code” is, what can “good code” be like? A love letter?

And you notice, that comparison (or verification of it) may not be the question.

What good code is, that is the question.

Maybe it’s more interesting than the answers.

Was this useful or interesting? Share (toot) this post, or maybe treat me to a coffee. Thanks!

About Me

Jens Oliver Meiert, on September 30, 2021.

I’m Jens, and I’m an engineering lead and author. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m close to W3C and WHATWG, and I write and review books for O’Reilly and Frontend Dogma.

With my current move to Spain, I’m open to a new remote frontend leadership position. Feel free to review and refer my CV or LinkedIn profile.

I love trying things, not only in web development, but also in other areas like philosophy. Here on meiert.com I share some of my views and experiences.