+ 8

OOP is too hard...

I can't learn OOP! I tried that with python and c# but I don't understand anything. What do I do? Please help. Note: I have a book for learning js (Stive Suehring's book). Should I learn OOP with that?

20th Jul 2019, 9:22 AM
AZunderstars - avatar
16 Answers
+ 12
Classes are a way to group properties and methods together inside same data structure. Think of a class as a recipe. The objects are the actual meal that was cooked following this recipe. One way to become better with OOP is to practice philosophing on what makes simple objects special. For example, ask yourself "What is a banana?" or "What is a triangle?" class Triangle{ //properties like coords a,b,c; //methods like draw(){ } }
20th Jul 2019, 10:49 PM
ChillPill 🌶
ChillPill 🌶 - avatar
+ 9
Try to learn Java, it's really good for OOP
20th Jul 2019, 4:32 PM
Salif Mehmed 🇹🇷🇧🇬
Salif Mehmed  🇹🇷🇧🇬 - avatar
+ 6
I would just stick to functions (if the language allows it) for a while. After some time, classes will naturally start to make more sense.
20th Jul 2019, 10:36 AM
HonFu - avatar
+ 6
theres a mit course in youtube with OOP it really helps me.
21st Jul 2019, 8:24 PM
Danielov - avatar
+ 4
AZunderstars for me it took a while.. I started with basic coding... I have started moving into the more advanced topics like OOP... writing code has helped me more so than reading a book. I'm not knocking reading as it is important too. For most individuals, it takes a while to fully understand... you are not alone... I am not familiar with that book. the concept of OOP will be the same in an OOP language... I have seen a few different explanations on OOP. Some authors do a better job at it than other authors.... you might also try youtube... there are some good tutorial videos.. which may help... sometimes seeing it visually and walking through the code with someone helps
20th Jul 2019, 10:29 AM
+ 4
nope...... it becomes hard after learning....... 😊
21st Jul 2019, 2:58 AM
Aditya - avatar
+ 3
You must try to remember and try to coding with what you've learning before about OOP for phyton or C#. Its the important way to learn OOP.
20th Jul 2019, 10:12 AM
Dwi Novianto Nugroho
Dwi Novianto Nugroho - avatar
+ 3
yes, OOP is hard espcially for beginners. I remembered learning OOP in C# during my second year at university. I spent most of my time in both semesters to read and practise many sections in a C# book which consists of over 200 pages that is about OOP. Honestly, over 200 pages should not take that long. I think the most difficult thing is the concepts. Be patient and learn the concepts and then practise. You don’t need to learn OOP in different languages when you start your first learning. You said you had tried Python and C#. I’ve learnt both Python and C#. I think it’s a better choice to learn OOP in C#. C# is a true OOP language while Python supports both OOP and funtional programming. After learning OOP in one programming language, it’s not really difficult to learn in the others.
20th Jul 2019, 5:16 PM
Kimhor - avatar
+ 3
OOP is based on describing real/imaginary world, objects can be people, animals, cars, etc. And methods/functions are what they can do. For teaching the understanding OOP we use JAVA, that is natively OOP and you could use simple IDE "BlueJ", which can kind-of visualise objects.
21st Jul 2019, 7:49 AM
geproha - avatar
+ 3
All I see here is that you should stick to OOP. I do not agree. If you have a hard time dealing with OOP, maybe you should try something different. I could think of 3 alternatives: Try python as a scripting language. The duck type approach is much easier to start with and the scripting is more beginner friendly. The OOP part of python is actually quite a hassle Learn Prototyping with JavaScript. Have a look into your book if they have a chapter on that. Learn Functional Programming. This is a bit more natural to people that are strong in mathematics but struggle with coding. Just start with "Learn Haskell for a greater good". The book is online. Give yourself a week for every of them. After that you should see a result and know if there is a better paradigm for you.
21st Jul 2019, 11:36 PM
+ 2
Learn OOP with real time examples. For example,take objects as a real time entity.e.g.Person as a object and what operations he can do are the methods.A person can walk ,read and write too.So these are the methods of the object Person.Class is user defined data type in which we can bind the information of person and methods of person together.. How to use classes with object,this is all about OOP..
21st Jul 2019, 4:06 PM
Shubham Chaudhari
Shubham Chaudhari - avatar
+ 2
Well,don't worry.It is not so hard as you mean. OOP is the answer to many pitfalls in pure structural programming.For that reason you should not understand the concept at the moment. It is not about the language itself but it is mainly about the architecture and concept of the software. Lots of examples in the books are ideologically right but they are not usable in the real projects.Python is not good to start with OOP. Much better is Java or C#.It is important to understand the concept about inheritance and encapsulation.Inheritance is powerfull princip that allows you to avoid the copy the same part of code in different parts sw.Encapsulation allows you to hide the internal implementation of the object and use only interface and public functions. More difficult to understand is polymorphism,you can leave it for the future. On the base of these principels are created desing patterns which sloves the moste challenges or softwares difficuties. Good luck 🤘
21st Jul 2019, 7:22 PM
Highman - avatar
+ 2
22nd Jul 2019, 2:06 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
try learning OOP with UML (Unified Modeling Language). It will help you to understand objects visually
22nd Jul 2019, 5:28 AM
Logomonic Learning
Logomonic Learning - avatar
+ 2
When it comes to javascript OOP (object oriented programming) is a style of programming. If you know how to create an object: myObject = {property :value} and how to manipulate it, then you are good to go. There is also Functional programming which is a style where functions are preferred over objects. My suggestion is get comfortable with the language. Learn about Arrays, Objects and Functions. Just program and stop fretting about fancy things. You will eventually end up with OOP or POOP. 👍 Keep it simple. If it works it is good.
22nd Jul 2019, 9:09 AM
Ryan Els
Ryan Els - avatar
that's ok , OOP is broken, use functional programming language like clojure etc., it;s not your fault.
26th Jun 2020, 5:37 PM
Eman Manlunas
Eman Manlunas - avatar