When fixes keep making things worse


Hello Reader,

A couple of days ago, I talked about how CSS is designed for uncertainty, meant to adapt to unknowns. When we don’t think about it that way, we fight it.

And when we fight it, things get messy fast.

We add what seems like an innocent enough property, but it doesn't quite fix things the way we wanted, so we add another. Then another. Then another.

By the end of it, somehow, everything is worse than when we started.

Once again, there's a meme that does a good job of showing how this often goes.

This happens to all of us because it’s easy to get stuck in the “oh, this will fix it!” trap, but each fix needs another one on top of it. It’s like piling Band-Aids on top of one another while the bleeding just continues to get worse underneath them all.

And these days, a lot of people turn to AI when this starts happening. But AI tends to fight CSS the exact same way you do. We tell it we have something that isn’t working, and it adds a property or two. They don’t work, so we tell it to try again.

After apologizing, the AI tells us it now clearly sees the solution to the problem, only for it to mess it up again, apologize when we tell it it's wrong, and the cycle continues.

Whether we’re writing the CSS ourselves, throwing utility classes at things, or trying to prompt our way to a solution, we’re simply getting frustrated and often ending up with fragile, hard-to-maintain code.

From my experience, the root of the problem is that most people don’t stop to think about why something isn’t working. They jump straight to trying to fix it without understanding what’s actually going on.

When you don’t understand the problem, your fixes are just guesses.

The way out isn’t more properties, more utility classes, or more prompting. It’s a different way of thinking about CSS entirely.

And that shift is exactly what I stumbled into years ago, pretty much by accident. This email has gone on long enough, though, so I'll be back tomorrow with that 😊.

Cheers,
Kevin

P.S. I’ll be in your inbox quite a bit over the next week or so. If that’s not for you and you’d like to just get my regular Sunday emails, click here to opt out of these extra emails.


Unsubscribe · Preferences
600 1st Ave, Ste 330 PMB 92768, Seattle, WA 98104-2246

Hi! I'm Kevin

Weekly newsletter, where I talk about tangentially-related front-end development topics and share what I've been up to in the last week, plus any cool/fun/interesting/useful links I come across as well.

Read more from Hi! I'm Kevin

PRE-S: With my course CSS Demystified about to relaunch, I'm going to be sending a lot more emails than usual. If you'd like, you can stay on my regular Sunday list, but opt-out of the extra emails. Hello Reader, I’m sure you’ve seen this before. Most people use it to poke fun at CSS and use it as an example of one of the many problems with CSS. The thing is, it’s actually an example of how CSS solves a problem the user created. Most problems we run into don’t happen because CSS is broken or...

View this email in your browser (or share it with a friend!) Hello Reader, Looks like I’ll be in Amsterdam a lot this year! First, I’m heading there in less than a month from now for Smashing Conf, where I’m giving a talk and an in-person workshop (I've got a link with a discount below if you are able to make it). And, if you can’t make it to that, I’m happy to announce I’ll be back in Amsterdam in June for CSS Day! I’m so excited to be going back to CSS Day again. Speaking there in 2024 was...

View this email in your browser (or share it with a friend!) Hello Reader, If you only have 10 or so minutes of free time for this email, instead of reading it, I’m going to ask that you either read this article or watch this video by Salma Alam-Naylor, where she explores her current thoughts on the tech industry and the impact AI is having on it. I’ve had a lot of thoughts on the current state of things circling around my head without being able to wrangle them in any coherent way, which she...