What discussions are people having lately. Out of the loop I guess. I thought Clean Code’s principals were pretty simple and logical, and I still think about them when devving. Especially the bit about smaller functions.
I think it’s more that it speaks to experience of the audience of the subreddit.
Clean code is a great introduction to some good ideas but there are a lot of people (myself included) who held that book like a bible when we first started in the industry and after over a decade of applying its ideas have really learned where it can fail.
The platitudes I’m more likely to Preach now are more along the lines of “repetition is better than the wrong abstraction.”
A lot of this shift is due to death marches, failed projects, and late night crunches; there are a lot of broken shells my age who’ve gone through the grinder without the benefits of some of the huge soul saving wins I can cling to and thus will happily regale anybody who will listen with all the times Code Complete/DRY has betrayed them (some times followed by a flogging of “I told you so’s from other, elder husks.)
tl;dr Code Complete advocates some ideas that fall apart in practicality; furthermore 30-somethings want nothing more than to answer your simple question with a paragraph (look at me go)
These are great concepts, and should be guiding principals... but the idea of YAGNI applied to architecture is better IMO. Too often we find ourselves abstracting things to high heaven and only causing more trouble than it is worth.
I've come to find that copy and paste is fine... you just have to think about what you are doing before you do it. The reality is that abstractions complicate things and it isn't often necessary to go full bore. It'll more likely bite you in the ass.
the more functional programming is on the rise, the more everyone starts criticising OOP and related dogma, then some programs get written in functional programming and people all of a sudden realise functional programming has huge flaws just like OOP and we're back to OOP again.
this has been going on for about 40 years now, give or take. that is not a critique against functional programming, but rather just saying that this is absolutely nothing new.
there's nothing wrong with Clean Code. it's a 500 pages long book on ideas about how to circumvent common OOP-related issues with examples. most criticism tends to come from "well if you wrote functional code then..." or from people that simply don't have enough experience in domains that benefit from code refinement of the style clean code proposes, i.e mainly work with smaller applications where issues like DRY never really become apparent because there's simply not enough inter-connectivity in the code for it to matter and as such consider the proposals stupid because "I didn't need it when I wrote code".
as such, it's not a book for everyone, but what I tend to notice is that everyone critiques Clean Code on a very abstract level, i.e "Clean code is bad" or "I don't agree topic X the book brings up", but never "I don't agree with topic X, I propose we use Y for benefits A, B and C instead whereas X only really touches on C and poorly".
to me that is just a tell-tale sign that the people that deliver the critique:
are not experienced, and are defensively being vague to protect against questions of their knowledge.
are joining in on the critique because "other person said it was bad, I don't really know why though but it is bad!"
are not willing to engage on a level where a dialogue about why is possible.
all in all, I have to this day, never heard of anyone that read Clean Code, disagree with Clean Code outside of some very specific things like divergent code isn't always bad.
Funny to see Clean Code on here, considering the discussions about it lately.
FideoSpecial 29 points · Jul 2020
What discussions are people having lately. Out of the loop I guess. I thought Clean Code’s principals were pretty simple and logical, and I still think about them when devving. Especially the bit about smaller functions.
JustinsWorking 30 points · Jul 2020
I think it’s more that it speaks to experience of the audience of the subreddit.
Clean code is a great introduction to some good ideas but there are a lot of people (myself included) who held that book like a bible when we first started in the industry and after over a decade of applying its ideas have really learned where it can fail.
The platitudes I’m more likely to Preach now are more along the lines of “repetition is better than the wrong abstraction.” A lot of this shift is due to death marches, failed projects, and late night crunches; there are a lot of broken shells my age who’ve gone through the grinder without the benefits of some of the huge soul saving wins I can cling to and thus will happily regale anybody who will listen with all the times Code Complete/DRY has betrayed them (some times followed by a flogging of “I told you so’s from other, elder husks.)
tl;dr Code Complete advocates some ideas that fall apart in practicality; furthermore 30-somethings want nothing more than to answer your simple question with a paragraph (look at me go)
FideoSpecial 9 points · Jul 2020
Couldn’t agree more. I’ve been looking the same way at DRY the past couple of years. Decoupling is more important in my experience.
Quality reply 👍
Double_A_92 5 points · Jul 2020
Yeah, you shouldn't apply DRY to things that randomly happen to be similar.
ConspicuouslyBland 2 points · Jul 2020
So, where you wrote Code Complete, you meant Clean Code, right?
WarWizard 4 points · Jul 2020
These are great concepts, and should be guiding principals... but the idea of YAGNI applied to architecture is better IMO. Too often we find ourselves abstracting things to high heaven and only causing more trouble than it is worth.
I've come to find that copy and paste is fine... you just have to think about what you are doing before you do it. The reality is that abstractions complicate things and it isn't often necessary to go full bore. It'll more likely bite you in the ass.
[deleted] 16 points · Jul 2020
Lol only on reddit you can be downvoted for having a tame comment such as yours.
scandii 2 points · Jul 2020
the more functional programming is on the rise, the more everyone starts criticising OOP and related dogma, then some programs get written in functional programming and people all of a sudden realise functional programming has huge flaws just like OOP and we're back to OOP again.
this has been going on for about 40 years now, give or take. that is not a critique against functional programming, but rather just saying that this is absolutely nothing new.
there's nothing wrong with Clean Code. it's a 500 pages long book on ideas about how to circumvent common OOP-related issues with examples. most criticism tends to come from "well if you wrote functional code then..." or from people that simply don't have enough experience in domains that benefit from code refinement of the style clean code proposes, i.e mainly work with smaller applications where issues like DRY never really become apparent because there's simply not enough inter-connectivity in the code for it to matter and as such consider the proposals stupid because "I didn't need it when I wrote code".
as such, it's not a book for everyone, but what I tend to notice is that everyone critiques Clean Code on a very abstract level, i.e "Clean code is bad" or "I don't agree topic X the book brings up", but never "I don't agree with topic X, I propose we use Y for benefits A, B and C instead whereas X only really touches on C and poorly".
to me that is just a tell-tale sign that the people that deliver the critique:
all in all, I have to this day, never heard of anyone that read Clean Code, disagree with Clean Code outside of some very specific things like divergent code isn't always bad.
[deleted] 2 points · Jul 2020
The discussions have primarily been about whether it’s outdated and past it’s time. I don’t disagree that there are still things of value there.