Im on the fedi doin fedi things.

  • 1.04K Posts
  • 2.19K Comments
Joined 1 year ago
cake
Cake day: December 27th, 2024

help-circle






























  • mesa@piefed.socialtoProgrammer Humor@programming.devOOP at home:
    link
    fedilink
    English
    arrow-up
    43
    arrow-down
    1
    ·
    2 days ago

    Its the best/worst thing about OOP no matter what language.

    We had a rule at work that if you are 3 levels or more down an inheritance tree, then you are too far. The cognitive load is just too much, plus everything stops making sense.

    One level can be great (MVC all have great conventions, MCP as well). Two can be pushing it (Strategy pattern when you have physical devices and cant be connected all the time, Certain kinds of business logic that repeat hundreds of times, etc…) But even there you are kinda pushing it.

    I need code that I can look at a month from now and know WTF is happening. And sometimes its better to have less DRY and more comprehension. Or maybe im just a forever mediocre dev and dont see the “light”. I dunno.