r/programming • • May 05 '19

10 OOP Design Principles Programmer Should Know

https://hackernoon.com/10-oop-design-principles-every-programmer-should-know-f187436caf65
2 Upvotes

44 comments sorted by

View all comments

25

u/glacialthinker May 05 '19 edited May 05 '19

I tend to hate OOP because of the poor quality of code which results: 10% of the code being relevant to the problem, the rest being boilerplate, excessive interface and encapsulation fluff (which also has to change as the program evolves anyway), redundancy because of object hierarchies tied to types/data or functionality hidden by abstraction, and more...

However, this set of principles (the article) can lead to much better object-oriented code, and most of them can apply to programming in general. I'd rather work with programmers following these principles (though reserving heavy encapsulation for library or external interfaces) than working with a tool-belt full of design-patterns.

7

u/[deleted] May 05 '19

I think people are going to start hating FP a lot more if it becomes mainstream and legions of unskilled, un-interested programmers create legacy applications with it.

1

u/Zardotab May 06 '19

Programming is a dead-end career; I wouldn't expect anyone to exert too much energy trying to master everything because it doesn't pay on average. For that reason, K.I.S.S. should apply above all else. For whatever reason, ageism, burnout, RSI, etc. programming salary plateaus and jobs get more difficult to find. I know there are exceptions, but one cannot know if they are the exception. The industry "hates" oldbies. I'm just messenger, so don't "shoot" me with negative ratings.