DEV Community

Discussion on: What Is A "Code Smell"?

Collapse
 
jingxue profile image
Jing Xue

The proliferation of "code smell" or "anti-pattern" has a lot to do with the code quality tools in wide use, for the last 10-15 years - you know, those scanners coded with simplistic rules that would happily slap a Code Smell on every function 1 line over some arbitrarily set limit.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

This is a great point. Although I feel personally feel that "code smell" and "anti-pattern" are usually deployed via non-algorithmic means (meaning: by people slapping their opinions on things), I will also confirm that code scanners bear some small bit of "guilt" in this. "Code smell" is an inherently unquantifiable term. So any time we try to attach quantifiable rules to it, it becomes an even more egregious phrase.