Earlier quoted context omitted.
It can definitely be confusing to hear "clean" when communicating in a professional setting. That said, in the book he covers correctness and understandability in nearly every paragraph. It's all the book is about really. It's called "clean" because it's concise and a catchy book title.
If you say the book “covers correctness and understandability in nearly every paragraph” then I’m convinced we must be talking about different books. For example, the book presents a rule for class names: > Classes and objects should have noun or noun phrase names like Customer, WikiPage, Account, and AddressParser. Avoid words like Manager, Processor, Data, or Info in the name of a class. A class name should not be…
It's probably time to stop recommending Clean Code (2020)
191–200 of 216 posts
Re: It's probably time to stop recommending Clean Code (2020)
#192A common theme not only in software but other industries: Beware of people selling you advice. They are the ones who will breed dogmatic illogical cargo-cults of people whose only rebuttal when questioned is some variant of "because someone who sold me this book that claims it'll make my code better said so", and that can't be a good thing in general. but we assume that Martin doesn't literally mean that every functi…
Have you worked with 5000 line functions? Just trying to set breakpoints in them at meaningful points is a nightmare. Give me 1000 5-line functions any day - providing of course they have sensible names (and ideally don't cause unexpected side-effects etc., though when a function is 5-lines long, that's fairly easy to spot; in a 5000-line function, fuhgeddaboudit. My personal guideline is "it should fit on a screen"…
Re: It's probably time to stop recommending Clean Code (2020)
#193Earlier quoted context omitted.
If you say the book “covers correctness and understandability in nearly every paragraph” then I’m convinced we must be talking about different books. For example, the book presents a rule for class names: > Classes and objects should have noun or noun phrase names like Customer, WikiPage, Account, and AddressParser. Avoid words like Manager, Processor, Data, or Info in the name of a class. A class name should not be…
There's an entire chapter on naming things, with tons of examples. Why would a class be anything but a noun or noun phrase? It's not a hot take
Re: It's probably time to stop recommending Clean Code (2020)
#194Earlier quoted context omitted.
If you say the book “covers correctness and understandability in nearly every paragraph” then I’m convinced we must be talking about different books. For example, the book presents a rule for class names: > Classes and objects should have noun or noun phrase names like Customer, WikiPage, Account, and AddressParser. Avoid words like Manager, Processor, Data, or Info in the name of a class. A class name should not be…
> and if you like Strunk & White, then we disagree on at least two books I'd be happy to shred Clean Code , but keep your hands off my Strunk and White !
Re: It's probably time to stop recommending Clean Code (2020)
#195Re: It's probably time to stop recommending Clean Code (2020)
#196Earlier quoted context omitted.
Let’s say my site has a download image feature that embeds per-user digital licenses into downloaded images at download time. This might take some processing so there is a queue and an abstraction representing the downloaded file. There are also several endpoints serving different types of image files. What shall I call the unit of code orchestrating these download processes, if not ImageDownloadManager?
ImageDownloadDispatcher, ImageDownloadScheduler, Image DownloadQueueManager... basically, the fix for "FooManager" names is to ask which aspect(s) of Foo the manager manages. Lifetime, storage, execution order (and according to which criteria), resource limits, uniqueness, exclusive access, efficient search, ...
ImageDownloadManager manages image downloads. Why use a name that makes less sense?
Re: It's probably time to stop recommending Clean Code (2020)
#197Earlier quoted context omitted.
Let’s say my site has a download image feature that embeds per-user digital licenses into downloaded images at download time. This might take some processing so there is a queue and an abstraction representing the downloaded file. There are also several endpoints serving different types of image files. What shall I call the unit of code orchestrating these download processes, if not ImageDownloadManager?
I think I would go with a class called Image, which provides a method called download().
Re: It's probably time to stop recommending Clean Code (2020)
#198Earlier quoted context omitted.
> and if you like Strunk & White, then we disagree on at least two books I'd be happy to shred Clean Code , but keep your hands off my Strunk and White !
Strunk & White is really bad, try Style: Lessons in Clarity and Grace as an alternative.
I disagree. Also, tastes vary and it fits mine. Thanks for recommending Style, though - it's very good and I fully get that it may be preferred by other writers. It also serves a slightly different purpose to Strunk & White, so the two can co-exist on the same writer's bookshelf.
Re: It's probably time to stop recommending Clean Code (2020)
#199Earlier quoted context omitted.
There's an entire chapter on naming things, with tons of examples. Why would a class be anything but a noun or noun phrase? It's not a hot take
I think you may have missed the context for why I brought it up in the first place.
You're right, the problem is vagueness, and that context is already set a few pages prior. It would be redundant to repeat the same reasoning.
Re: It's probably time to stop recommending Clean Code (2020)
#200Earlier quoted context omitted.
Let’s say my site has a download image feature that embeds per-user digital licenses into downloaded images at download time. This might take some processing so there is a queue and an abstraction representing the downloaded file. There are also several endpoints serving different types of image files. What shall I call the unit of code orchestrating these download processes, if not ImageDownloadManager?
ImageDownloadPreparer?