this post was submitted on 10 Feb 2026
309 points (95.8% liked)

Programmer Humor

29741 readers
1814 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] tiramichu@sh.itjust.works 165 points 4 days ago (40 children)

I'll say this now.

Inheritance is the most misused capability of OOP which programmers think makes their code look smart, but most of the time just makes a giant fucking mess.

[–] mesamunefire@piefed.social 42 points 4 days ago (20 children)

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.

[–] grendel84@tiny.tilde.website 3 points 4 days ago (1 children)

@mesamunefire
@tiramichu

I totally agree on this. I found that often things that appeared to need inheritance at first glance often didn't if I gave deeper thought to it.

Granted I was working on much smaller projects rather than crazy huge multi team enterprise apps, but I'd guess that even then this is a good "rule of thumb".

[–] mesamunefire@piefed.social 2 points 4 days ago

Cool, good to know someone else has the same experience.

Ive been on a couple of multi-year projects and they are NOT fun with OOP + developer went crazy with patterns they were experimenting at the time. Its what made the "rule" pop up to begin with.

load more comments (18 replies)
load more comments (37 replies)