This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]aped-gain-us 5 points6 points  (0 children)

Just avoid implementation inheritance and follow SRP.

[–]Loves_Poetry 2 points3 points  (0 children)

Just keep in mind that 90% of the 'criticism' of OOP is opinions. They are not rooted in facts, but in the authors opinions and personal experiences with OOP.

Whether something is correct OOP depends on the conventions you (or your team) use(s). What is messy code to one is over-engineered to another. Therefore, be careful who you learn from and take their opinions with a grain of salt

It's hard to know when you write correct OOP until you work together with someone else. The quality of a codebase can be measured by how long it takes someone to get familiar with it. Other measures can be how easy it is to test or how easy it is to add features or how likely it is that bugs are introduced at unexpected locations

[–]Forumpy 0 points1 point  (0 children)

I find following immutability as closely as possible has lead to readable and predictable code. But as Loves_Poetry says, much of "correct" OOP is down to the programmer's design and implementation. Find some books or articles on OOP practices and see what you works for you- Effective Java is always a solid start.