DRY is probably my least favourite programming meme. There are far too many overzealous juniors who learned it and have a bee in their bonnet about creating absurd abstractions around any two lines of code (or config) that have vague or imagined similarities, locking in all sorts of annoying indirection.
Totally agreed. I've tried explain exactly this issue in a talk [1], trying to find a useful synthesis between different paradigms like KISS, DRY and YAGNI. [1] https://www.youtube.com/watch?v=0FIZn2trkoA&pp=ygUXbWljaGVsI...
Don't write clean code, write CRISP code
131–140 of 170 posts
Re: Don't write clean code, write CRISP code
#132Earlier quoted context omitted.
Uncle Bob has been widely criticized for his political stances, basically being a MAGA republican. This also spilled into some critiques of Clean Code which are sometimes colored by this.
Uncle Bob has been widely criticized for his political stances, basically being a MAGA republican. I don't think that's a fair representation of his critics. I've been reading (and even occasionally writing) critiques of Uncle Bob for many years, and you are literally the first person I've ever seen even mentioning is political stance. Up until 30 seconds ago I'd not once reflected over who Uncle Bob might vote for.
I disagree with some of his technical ideas, but that in itself would not warrant such a characterization.
Re: Don't write clean code, write CRISP code
#133What CRISP is supposed to mean: Correct Readable Idiomatic Simple Performant Notice that all this is just well-wishing and suitably vague, so that you feel the need to buy a book & hire a consultant to explain it to you. The trick is there's nothing to explain.
That way, no matter what you do, they can say you did it wrong, and no matter what they do, they can say it's right.
Re: Don't write clean code, write CRISP code
#134Since we’re adding new backronyms every day, I propose SIMPLE. S - Spaghetti: write tapestry of code like a chef. I - Interlinked: if the project has modules, they should all depend on each other (we are strongest when we can depend on one another). M - Micromanaged: if the product owner doesn’t expect reports in the daily stand-up, do they even care? P - Perplex: diversity for the codebase. L - Lazy: Bill Gates once…
Good old Uncle Bab! Love it. I have a borderline weird hatred towards the concept of "clean architecture".
Re: Don't write clean code, write CRISP code
#135Re: Don't write clean code, write CRISP code
#136Earlier quoted context omitted.
I put it second behind "premature optimisation" which is used to justify never caring about performance at all (until it's too late and you can't do anything about it).
Actual premature optimisation is harmful for the same reason as premature abstraction. In both cases, improvements that come "for free" should be done without thinking, but one they start to impact readability, we should consider how beneficial those changes really are.
Re: Don't write clean code, write CRISP code
#137Re: Don't write clean code, write CRISP code
#138Earlier quoted context omitted.
Uncle Bob has been widely criticized for his political stances, basically being a MAGA republican. I don't think that's a fair representation of his critics. I've been reading (and even occasionally writing) critiques of Uncle Bob for many years, and you are literally the first person I've ever seen even mentioning is political stance. Up until 30 seconds ago I'd not once reflected over who Uncle Bob might vote for.
But we're those critiques of him being a horrible person? I disagree with some of his technical ideas, but that in itself would not warrant such a characterization.
Re: Don't write clean code, write CRISP code
#139Re: Don't write clean code, write CRISP code
#140It is laughable talk about "Don't Repeat Yourself principle" on a strongly biased towards Golang article. A language that took 13 years to add a simple method (Index) that helped the programmer to find an element in an array (slice). Before that you had to write a for loop every time you wanted something from an array. Talk about "DRY" ... That is everything but "simple" as described in the article.