So, I heard a lot about OOP and how challenging it is. What are your advice for learning OOP the right way?
Also your recommendations: videos , resources ,online courses on the subject
If you have personal experience about OOP I would appreciate that as well.
The best way to learn OOP is just to write object-oriented programs. Re-visit software you have already re-written and see how you could re-factor it to use OOP concepts and practices. As well as this think of some real life examples to practice things like objects and inheritance. For example, why not create a car class and have it inherit from a class called vehicles which contains some general vehicle methods and properties.
See if you can figure out how to do this. I know it might seem hard but one of the best ways to learn something like this is just to dive into the deep end and see what you can figure out.
If you have any more questions then don't hesitate to ask them!
understand the core problem OOP wanted to solve -> uncontrollable mutations of the global state.
OOP took the "control" approach -> "who (which object) is allowed to read or write from/to what (private only the owning object can write and read, public everyone can write/read that property, protected, friend and so on are variations of access permissions)".
Oh and one thing is important too, as soon as it's compile probably there are no more objects just simple machine / assembler code instructions.
The rest is a lot of taste and every language has approach for example ;D
Java and GO both object oriented, automated GC but the language design is very different.
I would recommend to start with the basics how your language works and after that go to the design / architecture patterns. Than I would recommend Clean Code and The pragmatic programmer.
And than join the rest of us being clueless and opinionated at the same time because in our case our strategy worked ;D ....
Get every Sandy Metz book you can get your hands on. All are written in Ruby but the principals still apply to all true OOP implementations.
Ryosuke
Designer / Developer / Influencer
It's all about learning the core concepts, and working on real world applications of those principles. Start simply, scale larger to discover gaps in your education, and head back to documentation/tutorials to pick up more.
My advice on learning OOP:
Congrats, now you've got a knowledge of SOLID _(p)_OOP.