
Spelling and readability are very important for humans and not important for machines.
TL;DR: Take care of your names.
Problems
Readability
Harder to search terms in code.
Solutions
Spellcheck your code.
Use an IDE with spellchecking
Context
Many of us don't speak English as our first language.
We need to have extra care for our texts and names.
This article has a typo in its title as proof of context and also a clickbait😀
Sample Code
Wrong
comboFeededBySupplyer = supplyer.providers();
Right
comboFedBySupplier = supplier.providers();
Detection
[X] Manual
- We need to read the code in a peer review.
[X] Automatic
- Some IDEs have warnings on the typos.
Tags
Readability
Naming
Conclusion
Pay close attention to your names.
You will probably be the person reading the code in a few months.
More Info
Credits
Photo by Brett Jordan on Unsplash
Inside every well-written large program is a well-written small program.
C.A.R. Hoare
This article is part of the CodeSmell Series.
About the author
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Comments
Join the discussionAlso, spelling mistakes make it more difficult to search for a term in your code, if you search for it using the correct word.
Nice ! I'll add it!
Code Smells
In this series, we will see several symptoms and situations that make us doubt the quality of our developments. We will present possible solutions. Most are just clues. They are no hard rules.





