A Deep Dive into the Ruby Object Model

  Рет қаралды 48,045

Peter Cooper

Peter Cooper

Күн бұрын

Пікірлер: 39
@0xHFSP
@0xHFSP 5 жыл бұрын
You turned a very complex subject into something simple. And simples is > genius. Your sir, are more than a genius. Best explanation ever. Caviar.
@WilsonSilva90
@WilsonSilva90 10 жыл бұрын
This is wonderful. I can learn about Ruby and the british accent at the same time :)
@79santosh
@79santosh 9 жыл бұрын
This was an amazing explanation. I was super impressed that you had decided to start with the actual C representation of Objects and Classes. Everytime I need to brush up on the Ruby Objected Model (and I have had to, every 3 months :)), starting with the C representation feels like the best way to get a handle on it. Thanks!
@ParkinT
@ParkinT 10 жыл бұрын
OUTSTANDING! Brilliantly presented in a clear manner. Thank you Peter.
@PeterCooperUK
@PeterCooperUK 10 жыл бұрын
Thanks for watching!
@pierrequintero9484
@pierrequintero9484 2 жыл бұрын
on 2022, this video is still relevant,, and still awesome, ! 34 minutes of pure GOLD!!!, thanks a lot!!!
@intenseretrogaming
@intenseretrogaming 10 жыл бұрын
Cool video, very well presented. I'd like to share some interesting implications that I found out: 1. Class methods are instance methods of a class' singleton class. You can prove that by calling "instance_methods" on a singleton class. So the deeper thruth is that every method is an instance method. A method can also be a singleton method, it only depends on the context (context in that case is "it is defined on the singleton class"). 2. There is no distinction between include and extend, other than "context related". extend is a disguised include, and it happens on an instance's singleton class. extend makes methods callable directly on one instance (be it a class instance, a regular instance, or whatever), whereas include makes methods callable on instances generated by a certain class. 3. Modules are containers of constants and methods, but are also used for namespacing (isolation). Classes are referenced by constants (and so are modules), so you can perfectly define classes inside modules. Class instances are descendants of Module, so they can also be used for namespacing (just like modules). That means you can also define modules inside classes. When you include a module inside a class, the module's methods will work on instances generated by that class. Also, if there is any class defined inside the module, you will be able to reference that class directly, without prepending the namespace.
@bhupendrabhatt3978
@bhupendrabhatt3978 2 жыл бұрын
Great Video man you have just cleared the core OOP concepts that are used in Ruby on Rails. Thank you so much
@parnabsanyal5750
@parnabsanyal5750 8 жыл бұрын
This is one of the most fantastic and in depth videos. Thank you for your effort.
@DarinWilson
@DarinWilson 10 жыл бұрын
Fantastic video - you've made several concepts that was fuzzy on absolutely clear. Great work!
@Gydvbgds6564
@Gydvbgds6564 4 жыл бұрын
This explanation is the first time I have ever started to understand the actual reality of an object. It seems like it's just a reference to functions! It looks like you haven't posted things recently, I hope all is well. If you do get the urge to make more videos, I think the world could really use your style of explanation for how Rails works. I know it isn't magic because it's just a computer doing what it's told, but without anyone telling us what it's actually doing it sure looks like magic!! Thanks again for this video it was really helpful.
@PeterCooperUK
@PeterCooperUK 4 жыл бұрын
Thanks, you're very kind! :) I probably need to rewatch it myself actually as I pretty much don't need to keep any of this in my head anymore for the sort of work I'm doing.
@perkodanny
@perkodanny 6 жыл бұрын
Dude... this is the first time I *really* understand eigenclasses. Thank you!
@bartoszgladecki9214
@bartoszgladecki9214 9 жыл бұрын
Sir, you are THE BEST. Period. Thank you!
@dasanironnie7703
@dasanironnie7703 6 жыл бұрын
This is the BEST video on the topic I could find. THANK YOU!!! :)!
@LetsRocka
@LetsRocka 4 жыл бұрын
That red at 17:50 almost burned my eyes :D Great explanation!
@SzymonKurcab
@SzymonKurcab 10 жыл бұрын
Really really great presentation!! IMHO there is one thing you could add to it, which is: what happens when we include several modules (with some simple example showing reverse inheritanceinclusion order): class A include Z include Y end A.ancestors => [A, Y, Z, Object, Kernel, BasicObject] Anyway, superb and clear explanation of Ruby Object Model.
@sagarshinde5957
@sagarshinde5957 5 жыл бұрын
This is great explanation. Ruby OOPs feels much easy after this video. Thank you Peter. :)
@maz4145
@maz4145 10 жыл бұрын
Great explanation. I have a much firmer understanding of the Object Model now! This will help me when I'm debugging, for sure.
@stevebyrne6715
@stevebyrne6715 10 жыл бұрын
Thanks for sharing this video! You've made some difficult concepts crystal clear. I now "get it".
@mysticaltech
@mysticaltech 8 жыл бұрын
Excellent is the only word that can describe this content.
@grawlixes
@grawlixes 7 жыл бұрын
You are a fantastic teacher! Thanks for everything.
@jamespradhan9055
@jamespradhan9055 8 жыл бұрын
Thank you very much Mr Cooper.
@markzhang1866
@markzhang1866 2 жыл бұрын
Amazing explanation. Thank you
@SinghROAR
@SinghROAR 10 жыл бұрын
Your videos are excellent and engaging!
@ignatius874
@ignatius874 4 жыл бұрын
Is it possible to include a module within a module?
@harryuan65
@harryuan65 3 жыл бұрын
Nice, feels like it never gets obselete
@dadkinson
@dadkinson 6 жыл бұрын
When you say "only classes have methods" how are singleton methods implemented? Still via a lonk to the class but with a ref to the specific object on which the singleton method exists...?
@dadkinson
@dadkinson 6 жыл бұрын
Had I only waited 30s. Answered at ~16min. Great video, thanks!
@leothebeagle9049
@leothebeagle9049 6 жыл бұрын
Thank you very much sir!
@gerardgauthier4876
@gerardgauthier4876 5 жыл бұрын
Like to see the script kiddies understand this... Kind of makes me appreciate my distant background in C and C++.
@mistery4437
@mistery4437 8 жыл бұрын
This is the real shit, old boy. Capital !
@jmack6046
@jmack6046 8 жыл бұрын
YOU ARE A GENIOUS
@sergeyponomarev7056
@sergeyponomarev7056 10 жыл бұрын
hi! can you publish text version of this cast?
@PeterCooperUK
@PeterCooperUK 10 жыл бұрын
It's an old video from a training course I used to do, so unfortunately not, I don't have the time right now. BUT.. the good news is Ruby Under A Microscope is a book that pretty much covers all of this stuff and more, so it's worth getting a hold of that. The author's blog (Pat Shaughnessy) also has some excellent blog posts which cover similar ground.
@sergeyponomarev7056
@sergeyponomarev7056 10 жыл бұрын
Peter Cooper thank you) i've been reading it)
@trailblazer_nomad
@trailblazer_nomad 7 жыл бұрын
Genius :)
Ruby's Symbols Explained
24:47
Peter Cooper
Рет қаралды 81 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 825 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Ruby Blocks, Procs, and Lambdas 🦁🐅🐻
25:42
CJ Avilla (cjav_dev)
Рет қаралды 18 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 1 МЛН
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,4 МЛН
The Ruby Object Model by Dave Thomas
1:03:32
Szymon Madeja
Рет қаралды 21 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 176 М.
Ruby Trick Shots: 24 Ruby Language Tips and Tricks
27:48
Peter Cooper
Рет қаралды 55 М.
An Introduction to Procs, Lambdas and Closures in Ruby
27:13
Peter Cooper
Рет қаралды 45 М.
Sandy Metz - SOLID Design Principle in Ruby
47:12
Imran Ismail
Рет қаралды 13 М.
Ruby Programming | In One Video
36:36
Giraffe Academy
Рет қаралды 161 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 918 М.