@arrionknight
Instagram · Yap
@arrionknight Breaking down OOP and inheritance in Python so it finally makes sense. Going over classes and objects. #Python #OOP #coding #hoodcoding
@arrionknight
Instagram · Yap
@arrionknight Breaking down OOP and inheritance in Python so it finally makes sense. Going over classes and objects. #Python #OOP #coding #hoodcoding
Performance
Video #5554 · Yap
[01]
The creator explains the programming concept of Object-Oriented Programming (OOP) and inheritance in Python by using an extended analogy involving firearms. He first defines a base "gun" class with basic shooting functionality, then creates a specialized subclass that inherits the base features but adds a new "full-auto" function. He demonstrates how one type of gun (a Glock) can be an instance of this specialized class to gain the new functionality, while another (a revolver) cannot, thereby illustrating the principles of classes, objects, and inheritance.
[02]
[03]
[04]
[05]
What stops the scroll in the first 3 seconds
Title hook · 55%
Hood coding 🏚️ OOPs and Switches
Verbal hook · 40%
Twin you can't put a switch on the revolver, but you can put a switch on the glock.
Visual hook · 5%
A medium close-up shot of the speaker addressing the camera directly, combined with a bold, stylized title text overlay that immediately establishes the video's unique theme.
[07]
The promise the opener makes, and how the video pays it back
Hook
A counter-intuitive, culturally-specific statement that establishes a binary rule (X can do this, but Y cannot), creating immediate curiosity about the underlying reason.
Payoff
Conclude by restating the complex concept's definition in the simplest possible terms, cementing the lesson that has just been visually and logically proven.
[08]
The structural pattern this video runs on
Framework
The Analogy Proof
Explaining a complex technical concept by first establishing a simple, culturally relevant analogy, and then using the technical details to systematically prove every aspect of that analogy.
The Concept Bridge
Immediately translate the real-world analogy into the formal name of the complex concept being explained, anchoring the lesson.
The Foundational Blueprint
Visually construct the 'base case' or 'parent' model. This establishes the universal, but limited, set of properties and functions that all subsequent items will share.
The Baseline Functionality Test
Demonstrate that the base model's limited function works as expected on all examples, setting a performance benchmark.
The Specialized Subclass
Introduce a new, more advanced model that explicitly 'inherits' from the base model. This is presented as the solution or upgrade.
The Exclusive Feature Implementation
Define and code a new, powerful function that exists only within the advanced model.
The Upgrade Demonstration
Apply the new model to one of the examples and showcase its exclusive new function, delivering the primary payoff and 'wow' factor.
The Contrast Proof
Attempt to use the exclusive function on an object that still uses the base model, showing that it fails. This reinforces the initial binary rule from the hook.
The Inheritance Proof
Demonstrate that the upgraded object can still perform the original functions of the base model, proving that the upgrade is an addition, not a replacement.
Breaking down OOP and inheritance in Python so it finally makes sense. Going over classes and objects. #Python #OOP #coding #hoodcoding
title · beginning
Hood coding 🏚️ OOPs and Switches
informational · beginning
OOPs Object Oriented Programming Language
Twin, you can't put a switch on tier revolver, but you good put a switch on the Glock. And this is why we got ops, best oriented programming languages. See, good. If we create a class called blick, we see every blick has a name and it has rank ammo count. And in this class, we create a function called shoot to shoot our blick. But we best shoot in it regular. We don't got a switch on tier. And we create two blicks, a revolver with a ammo count of six and a g 17 with a ammo count of 17. And if we put the shoot function on each blick, you you see we run the program, and every time we pull, it shoots. It runs with the revolver and the glide. Better, Twin, good. If we create a class called blick switch and in the parenthesis, we put blick, this means the blick switch class will inherit everything from the blick class. I'm gonna make it make sense. We gotta import tier. And then our new class, we're gonna create a function called switch. We're gonna write the code in there for it. And when we created our glock, we're gonna change that class right there to blick switch. Then we're gonna go ahead and put a switch on the glock. You see when we run it, it starts spraying. But if we put a switch on a revolver and try to run it, we see it don't work. If we put the shoe function back on the Glock, we see it still works because something called inheritance. And inheritance means that one class could use stuff from another class. So our subclass, Blick switch, could use stuff from just the Blick class. So when you try to put a switch on tier revolver, this is why I told you.