// blog

Articles

// Object-oriented programming
When Functions Aren't Enough

The problem...
You've built three projects. Each one works. Each one has functions that add data, filter data, display data, export data.
But look at the Calories Tracker. add_f…

16 May 2026 2 min read files [0] comments [0] 34 views
// Object-oriented programming
Classes and Objects: The Blueprint and the Thing

The idea
A class is a blueprint. An object is what you build from it.
The blueprint for a house defines how many rooms it has, where the door is, what materials it uses. The hou…

16 May 2026 3 min read files [1] comments [0] 34 views
// Object-oriented programming
What an Object Knows and What It Can Do

The idea
Every object has two things: data it holds and actions it can perform.
The data is stored in attributes. The actions are defined as methods.
You've already seen both &…

16 May 2026 2 min read files [1] comments [0] 33 views
// Object-oriented programming
Understanding OOP self

The problem...
You've seen self in every method. You've written it without fully understanding it. It's always the first parameter. Python seems to handle it automatically. But w…

16 May 2026 3 min read files [1] comments [0] 31 views
// Object-oriented programming
Encapsulation: Control Over Your Data

The problem...
You have an Animal object. Status starts as "available". At some point in your code — or someone else's — this happens:
lassie.status = "missing"
las…

16 May 2026 2 min read files [1] comments [0] 34 views
// Object-oriented programming
Reusing Code with Inheritance

The problem...
You have an Animal class. It works well for the Safe Paws shelter — name, species, size, health, status.
Now you want a Dog class and a Cat class. Dogs have…

16 May 2026 3 min read files [1] comments [0] 30 views