Skip to content
DevMeme
5300 of 7590
DesignPatterns Architecture Post #5813 · source on Telegram

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

26
Anonymous ★ Top Pick 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
  1. Anonymous ★ Top Pick

    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

  2. Anonymous

    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

  3. Anonymous

    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

  4. Anonymous

    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?'

  5. Anonymous

    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

  6. Anonymous

    FP purity? Nah, real architects nest factories until nulls echo through the inheritance abyss like a bad design pattern symphony

  7. Anonymous

    Nothing like a 5-deep inheritance chain and a FactoriesFactoryManagerSingleton to turn null handling into your type system - NPE-driven architecture at enterprise scale

  8. @koloslolya 2y

    don't qq

  9. @Sp1cyP3pp3r 2y

    my refactoring ass: 🤭

  10. @sylfn 2y

    google golden ratio

  11. @Araalith 2y

    Still better than "functional" programming.

  12. @paul_thunder 2y

    What do they actually mean by the term "functional"?

    1. @Artkash 2y

      functioning

    2. Deleted Account 2y

      Not sure considering most languages support FP features

  13. @SirMeowingtons5 2y

    Who implemented these 5 levels of inheritance?

  14. @pwnzkk 2y

    ItemsFactoryFactoryImpl is much better than CoproFunctors and IOMonad

  15. @ZgGPuo8dZef58K6hxxGVj3Z2 2y

    Can somebody explain what singleton is?

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 2y

      Is that some high level programming style?

  16. @ZgGPuo8dZef58K6hxxGVj3Z2 2y

    Bruh wtf why?

    1. valentyn 2y

      can be used for global conf eg database connection

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 2y

        Okay I am not very used to dbs so I can’t really say much with confidence but sounds interesting

        1. @Vlasoov 2y

          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

          1. @ZgGPuo8dZef58K6hxxGVj3Z2 2y

            Okay but whats the benefit of singleton?

            1. @Vlasoov 2y

              You can access it from everywhere through class interface without knowing where it was instantiated

            2. @CcxCZ 2y

              https://wiki.c2.com/?SingletonPattern https://en.m.wikipedia.org/wiki/Singleton_pattern

  17. @dsmagikswsa 2y

    Me doing procedural programming mainly be like 😀

Use J and K for navigation