Code Smell 22 - Helpers
Do you need help? Who are you gonna call?
TL;DR: Helpers don't help. They are a non-cohesive bunch of messy subroutines.
Problems
Readability
The Least surprise principle
Bijection Fault
Static methods
https://maximilianocontieri.com/what-exa...
maximilianocontieri.com2 min read
Yonatan Karp-Rudin
Senior Backend Software Engineer
Great article! a few small typos:
-the function
getCategory()gets the user's score, but in its usage, you're passing the entire user object.In the right example, the naming function gets
userscoreas the paramer, while it should (for the best of my understanding) beuser.Same goes for the score that in the right approach accepts
userscore1as parameter (which for me also feels a bit like a code smell as there is only 1 parameter)