A Love Letter to Over-Engineered Object-Oriented Programming
Description
A screenshot of a tweet from user Aron Adler (@Aron_Adler). The tweet is displayed in white text on a black background. It sarcastically rejects functional programming in favor of overly complex object-oriented practices. The full text reads: "'functional programming? no thanks I prefer 5 levels of inheritance for my FactoriesFactoryManagerSingleton with a couple null checks every 3-4 lines'. The humor is derived from its sharp critique of common software development anti-patterns, particularly those associated with older, enterprise-style Java or C# codebases. It mocks deep and brittle inheritance hierarchies, ridiculously verbose class names that shoehorn multiple design patterns (Factory, Singleton) together, and the resulting fragile code that requires constant null-checking. It's a relatable joke for any senior developer who has had to maintain such a codebase
Comments
26Comment deleted
The original architect of the FactoriesFactoryManagerSingleton is a legend. They say he could abstract an abstraction, wrap it in a proxy, and still have it pass the daily build, leaving the problem of what it actually does as an exercise for the maintenance team
Why pass a pure function when you can pass the trauma? Our codebase extends AbstractChainedFactoryManagerSingletonProvider<T> all the way back to SVN history - by the time a null sneaks through, it’s practically an heirloom
The only thing deeper than that inheritance hierarchy is the stack trace when your FactoriesFactoryManagerSingleton throws a NullPointerException in production at 3am, requiring you to traverse through AbstractBaseFactoryImpl, FactoryProviderInterface, and three proxy layers just to find out someone forgot to initialize the config bean
Ah yes, the classic FactoriesFactoryManagerSingleton - because why use a simple function when you can architect a monument to enterprise complexity? Five inheritance levels deep ensures that when something breaks at 3 AM, you'll need to traverse an entire genealogical tree just to understand what's happening. And those null checks every few lines? That's not defensive programming, that's Stockholm syndrome from languages that never heard of Option types. Meanwhile, functional programmers are over here composing pure functions like it's 1958 and Lisp just dropped, wondering why we're still manually checking if objects exist before calling methods on them. But hey, at least your UML diagrams look impressive in architecture reviews - right before someone asks 'couldn't this just be a function?'
Five layers of inheritance and a Singleton - congrats, you’ve reinvented a global service locator where the null checks moonlight as your runtime-only type system
FP purity? Nah, real architects nest factories until nulls echo through the inheritance abyss like a bad design pattern symphony
Nothing like a 5-deep inheritance chain and a FactoriesFactoryManagerSingleton to turn null handling into your type system - NPE-driven architecture at enterprise scale
don't qq Comment deleted
my refactoring ass: 🤭 Comment deleted
google golden ratio Comment deleted
Still better than "functional" programming. Comment deleted
What do they actually mean by the term "functional"? Comment deleted
functioning Comment deleted
Not sure considering most languages support FP features Comment deleted
Who implemented these 5 levels of inheritance? Comment deleted
ItemsFactoryFactoryImpl is much better than CoproFunctors and IOMonad Comment deleted
Can somebody explain what singleton is? Comment deleted
Is that some high level programming style? Comment deleted
Bruh wtf why? Comment deleted
can be used for global conf eg database connection Comment deleted
Okay I am not very used to dbs so I can’t really say much with confidence but sounds interesting Comment deleted
Imagine you have an app that needs a threadpool to run REST requests in a background. If it's a client app, usually one threadpool is sufficient, so it's easier to write client code with one global threadpool in mind Comment deleted
Okay but whats the benefit of singleton? Comment deleted
You can access it from everywhere through class interface without knowing where it was instantiated Comment deleted
https://wiki.c2.com/?SingletonPattern https://en.m.wikipedia.org/wiki/Singleton_pattern Comment deleted
Me doing procedural programming mainly be like 😀 Comment deleted