Re:Flags Are a Code Smell (2014)
by jamesgreenleaf on Saturday May 21, 2022 @08:11PM
(#31463543)
I'm becoming convinced that using the phrase "code smell" might as well be a "smell" itself. Maybe it's just me, but I've only heard the phrase used as a rhetorical mask for a developer to express some individual preference as though it were an objective fact.
[ Parent
| on HN ]
When somebody tells you about code smell, ask them to describe the smell. If they can describe it, then you can weigh the merit of their arguments. If 'describe the smell' stumps them, brush their remark aside until they can come back with something more substantial.
Re:Flags Are a Code Smell (2014)
by Brian_K_White on Saturday May 21, 2022 @10:34PM
(#31464394)
Can you describe describing the smell of a code smell?
Are you saying that sometimes people say "x is a code smell" without saying what the issue is?
> Are you saying that sometimes people say "x is a code smell" without saying what the issue is?
Oh yeah... CRs with lines marked simply "code smell", not even an "x is a".
Re:Flags Are a Code Smell (2014)
by Brian_K_White on Sunday May 22, 2022 @11:14AM
(#31469034)
Hah, wow. I'd have some fun with that. "Is it blueberry?"
Re:Flags Are a Code Smell (2014)
by jamesgreenleaf on Sunday May 22, 2022 @08:51AM
(#31467586)
Good idea. But now I'm imagining devs as sommeliers, picking out floral notes and hints of oak.
A lot of IDE plugins will tag code smell as things that may potentially be a bug in your code. I like that more objective use of the term.
Re:Flags Are a Code Smell (2014)
by mostlylurks on Saturday May 21, 2022 @08:43PM
(#31463756)
Those preferences come from experience. If experience tells you that code written in a certain manner consistently causes certain categories of issues later down the road, it's perfectly justified to be wary of such code.
More taste than smell, then.
Re:Flags Are a Code Smell (2014)
by jamesgreenleaf on Saturday May 21, 2022 @08:15PM
(#31463564)
Now you're making sense.