Live data from Hacker News

Don't write clean code, write CRISP code

bitfieldconsulting.com

111–120 of 170 posts

Re: Don't write clean code, write CRISP code

#111

I like to read these kinds of prospective acronyms, because sometimes they provide new perspectives or leverage points that other, existing acronyms don't. And they are easier to remember than, say, an essay. DRY, for example, is instantly transferable to a bunch of other life practices and disciplines; people from dry cleaning to graphic design will hear about it and go "oh my god, I'm not really DRY but I totally c…

> how code either works or doesn't.

That's all "correct" is trying to mean here. As a synonym for "working". Can you share a bit more on the negative connotations of "correct"? Nothing comes to mind for me.

Re: Don't write clean code, write CRISP code

#112
post #17

Since 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".

I wish I had more context for Uncle Bab.

The Báb (born ʿAlí Muḥammad; 20 October 1819 – 9 July 1850) was the messianic founder of Bábism, and one of the central figures of the Baháʼí Faith. He was a merchant from Shiraz in Qajar Iran who, in 1844 at the age of 25, claimed to be a messenger of God. He took the title Báb (/bɑːb/; Arabic: باب; meaning "Gate" or "Door"), a reference to the deputy of the Hidden Imam, while instigating a religious revolution that proposed the abrogation of Islamic laws and traditions, and the establishment of a new religion.[1] Though he was popular among the lower classes, he faced opposition from the orthodox clergy and government, which eventually executed him and thousands of his followers, known as Bábís.

https://en.wikipedia.org/wiki/B%C3%A1b

Re: Don't write clean code, write CRISP code

#113

Earlier quoted context omitted.

Good old Uncle Bab! Love it. I have a borderline weird hatred towards the concept of "clean architecture".

I wish I had more context for Uncle Bab. The Báb (born ʿAlí Muḥammad; 20 October 1819 – 9 July 1850) was the messianic founder of Bábism, and one of the central figures of the Baháʼí Faith. He was a merchant from Shiraz in Qajar Iran who, in 1844 at the age of 25, claimed to be a messenger of God. He took the title Báb (/bɑːb/; Arabic: باب; meaning "Gate" or "Door"), a reference to the deputy of the Hidden Imam, whil…

https://en.wikipedia.org/wiki/Robert_C._Martin

Re: Don't write clean code, write CRISP code

#114
post #76

Earlier 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.

All non-political critiques which I have seen (here and elsewhere) always seem to turn out to be based on misunderstandings or exaggerations of what he actually has said or written (sometimes wildly so). Or, as it sometimes turns out, people hate him not for anything he has said, but because of how other people has misunderstood and misinterpreted him.

From what I have seen, every time he has been criticized sincerely, and he has become aware of it, he has engaged his critics in open debate, and they have come to amicable results, with him sometimes altering his views.

Re: Don't write clean code, write CRISP code

#115
post #23

Don't follow the concrete practices in the best-selling book* vetted by industry leaders for years, instead follow this set of 5 high level goals that I've generally described and grouped together into a catchy acronym. Yay me! * - Granted the book was written by an asshole.

> Don't follow the concrete practices in the best-selling book*

Argument by sales number. Good start.

> vetted by industry leaders for years

Self-appointed industry leaders, sure. They could by no means be wrong, right?

> instead follow this set of 5 high level goals that I've generally described and grouped together into a catchy acronym

Sounds like Uncle Bob's SOLID. If that's the case then I agree with you.

Re: Don't write clean code, write CRISP code

#119

Earlier quoted context omitted.

The only objective rule in SOLID is L: "Objects of a superclass should be replaceable with objects of its subclasses without breaking the application." And when you decipher it, it literally means "all X should act like X", which is already obvious. I.e. if "Y extends X" then Y is also X, so Y should act like X. The other rules are so vague and subjective, that you can spin them any way around to prove someone's code…

When possible, I prefer to do away with objects and have functions with types. X in, Y out.

A style I like as well, but methods are exactly that as well, only that `X` is implied, and there's a danger of abusing state (`f(X) -> Y` can and often is pure, whereas the entire point of methods is to be impure (modifying instance state)).

Re: Don't write clean code, write CRISP code

#120
post #100

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.

For me DRY is one of the most important principles for maintainable software. Imagine having to fix a bug at two independent places or having to add or change the same conceptual functionality at two different places (which you may not even be aware, because you don't remember you copied code somewhere else once) Totally unnecessary bugs guaranteed, and ready to be thrown away after some time, because a change will b…

Funny enough this happened to me yesterday. I had to do a small change of code in a component and then when I pushed the code I got an error back. After searching for what was happening, it was actually a code I copied and named "Component2" two years ago when I was starting out. Today I would not have made it the way I did, but in my first month...

And thank god for github actions! :D

Post reply on HN