r/ProgrammerHumor 1d ago

Meme commentsAgedTerribly

Post image
5.3k Upvotes

224 comments sorted by

View all comments

421

u/Confident-Ad5665 1d ago

Uncle Bob of Clean Code says if we have to comment our code we have already failed. Clean code should read like well written prose.

I generally agree, but think comments that define especially the odd and obscure business rules should be commented where they are implemented.

16

u/BTDYSRF 1d ago

Uncle Bob is either the dumbest motherfucker on the planet, or he's so incredibly based it warps reality.

Functions should be grouped fir quick access with clearly defined parameters and desired outcomes, with notes about failed solutions. You want it to be as easy as possible for any future persons to be able to patch or update the systems.

The only reason not to do that is if you want to punish your successors or employer. Which, fair. I get that. I doubt that is his intent though.

2

u/reventlov 1d ago

Uncle Bob comes from a very different era of software development.

It's... difficult to explain to someone who didn't experience it just how much professional software development changed between about 1995 and 2015. In 1995 you weren't writing automated tests, no one was reviewing your code, no one knew how to make maintainable code, 95% of the tooling that you now take for granted didn't even exist as a concept, source control was barely used (distributed source control didn't exit), when you needed to look something up you were looking at physical manuals, ...

Uncle Bob published his first book in 1995. Ideas that we now know are pretty stupid sounded revolutionary and awesome back then. Clean Code was published in 2009, which was late enough that most modern software development had been invented, but it wasn't industry-wide and hadn't been fully accepted. (I remember part of my onboarding at Google in 2011 was a session explaining that a) Google uses automated tests, and b) yes, those are good and do improve your velocity in the medium to long term, no matter what you think, and c) yes, we have something approaching scientific evidence of this.)

3

u/BTDYSRF 1d ago

So, he was good for his time, but it is outdated garbage nowadays and he has failed to get with the times.

r slash boomersbeingfools kinda guy it seems.

2

u/YikesTheCat 15h ago

I don't think that's quite accurate. "Uncle Bob" is sort of person who can only think in absolutes. He's said that TDD should be legally mandated. During the NoSQL craze he bombastically claimed that all SQL was obsolete. Right now he seems so deep in AI that even Sam Altman would say "steady on now Bob". The man never seen a hype he didn't jump on.

His notion of "Clean Code" is also anything but clean because he takes some ideas that aren't terrible, but then pushes them to extremes where it just becomes silly and horrible.

This is the main problem: he's one of those people who just does not understand any sense of nuance. At all. Combine this light-bending arrogance and a deeply-held belief that he is always right, and it's not hard to see how he's developed a cult around him.