this post was submitted on 24 Jul 2026
446 points (98.3% liked)

Programmer Humor

32452 readers
1709 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments

Oh, yeah maybe so; I don't remember them that well. If I give it enough time perhaps I'll scrutinize the code examples more closely this time. I generally skim or skip code examples in non-executable media like books; they're usually so contrived or divorced from their original context that they are no longer useful examples, especially in a domain as context-dependent as large-scale application development. Clean Code was no exception, despite the dire warning about skipping them at the top.

Flipping back through, it looks like I added a few annotations on some of them so I guess I did eventually read them, but I don't remember them being nearly as essential as he made them out. It was more like, "Remember how we said doing X made code better? Well here's a snippet before we did X, and here's what it looks like after X! See how it's better?" Which, fine, I believe you when you say that that made the code more usable for you and your team. I don't know how useful it is to generalize decision making about X from a code example vs. just having a general guideline about X and leaving the implementation of that guideline to the implementer i.e. me. I prefer the latter; I think the former leads to the kind of hyper-specific rule following that makes people over-decompose, or put interfaces on top of every single class even if it does nothing but add yet another do-nothing file to the codebase... I digress.

I think I agree, kinda. I'm not sure what I'd define as "irresponsible code" in this context, but I think in general the practice of adding specific examples to highly variable and context-dependent decision making is hard to do, and I think Clean Code might have been better without them.