Programmers are people, and like people we come from different backgrounds. This affects how we first learned to code. For some, it can be from formal education in computing (tertiary education) and for others, they are self-taught out of an interest or necessity. The quality of code produced can be seen (but it also depends on the individuals themselves).
People who learn to code from formal courses tend to have a structured method of coding, where else those who are self-taught have multiple ways to approach an issue but may lack a standardized way of coding. One thing that both groups have in common with one another is that they are not exempt from writing code that ‘smells’ from time to time.
Code smells, also known as bad smells, in computing refers to any symptom in the source code of a program that possibly indicates a deeper problem.
Some examples of code smells that you can learn are:
- Clear Naming Conventions
- Stay DRY
- Long Parameter Lists
In this post, the author explains about what is code smell is all about and how it can be prevented.