A collection of Bad Code Smells in a Catalog form for Developers & Researchers. Code Smell is a typical bad code implementation, and learning these concepts immiedietly makes you a better developer!
Sure, it makes you have less lines for your l33t code solutions, but in the real world, it sacrifices the maintainability of code that others will eventually work on.
Between a clever 1 line fix and maintainable 10 line fix, I’ll choose the 10 line every time.
It’s often a good idea to make the code itself very explicit through verbose function and variable names, rather than writing comments that could lead to inconsistencies between code and comments (by not updating the comments at the same time as the code) (see “Fallacious Comments” from the catalog)
I’ve been rallying against clever code for years!
Sure, it makes you have less lines for your l33t code solutions, but in the real world, it sacrifices the maintainability of code that others will eventually work on.
Between a clever 1 line fix and maintainable 10 line fix, I’ll choose the 10 line every time.
As an extensive commenter, I completely agree.
I need to know wtf I was doing, making it convoluted to save a few lines is pointless.
It’s often a good idea to make the code itself very explicit through verbose function and variable names, rather than writing comments that could lead to inconsistencies between code and comments (by not updating the comments at the same time as the code) (see “Fallacious Comments” from the catalog)