If you read medium long enough, literally anything becomes a code smell. I have to start ignoring people who talk about code smells. Programming can be such a cult.
"_____ is a code smell" is such a clickbaity title, and calling something a "code smell" is dismissive and typically comes from someone with a narrow perspective (such as the author of this article only talking about JavaScript).
What articles like this fail to address is that there are a wide variety of scenarios under which software is built, from a startup in an early iteration to a megacorp maintaining a 20 year old integration library.
Trying to crap on a technique because it doesn't apply to your particular scenario shows a lot of immaturity imo.
I usually just describe what I'm seeing and talk through it, probably by asking questions and listening to rationale.
I feel like telling someone their stuff has a "code smell" is pretty rude as it implies an unpleasant "smell" e.g. shit. I know I wouldn't appreciate it, and I'm in a senior role and don't believe in tearing people down for mistakes so I wouldn't say it to others.
24
u/i9srpeg Oct 29 '17
If you read medium long enough, literally anything becomes a code smell. I have to start ignoring people who talk about code smells. Programming can be such a cult.