News for hackers. Stuff that matters.
Re:Uncle Bob and Silver Bullets (2017) by marginalia_nu on Monday July 04, 2022 @12:30PM (#31978877)
A lot of Uncle Bob's advice come from a time and a place where they actually had merit. There is a sort of enterprisey Java code that was very common in the '90s. OOP and Gang of Four was incredibly trendy, but few people were actually all that good at it. So now your code had a AbstractFactoryFacadeDelegatorImplBuilderVisitorVisitor. Methods were often extremely long, hundreds of lines. The code was complex in a lot of ways, lots of static instances being accessed from every which way.

In this context, Uncle Bob's style was compelling, it felt like a breath of fresh air. His opinionated attitude was also compelling. In general, associating a term like 'clean' to your methodology seems to be a good zealot recruitment strategy. 'Pure functions' is similarly brilliant marketing.

That said, a lot of his supposed solutions actually cause problems of their own if you let the pendulum swing too far. It creates its own kind of complexity. Books like these also tend to sort of get their own momentum, if you look back you see a lot of big names praising them. Surely they must be good, right? Well they were. Clean Code made sense when it was published. It's for the most part not good advice today.

Re:Uncle Bob and Silver Bullets (2017) by Apocryphon on Monday July 04, 2022 @01:59PM (#31980004)
Ironically, on mobile at least, applying Uncle Bob's ideals into the VIPER framework creates proliferation of classes, interfaces, and functions that are often as byzantine and names as unwieldy as stereotypical J2EE spaghetti code.
Re:Uncle Bob and Silver Bullets (2017) by heap_perms on Monday July 04, 2022 @01:50PM (#31979897)
I'm curious why you think clean code is for the most part not good advice today. I read the book recently. What is different today compared to in 2008?
Re:Uncle Bob and Silver Bullets (2017) by marginalia_nu on Monday July 04, 2022 @02:22PM (#31980259)
You can easily end up with another sort of complexity, where the code is difficult to reason about because it is so decoupled and the methods are so short (but the call stack very long) and modules so small (but many). You can end up with unnecessary code that's difficult to spot because the logic is so spread out that the big picture is clouded.
Re:Uncle Bob and Silver Bullets (2017) by int0x80 on Monday July 04, 2022 @03:27PM (#31980803)
Because lots of small functions increase the system complexity by creating interdependencies. You also don't have context in each function to understand the big picture and very small functions can be meaningless on its own. You have to jump through many functions just to figure out what is being done.
Re:Uncle Bob and Silver Bullets (2017) by wrnr on Monday July 04, 2022 @03:58PM (#31981137)
Code is a non-linear medium, depending on the path one takes thought the graph and the scale one operates at clean might mean a very different thing. Take a long look at the history of ideas, it might be obvious looking back that thing should be the way they are, but no one just knows them as if they are a prophet. Even if there are sign of something being ugly or a hack this does not give any guidance as what direction to take next.
Re:Uncle Bob and Silver Bullets (2017) by jen20 on Monday July 04, 2022 @10:28PM (#31983688)
The feasibility of functional programming in commercial settings.
Re:Uncle Bob and Silver Bullets (2017) by mypalmike on Monday July 04, 2022 @12:43PM (#31979047)
I haven't seen anything much better than SOLID from Clean *Architecture in terms of organizing large projects into lots of small discrete interfaces. I guess globally declared pure functions are being pushed a lot today, but I find this approach organizationally wanting, particularly in promoting tight coupling (with all its drawbacks).

*Edit: Updated: I had forgotten this was not from "Clean Code".

Re:Uncle Bob and Silver Bullets (2017) by ajuc on Monday July 04, 2022 @01:03PM (#31979280)
> I guess globally declared pure functions

They don't have to (and probably shouldn't) be globally defined.

Re:Uncle Bob and Silver Bullets (2017) by mypalmike on Monday July 04, 2022 @01:23PM (#31979573)
I meant "globally declared" in contrast to instance-oriented (i.e. methods) rather than whether or not a function exists within a namespace, which is what I think you're implying.
Re:Uncle Bob and Silver Bullets (2017) by Jtsummers on Monday July 04, 2022 @01:27PM (#31979627)
A somewhat more common term is "free function". Comes from C++, in particular, where it means non-member functions (that is, not methods).
Re:Uncle Bob and Silver Bullets (2017) by greenmana on Monday July 04, 2022 @03:12PM (#31980684)
I often wonder what would currently be a way to work in a more enterprisey environment and actually make stuff a little bit more fun and not all "abstract factories" etc. I'm talking TypeScript/C#/.NET Core type of stuff, maybe with Vue. What's the "new Clean Code"? Might just learn Go next or something.
Re:Uncle Bob and Silver Bullets (2017) by NautilusWave on Tuesday July 05, 2022 @02:42AM (#31985098)
I don't think it's sensible to liken Pure Functions with "clean code". The former, while no panacea, is strictly defined in a way that the latter could never hope to be.