Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can understand how `InboundRequestContextFinderProviderFactory` comes about, hopefully due to a very mature, thorough testing environment where your `InboundRequestContextFinder` is injected via a provider and that provider needs to be constructed for different environments.

Though it does seem like perhaps the Finder itself is possibly an unnecessary abstraction.

Frankly, the longer I work, the more comfortable I am seeing these kinds of things. They can be misused, but they are also necessary for some really good things too. The absurd names are funny, but also somewhat standardized enough to be a signal on their own.



Yeah, out of context it may seem weird. And if you just call it FactoryFactoryFactory that's bad design with bad naming. But the fact it exists is not weird as long as you don't use it all the time.

I mean, any time you use a an ORM which can use multiple backends and inject runtime/test implementation, you have 3 or 4 levels of factories to create the actual model instance. They're just named much better.


> The absurd names are funny, but also somewhat standardized enough to be a signal on their own.

They are a form of Hungarian notation[0], made popular in MS Windows C code:

  In its original form, Hungarian notation gives
  semantic information about a variable, telling
  you the intended use.
In this iteration, the Hungarian notation is encoded as "canonical suffix words for a class" instead of "canonical prefix characters for a variable."

Both uses are, in my not-so-humble opinion, anti-patterns to be avoided.

0 - https://en.wikipedia.org/wiki/Hungarian_notation

1 - https://learn.microsoft.com/en-us/windows/win32/learnwin32/w...


Stockholm Syndrome?


SyndromeSyndrome


StockholmSyndromeContextRequestBeanInstantiationStrategyDefinitionGeneratorFactoryFactoryFactory




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: