DEV Community

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

Collapse
 
ssimontis profile image
Scott Simontis

I have a repo of scripts and base classes for functional patterns. I just pick and choose what I need from the kit, I've seen far too many companies insist on putting the company Utility library in every project, only for it to get called twice or to realize no one even knows what it contains anymore.

Collapse
 
noway profile image
Ilia

whole-company Utility library seems to be quite a departure from original simplicity of just Utils. If it's shared accross multiple projects, it sounds like it is an stdlib, and should be treated as such! (stable api, versioning, a lot of thoughts put into designing it, etc)

Utils in my view is project-specific and can be changed atomically within the whole project - you can decide to completely eliminate all Utils functions by inlining them everywhere - in a single commit.