DEV Community

Discussion on: Are utils (folder where you put random stuff you don’t know where to put otherwise) a code smell?

Collapse
 
dumazy profile image
Fré Dumazy

I don't like it. The worst is when you start working in an existing codebase that has this and you find yourself losing so much time finding these, or possibly recreating the same functions because you didn't know there's something for that.

However, structure is something that constantly evolves. If I don't know where to put something and don't want to end up in analysis paralysis, I might name the folder or file something like "reorganizethis-functions-for-feature-x". By applying constant refactoring these will find their way to a better place soon enough (mostly by the end of the day even).