Software Engineer
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Markdown supported · ⌘↵ to post
Hi, just stumbled across this post. A question came to mind after I read this post.
Why not just single functions, instead of creating new instances?
Yonatan Karp-Rudin
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)