DEV Community

Discussion on: Explain "Code Smells" like I'm five

Collapse
 
ashleyjsheridan profile image
Ashley Sheridan

I don't know if that's entirely fair, but I must assume that that has been your experience so far?

Personally, I dislike the term "code smell", but I appreciate the concept it's trying to convey. Yes, it can be a blunt tool used by developers who blindly follow coding standards dogmatically, but even Robert Martin himself argues against that.

In terms of the code review usage, I take the approach that anything I make a comment on is something that I would be ok if someone left the same (or equivalent) comment on some of my own code during a review. Code reviews should never be used by a senior (either in general development terms or in a specific language) developer to try and show up one who is less senior. They're a place to learn, and that goes both ways. They should also be treated like any face-to-face conversation in that rudeness should be unacceptable. Besides, being civil to people always gets better results than rudeness.

So, I hope you're not completely put off by the concept of a "code smell" (again, I think it's a poor naming choice) because it really can lead any developer to be better when the concept is used appropriately.