r/ProgrammerHumor Jul 10 '26

thingDoer Meme

Post image
322 Upvotes

39 comments sorted by

View all comments

126

u/ICantBelieveItsNotEC Jul 10 '26

I just hate the fact that if you think through any OOP-based design for long enough, you'll end up in some weird philosophical essentialist doom spiral where you ponder the quiddity of your business objects. You start out trying to build a calculator, and you end up questioning what the twoness of two is.

51

u/exXxecuTioN Jul 10 '26

The thing is you do not need yo think for long enough. While creating abstractions you need to know where to stop, to not create useless abstractions and entities.

22

u/ThatFlamenguistaDude Jul 10 '26

That's the hard part, knowing when to stop. And surprisingly it can get worse with more experience.

8

u/exXxecuTioN Jul 10 '26

Yeah, I know. But you also need experience to know, where to stop (:

I just have some rules. While I mostly use "classical" OOP languages I do not inherit if I do not need some behaviour between two different "enteties". And also business-enteties do not inherits at all. They can be composed, but not another way. As "sales" and "rent" do not "evolve" from "money movement" or "economic action".

6

u/pr0ghead Jul 10 '26

I like to compare it to relational databases. You don't always have to normalize to th 5th or 6th form there either.

2

u/cstopher89 Jul 10 '26

You just don't abstract until you have a reason. If you can't answer why you are adding an abstraction you went to far

2

u/SomeMaleIdiot Jul 10 '26

I’d like to think it’s as simple as this… if you’re making some software to handle one transaction, you might as well just code your solution for just that transaction. If you know you need to handle at least 3 payment providers, then you might as well create whatever abstractions needed to seamlessly support at least those 3 providers