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!
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 and “What” Comments from the catalog)
“Some people do a bad job commenting and updating comments, so lets not do comments” is not an approach that works for me.
Most of my code is at the prototype level. I’m concepting something out, usually paired with hardware.
If someone can’t follow what I’m doing, its going to lead to problems. If a change happens to the hardware being controlled, code will not be good enough on its own.
Rather than being accepting of bad commenting practice, make comments (and updating them properly) part of good practice. In my experience, It saves time in the long run and leads to better code at the end.
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 and “What” Comments from the catalog)
“Some people do a bad job commenting and updating comments, so lets not do comments” is not an approach that works for me.
Most of my code is at the prototype level. I’m concepting something out, usually paired with hardware.
If someone can’t follow what I’m doing, its going to lead to problems. If a change happens to the hardware being controlled, code will not be good enough on its own.
Rather than being accepting of bad commenting practice, make comments (and updating them properly) part of good practice. In my experience, It saves time in the long run and leads to better code at the end.