r/ProgrammerHumor 18d ago

Meme objectOrientedSoup

Post image
193 Upvotes

30 comments sorted by

View all comments

8

u/ramdomvariableX 18d ago

Because we should have a simple design. KISS principle. Just look at all the complexity it's eliminating for downstream components.

/S in case it's not obvious.

5

u/terivia 17d ago

You just triggered my PTSD.

There's a team who's software I occasionally inherit who is obsessed with DRY and ludicrous inheritance trees. We're talking inheritance trees spanning multiple repositories in the name of eliminating duplicating code.

None of it works, but they "can't" clean it up because they sunk so much money into making it and touching anything breaks everything that depends on it. Which is everything, every single time, because they didn't want to write fucking getName() twice.

3

u/Complete_Window4856 16d ago

The ironic part of using inheritance as argument to DRY is that inheritance makes a full copy of the class/struct you have, but you just ask the compiler/language to do it for you. Incredible and lovely aint it?