Ever heard of Er class? It’s right there in your project, in your codebase; moreover it’s in every single project (larger than ‘Hello World’ =).
Every time you don’t know where to plug your neat piece of code, here comes an Er class:
- “Errrrr… Where should I put that logic?” (Er class is yet an Errrrr class…)
- “I know! Let’s throw it into ApplicationManager, sounds like a right place to do it!” (Boooo!)
Here are exemplary Er classes: BlahBlahManager, BlahBlahHandler, BlahBlahBuilder… Sounds familiar? Bottomless code buckets usually have common naming convention…
- Avoid non-specific class names. That leads directly to making your classes specific and SRP-y.
- You want to create BlahBlahManager? Hint: you’re likely to create an Er class.
BTW, Er class is Duncan’s idea.