Object-oriented Programming in 7 minutes | Mosh
Вставка
- Опубліковано 21 лип 2024
- Get the COMPLETE COURSE: bit.ly/2keDCna
4 pillars of object-oriented programming: encapsulation, abstraction, inheritance and polymorphism.
Subscribe for more videos:
/ @programmingwithmosh
Want to learn more from me? Check out my blog and courses:
codewithmosh.com
programmingwithmosh.com
/ programmingwithmosh
/ moshhamedani
Finally an example of OOP without a car! Thank you!
Сидредин this was a good one
1:20 - 1:25 is a car example
Haha.. there is no oops without a car example
@@shivangchaturvedi237 there is...with animals
:))))
1:02 Encapsulation
3:29 Abstraction
4:41 Inheritance
5:27 Polymorphism
Thank you 😊
Thanks
Computer scientists: "ah yes this is an implementation of polymorphism and encapsulation"
Also Computer Scientists: "This some spaghetti code right here"
God level explanation. Like seriously. I was a graduate in Software Engineering but when I watched this like a revelation to me. LOL. thank you good sir.
Same feeling here
How
You will never understand the level of your God. God is one who make everyone. God is Allah
Hopefully you caught some of the mistakes. Not sure God would makes those types of mistakes. I found two and only watched a couple of minutes of it this time.
The OP comment is so cringe.
Encapsulation : grouping related variables and functions operating on them. (Reduce complexity)
Abstraction: hiding complex data and methods from user (simple interface)
Polymorphism: many forms .. to avoid long if else statements RENDER
Inheritance: inherent the qualities of a code (to remove redundant code)
Memory trick: "Oops I ate A PIE"
A - Abstraction
P - Polymorphism
I - Inheritance
E - Encaspulation
thumbs up to help someone out
I memorized it the same way! :))
hahaha really nice mnemonic trick!
Haha thanks!
thank you for this! :)
I just remember it!?
For me encapsulation is not only about storing properties together and decreasing number of arguments, but what is more important it is all about HIDING implementation details and PROTECTING code from random access. At the same time abstraction is about ignoring unimportant parts of objects providing only essential interface for 'outer world'.
I learned it that way, I was a bit confused here.
This video has other errors, too.
You learned from herbet schidlt book??
@@thinkersandimaginers6334 It's just from my personal experience,
you just repeated what he said
I have tried many times to understand what object oriented programming really is. This was the first successful try. Thanks and congrats for the very high quality video!
100% Agreed - Great job Mosh Thank you.
Just go through the libraries and the namespaces used in linux code. Thats the best way to understand OOPs. When C++ compiler can covert that c code and layout into OOPs only then we can totally understand how OOPs is being handled.
@@srikanthpen3250 where can we learn that from? I mean what would you recommend?
100% agreed!!
You need to learn more about Java animation and Graphics
OMG everything just clicks and makes so much sense, thank you for making this video
What a simple and illustrative way of explaining OOP. I love your videos, Mosh. Keep up the exceptional work!
Great video! I am trying to teach myself C# and I really struggle to research certain things when I get stuck because I don't know the name of the concept that I need to look into. This video lays a lot of the groundwork in simple and concise terms. Thank you!!!
Finally a video explaining OOP that is well organized, thorough, and applies it to real programming examples. THANK YOU.
I just looked at so many different explanations of OOP for my interview prep including the "simple for even a child" freecodecamp explanation but this one is by far the best one! Great work. Thanks :)
This video cleared up the fog I had when it came to Object Oriented programming. Thanks man. It feels like I've broken down huge barrier.
This is the simplest, precise and easy to understand explanation I have found until now.
This was so needed. There's tons of material out there explaining OOP. But usually the explanation is either vague or a bit impractical. Congratulations for not beating about the Bush and yet not missing anything important.
I'm currently in Programming II at my college which is specifically an object oriented programming class. This video really helped me see what my current class is about. Thanks!
Thank you for focusing in this one topic, I've been having a hard time wrapping my head around this. Your video really helped.
Finally someone explains it casually and clearly! Thanks a lot!
The best explanation about the 4 pillars of OOP that I watched in my life, ty Mosh!.
Nice work. I have no doubt that you are a competent programmer, but more importantly as a teacher, you are a gifted presenter. I usually have to watch tutorials at 1.75 - 2.0 times normal playback to keep from stabbing my eyes out. Your tutorials are actually enjoyable at normal playback speed. Thank you.
My God...
7 minutes and alot of things in detail.
Thanks Mosh.
I understood more about these concepts in 7mins than 2 hours with my teacher. Thanks!
With Encapsulation: Resides Object oriented programming backbone of encapsulating data and functions into single unit called object
With Abstraction: We reduce the impact of change in other objects
With Inheritance: We can eliminate redundant code
With polymorphism: We can refactor codes according to different types in simple manner
You got the definition of Abstraction wrong, and your definition of Polymorphism is not quite right. You wouldn't be refactoring anything to achieve poly.
Those aren't very good definitions, though. Your definition of abstraction is incorrect. And polymorphism can be acheived before any "refactoring".
@@kcs3248 But that's not really what polymorphism is. You don't have to refactor anything, and who knows what in the world he meant by "according to different types". Types of what? One of his other definitions was also not right. Just be careful what you read if you are trying to learn OOP. There's a lot of impressive-looking videos about OOP and many of them are wrong.
Hi Mosh..
Really your videos are smooth understandable...Thanks
you're insane man. i'm reaaaaaly proud of having a compatriot like you. you know our difficulties from iran. for example i can't buy your tutorials. so i will be reeeaaallly thankfull if you publish more contents with us.
I don't even know why I'm watching OOP-oriented videos - I was simply searching for UE4 Blueprints tutorials, so only loosely related topic - but that was a very solid explanation. Thank you, I'm glad I've watched it.
To be honest, I like every tutorial of you on programming. In PNG the university dont have such a lecturer that can explain in the lectures room the way you explain in all your upload tutorial its amazing.
Thanks, Mosh! I learned a lot! I just learned to code recently, but I am really passionate about it. I hope I can always be a better programmer over time.
Hey,
if you you watch the video in double speed, you master oop in even three and a half minutes!
It worked actually xD
lol XD
Good point xD
Hahaha
same buddy
the BEST channel for programming explanation. even the easy english words are explained!
Mosh, I read lots of OOP books, you just extracted all the useful contents out of it and translated it in simple words with no jargon. Damet warm.
But you didn't notice the glaring mistakes? The part on abstraction is about 99% wrong.
Well done. Thanks for sharing this content. Simple and easy to follow.
What a brilliant Video! Thank you!
Best description among many and many text books and papers that I have read or videos I have watched. Thank you Mosh!
Very grateful for your work on this clear, pleasant and informative video. I am new to programming and decided to start off by learning Python. When I began learning about it I found out it is a object-oriented language and scratched my head not understanding what that even implies... After watching this video, I can now go back to learning with clarity. Thank you! Subscribed and thumbs up!
I have been Googling these concepts almost all day yesterday. Now this short video and that is it, I get it now :) I guess you made my day!!!
The harsh reality is, though, that you probably don't understand from watching this video to pass an OOP exam. It takes years to get to a professional level of understanding of OOP. It's a major dedication, as opposed to something that can abstracted and encapsulated into a short video. And that's not even telling you that this video contains errors, despite the speaker's voice being very confident.
Best example of encapsulation I've ever seen, thank you
That's the best video I've ever seen about OOP. Here I found lot of info I coudn't find at other sources! Thank you so much!
You just helped to understand oop after two years of university in just 7min!!!! I will blog about this in my future blog app for suree
i officially declare this as the best POO intro i ever saw in my life
thankssss so much my friend!!
I love your videos! There always so easy to follow and understand. This one definitely didn't disappoint!
Excellent video! This was the straight-forward and precise explanation I was looking for!!
Other courses make it so much more complicated to explain what here has been plainly expressed. Congrats!
Encapsulation is just not about making variables private, it is much more. It is about
breaking up the application into different logical and organized parts. So that you can
change one part without generally changing all the other parts. Therefore encapsulate
the parts that vary from the parts that remain the same.
as a CS major who is in my Senior year.. this is a great clean & concise explanation on the basics of OOP...I came to this video for a refresher since this is material we went over my first year ....I rarely use OOP but i definitely should ..would of made my life at Uni so much easier
"of" is not a verb
*have
"of" as in "because of" imho @@archiewoosung5062
Your sketch showing object property as variables and methods as functions really sparked a light in my brain. Thanks.
You helped me understand OOP in minutes more than my professors did in hours of lecture. Thank you!!
Thank you Mosh, I really enjoyed this concise and clear video. I understand what OOP is now and can’t wait to get to that topic in my learning. I have just started learning to code in Python.
This is the best, clearest explanation I've seen so far... Thank you!!!
I agree!
I am trying to learn some programming and your video presentation is wonderful!
Thank you !
This is the first ever video that I watch about OOP, in fact this is the first ever information I learn about the OOP. Honestly speaking - I grasped the general idea. After watching it two more times I think I understood the concepts. From a single video from the first time. Thank you, Mosh! Thank you for braking down the complex matter into easily digestible bite sized bits.
I'm already applied these concepts in my code without even knowing the terms for that. At least now I know
This video just made me pass my exam in structured system development course at my university (y)
This is the best OOP explanation i've ever seen. Thank you so much for that!
5 years and still a very good explanation. Bravo!
Been programming for 22 years and going to try OOP for the first time. Looks like it will make my programming easier in some aspects. All this time I got away with procedural programming and my current job (programming automation) does not need me knowing OOP but I hope to get a job in software engineering, and I feel OOP is a must to master.
How is it going now?
This is only of the best one can find! Thank you so much. :)
Thank you so much for this, the video is about object oriented but it also made me understand what an structured program is. This is also incredibly easy to understand.
Amazing... I never found such easy and to-the-point explanation of OOP Principles as Mosh described in only 7 minutes.
Woah that DVD player metaphor is outstanding. I’ve been really struggling with wrapping my head around OOP but that metaphor really helped things click for me. Well done, and subscribed! Looking forward to checking out your python vids!
yep, you can think of the dvd player as a class, and the buttons on the dvd player as methods inside that class
@@clerpington_the_fifth thanks but what are the properties ?
flawlessly explained. Thank you, Mosh.
Mr. Mosh, thank you for explaining Python in such a base-level common sense manner. You took a 4 hour class and summed it up better than the CISCO Network Academy that I'm going thru. Thank you so much!
Absolutetely incredible explanation. I thought I had a pretty good understanding of OOP until I watched your video. Now I really understand it. Thank you very much friend!
That was a lot of info to cram into 7 min. Bravo!!!!
Wish f**king college textbooks were as short and straightforward! Thanks for the upload Mosh!
You just want things to be easier than they are. You are probably the type that is going to lie on your resume.
@tiluu you mean people that created child labour
@@HOWYOUDOIN884 I partly agree, but I've seen many times, that teachers and professor deepdive into very subtle details before explaining the whole picture simplified. This is not how you teach things. A video like this before getting into details would help many people understand topics way faster and better
@@Heisenberg355 exactly
@@One.Zero.One101 I didn't miss the point of what the guy was saying: "College text books are too hard". OOP takes years to get good at, assuming one's brain is worthy of the challenge and the commitment. And yes, I'm tired of people lying on their resume claiming to be good at OOP, when in reality they were just intrigued by a fancy UA-cam video and have just dabbled in writing classes . I saw one misuse of the word "interface", and then jumped a little past half way and found another mistake @ 4:39 (confusing abstraction with encapsulation). So as pleasing as it may appear to a newbie, they easily could walk away misinformed. It's easy to be attracted to easy material, indeed, but it's also easy to be misinformed and not realize it. That's my complaint about the majority of people who quickly fall in love with an educational video, not realizing the information is not quite right. I think people should read OOP books written by authors with well-established expertise, and not be so attracted to fancy youtube vids.
I watched your full tutorial on react before my system crashed, and I lost everything.
Ever since, I've been looking for this channel, so glad I did.
And I won't forget to subscribe cos I did even before watching this video.
P.S: Your tutorials are great and keep up the good work.
I appreciate you clarifying the idea, Mosh.
your way of teaching .....awsome man..very well explanation..!!
Came with low expectations, but it was actually really good, tnx
2.23 - "they are decoupled". This really helped my understanding. Thanks
Clear, complete and straight to the point, thanks!
@Sergio Díaz Nila Didn't know that, thanks for the tip Sergio!
One of the best explanations about the subject. Well structured and easy to follow.
Polymorphism : you gave the best example with inheritance 🔥🔥🔥 many of them will never appreciate it...
Perfect explanatory video even for beginners. Thank you for this high quality piece!
Wonderfully concise and clear explanation of the topic!
This is the best video on oops that I watched till now . Thank you Mosh. You made our life easy by showing oops s this easy to understand 👏👏
But in reality, you couldn't watch this video and pass a test over OOP. Not to mention the mistakes in the video, where he uses the wrong word, like "abstraction", which has nothing to do with reducing impact of change. So in reality, just because this video made you feel good, you have a long road ahead of you to become an expert at OOP.
Mind Opening, Informative, pactical
Thank you Mosh. Much love from Zimbabwe.
Very well done. It actually makes a lot of sense the way you presented it.
Very clear and you make the subject interesting! :)
Mosh is just handing me a free education better than my college
This is the explanation that i been waiting all the time.
Hopely more continuation tutors about methods and properties, attribuut.
This was very good, I read 5 different explanations of OOP before coming here, I had the basic idea about the terms but it's definitely clearer now, what each term actually means.
That was so beautiful. I love you.
very accurate video for understanding OOP Thanks a lot sir Mosh
In this 7 minutes I have learned more than I have learned in my college, thank you very much 😃♥️👍
I can say nothing but. Thank you for sharing your knowledge with those that want to learn programming.
Perfect for a coffee break ;)
HA agreed, that's exactly what I was doing while watching this. Great video for new comers or to recap OOP basics! THX
A coffee break that's less than 30 minutes ain't a real coffee break.
Indeed
you should relax and breath fresh air on coffee break, for fucks sake man
Yeah!! Similar thing happened with me
i liked this video so much, it's really informative and perfect explaining
Yeah, Mosh is great at explaining things
Thank you Mosh! I will have my first IT interview today :D
This helped..a LOT! Clear. no muss, no fuss.
I felt personally attacked in that intro, I have a variety of fettucine, cavipati, angelhair, bowtie and penne code thank you very much.. :D
Great video I wish I watched this before my interview. You forget these things
Yeah man same, like i understand it in my head but I get nervous
@@ChrisFouadHabibifromMars This may be old but I'll appreciate your reply to a question if you don't mind. Do they ask questions concerning these in interviews?
Thank you. I have a better understanding of what Object oriented programming is now
Thanks Mosh... earlier i was having problems in understanding abstraction concept but now it is clear...👍
"We can change or modify one of the methods and it will not impact the rest of the code" - famous last words ;) Class extending, sharing "this" all around the place, mutating the state - that's all the consequences of OOP and it WILL impact the whole program. Granted - it's all about the patterns. But we all know how you can end up with "Spaghetti" code even with OOP. Not to mention presented "Procedural" programming claims should be also contrasted with Functional Programming since Procedural would focus highly on imperatives rather than abstraction functions. Beginners could easily confuse Procedural with Functional at this point.
With that being said - thanks for gr8 video :)
I shoulda listened to this before my last interview, I havent touched oop in about 5 years....
Thank you so much. It took me years to understand what object-Oriented programming is and this video explains it so well.
Except for the mistakes and wrong definitions ;)
Such an informative and concise video! Thanks Mr. Mosh. Cool jacket btw.