Комментарии:
Excellent video.
ОтветитьWhy in the world would you use "Pong" as an example?
ОтветитьOne of my favorite channels. I'd like to see him talk about how to do OOD (Object Oriented Design). For instance I'm bogged down right now in making my own classes that represent things like Container, Random and Sort. I don't know whether I'm supposed to write my program such as interaction with the user comes from within main(), or if the user interaction should come from within in the objects. I'm using C++ and this is just a hobby of mine.
ОтветитьThis is the best, clearest explanation for OOP I've ever heard. Of only my high school programming teachers had made it that clear.
ОтветитьI love Dr Steve Bagley hes so handsome
ОтветитьThe problem with OOP as implemented is that it’s not supposed to be difficult to wrap your head around; it’s not supposed to be more complicated; it’s not supposed to make programming harder. It’s supposed to help manage complexity; it’s supposed to be easier to understand; it’s supposed to make our jobs easier. We should ask why new programmers are intimidated by it. We should ask why has OOP not lived up to the promises.
ОтветитьBrilliant... Such a great way to tech object oriented programming. It's so simple too. Make a fun simple game, not a school or other boring structure.
ОтветитьI would love a smart guy like this to stream or record a video of a simple game development, like pong for example, and explain everything he does in ample details and simplified in the same time. I would sit there for hours with a huge popcorn bag just listening to the guy.
Ответитьstrict encapsulation is problematic. You end up with something like a rigid feudalistic hierarchy of manager objects. And passing objects by reference? Kinda just global variables with extra steps isn't it? I don't think very many people really practice data encapsulation religiously and doing so would lead to a pretty wierd way of programming.
ОтветитьSorry this time, it's just useless only blabla bla.
ОтветитьI ❤️ OOP
ОтветитьMikyo Zoldyck Explains Computer Programming... Seems legit.
ОтветитьCa n you plz send a java program for this
ОтветитьFactoryServiceManagerFactory
ОтветитьI use classes because self is easier then global in python. LOL
Ответитьobject orientated ponging
ОтветитьDid the Inheritance video he mentioned ever get made? Would love to watch that if it hasn’t!
ОтветитьOop stincks!!!
Ответить"So many different terms; objects sending messages to other objects... And, well, not much else happening. In fact, that's the only thing"
ОтветитьThis is a brilliant explanation.
Ответить"Its probably not going to be more then a few hundred lines long"
Honestly that sounds like way to much code, even if you'd go completely overboard with OOP
That look more like simon says toy simon than pong
ОтветитьOOP is not hard. But boy does it have problems
ОтветитьOOP is bad, encapsulation is just an illusion...
ОтветитьSo much hate for OOP. I actually really like the style of thinking behind oop . Just the fact that you can write a class once and not have to think about the details behind what each method does. It just does what you want it do as an entity.
plus it really helps in organizing your code instead of having each method like a block of 100 lines of code , each method can be less than 20 let's say because you have entities and helper methods that'll take care of most things for you.
It might not be perfect for all use cases , but for most of the things I've made solutions for it's been helpful. Plus unit testing is like a piece of cake when you have classes.
From what I noticed people who hate it , generally are either wanna be pseudo coders who use python to write scripts , functional programmers ( kudos to you and I respect your opinion) , or C/Assembler programs who think that any form of abstraction is nonperformant and slow.
Don’t forget the “stage “ object, that manages all the objects on the screen aka stage.
Ответитьnever use inheritance always use composition! just google "composition over inheritance" before you go to that historical damned road of getting excited about inheritance.
Ответитьit's easy to fall into the OOP mindset. In theory it sounds like a great idea re-usable code relating to real world objects. But in reality it gets way over-engineered. Why write a class when a simple function will do? I go back to my old C code and I still find that easier to read than the Java code Ive written over the years.
ОтветитьSo, this is how Google Chrome logo came to be.
ОтветитьThis man is beautiful
Ответитьthis guy is writing on ancient paper from a time where printers made loud noises.
Ответитьhaving a deterministic size for the objects make garbage collection much easier to automate. IE making them strongly typed objects - especially if all your primitives are derived from a single base object.
ОтветитьI always hear people talking about how hard objects and classes are to people, but I always thought it was just super intuitive. Maybe I just found a good Java starting article (the first programming language I ever used classes in was Java, which is bassically forced object oriented programming [anyone who has ever used Java knows exactly what I mean]), but it always seemed really easy to me. IDK.
Ответитьwhat about inheritance?
Ответитьprobably should have talked about the room object
ОтветитьAll you need to take away from OOP is the idea of associating a function with a type, so that you can call type_instance.function() easily. Everything else is more trouble than its worth. Especially classical inheritance.
And I'm saying this as a game dev. If I can make a whole game with has-a relationships rather than is-a's then you certainly can for business applications.
BTW pong was an arcade game and we encountered it in the UK first as ping for obvious reasons.
ОтветитьThen in base, of Object Oriented Programming, the shapes or models are the objects or shapes inside shapes are objects of other objects and whatever is then in manipulate are the operations on the objects or something, correct if wrong. Where the object is a program in itself as well and each object has its own identity with own set of rules. A class is a blueprint to all of that also and stuff is and then the computer interprets and then does compile if it makes sense or whatnot.
ОтветитьI really appreciate how you visually explained Object Oriented Programming. This is the first time I'm starting to grasp it.
ОтветитьI'll always prefer straight C. I can do things similar to OOP with it without a bunch of convoluted code. Many of the concerns about straight C coding over OOP you get with C++ just never come up for me. I have more problems with a misplaced semicolon than anything else like pointers (which C++ programmers seem to have an irrational fear of). For pong, I can place structs and functions to do with paddles in their own files, say paddle.c and paddle.h and it is all completely contained without the headaches and slowdowns that come with C++ or other high level languages.
Maybe someday I will start coding with OOP like C++, I'm just not there yet. One thing I did like about C++ were vectors, so I wrote my own vector code for C which gave me the same functionality. :)
I did write a pong game in C++ one time just to demonstrate classes for someone that challenged me to do it. It didn't take long to write but after I was done, I didn't like how it looked. I don't know, I have never "accidentally" altered the code of something I should not have. It seems as though OOP is a solution to a non-existent problem.
I like to the analogy of Space Invaders and Galaxian. Space Invaders could be programmed using a bunch of arrays, x-y values and speed. Galaxian needed a simple AI for the groups to break off and swoop down. That would be far easier using OO.
ОтветитьBy the way, the screen would not be only represented by the computer, because what happens to the ball when it goes off the top/bottom of the screen?
ОтветитьWhat is your get opinion of putting get in front of all accessors. This practice comes from Java Beans, but makes the grammar very strange. All of your nouns (and adjectives) turn into verbs: “Get would you like fries with that?“, “What is your get height?”, “if get name equals "root" then …”
ОтветитьTo move player 1 paddle "up": paddle1._ypos = paddle1._ypos - 1
Ответить