---
title: "Discussion on \"Code Smell 22 - Helpers\" | Hashnode"
description: "Discussion on \"Code Smell 22 - Helpers\". Helpers are a code smell. They are a non cohesive bunch of messy subrutines."
url: "https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Code Smell 22 - Helpers](https://maximilianocontieri.com/code-smell-22-helpers?utm_source=hashnode&utm_medium=feed)

Helpers are a code smell. They are a non cohesive bunch of messy subrutines.

Nov 12, 2020 · 2 min read · maximilianocontieri.com  
Updated Jul 4, 2021  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#naming](https://hashnode.com/tag/naming)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#code-smell](https://hashnode.com/tag/code-smell)
-   [#refactoring](https://hashnode.com/tag/refactoring)

## Written by

[Maxi Contieri](https://hashnode.com/@mcsee)

@mcsee · Buenos Aires

  
[View profile](https://hashnode.com/@mcsee)

Software Engineer

I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.

## Responses 3

Markdown supported · ⌘↵ to post

[Yonatan Karp-Rudin](https://hashnode.com/@yonatankarp)

[Dec 13, 2022](https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c/comment/63983bbd32e52b31f1388c58)

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 `userscore` as the paramer, while it should (for the best of my understanding) be `user`.
    
-   Same goes for the score that in the right approach accepts `userscore1` as parameter (which for me also feels a bit like a code smell as there is only 1 parameter)
    

[Sy Hung Doan](https://hashnode.com/@hungdoansy)

[Nov 12, 2020](https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c/comment/5fad3646fa438d6532c7e0fd)

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?

[Maxi Contieri](https://hashnode.com/@mcsee)

[Nov 12, 2020](https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c/comment/5fad3646fa438d6532c7e0fd#reply-5fad43c7fa438d6532c7e259)

Hy [Sy Hung Doan](https://hashnode.com/@dshung1997). Thanks for asking.

That would be another smell

[mcsee.hashnode.dev/code-smell-21-anonymous-functi…](https://mcsee.hashnode.dev/code-smell-21-anonymous-functions-abusers)

Single functions are harder to unit test, to read, to reuse and to compose. They may be the first option, but once system gets serious they should be reified

[Sy Hung Doan](https://hashnode.com/@hungdoansy)

[Nov 13, 2020](https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c/comment/5fad3646fa438d6532c7e0fd#reply-5faddfc98f0a0265534794bc)

Hi [Maxi Contieri](https://hashnode.com/@mcsee), Thanks for the prompt response. However, I am still on the fence. In my current project (React & Redux), we exclusively use (anonymous) functions as they are small and writing unit tests are just a breeze. I just feel like they've been convenient enough.

The code is well maintained from time to time, but no one talked about switching to use Class helpers.

I doubt if it's just a matter of preference or the scope of the projects. Mind if I ask for some more examples for the Problems you mentioned in the Code-smell-21? I'd be very glad to have a better view and understanding.

[Maxi Contieri](https://hashnode.com/@mcsee)

[Nov 13, 2020](https://hashnode.com/posts/code-smell-22-helpers/5facb262fa438d6532c7d74c/comment/5fad3646fa438d6532c7e0fd#reply-5fadeee5fa438d6532c7eac2)

hi [Sy Hung Doan](https://hashnode.com/@dshung1997)

Some quick questions

-   How many functions are?
    
-   How large is the team?
    
-   How do you unit test it?
    
-   Do you have good coding names?
    

Can you embed an example?
