How do we organize what we know? - Part 2
This article explains classification, generalization, specialization and hierarchy, showing how programmers organize grocery items and discover common concepts before designing software models for beginners today.
How do we organize what we know? - Part 2
Every day, we meet thousands of things we have never seen before, a new mobile phone, a stranger in the bus, a fruit in the market we have never tasted. Still, we are not confused. Within a second, we know “it is a phone”, “he is a passenger”, “it is some kind of fruit”, and we already know a lot about it without being told. This is possible because our mind doesn’t store every thing separately, it organizes things into kinds, and kinds into bigger kinds. Philosophers have studied this for more than two thousand years, and object-oriented thinking is built directly on top of it. In the previous article, we discussed how to model the real world with objects, their identity, state and behaviour. In this article, we are going to see how humans organize what they know, classification, generalization, specialization and hierarchy, purely from the real-world and philosophical point of view, before we use them for abstraction, encapsulation, inheritance and polymorphism in the next articles.
Object-Oriented Thinking series:
- How to model the real world with objects? - Part 1
- How do we organize what we know? (this article)
- What is abstraction? - Part 3
- What is encapsulation? - Part 4
- What is inheritance? - Part 5
- What are subtype and subclass polymorphism? - Part 6
- How objects relate to each other? - Part 7
- How all these concepts connect? - Part 8
TL; DR Summary
- Classification is grouping individual things into kinds, based on what they have in common.
- A particular is one individual thing (this cow), a universal is the kind it belongs to (cow).
- Generalization is moving up, from specific things to a general kind, by keeping what is common.
- Specialization is moving down, from a general kind to a special kind, by adding what is different.
- A hierarchy is the ladder of kinds, from the most general at the top to the most specific at the bottom.
- There are two different hierarchies, “is a kind of” (a dog is a kind of animal) and “is a part of” (a wheel is a part of a car). Mixing them is a very common mistake.
- Good classification is based on the essential properties, not the accidental ones.
- These are the thinking tools behind every object-oriented principle we discuss in the rest of this series.
Common Challenges
Every thing is treated as unique
Imagine a shopkeeper who doesn’t think in kinds. For him, every packet is a separate thing with its own rules, this rice packet, that rice packet, this sugar packet. He has to remember the price, the shelf and the billing rule of each packet separately. With ten packets, it is fine. With ten thousand packets, it is impossible. Without classification, knowledge doesn’t scale, and every new thing has to be learned from zero.
Grouping by the wrong property
The opposite problem is grouping things by something which doesn’t really matter. If the shopkeeper arranges his shelves by the colour of the packet, red packets on one shelf and yellow packets on another, the chilli powder sits with the tomato sauce and the turmeric sits with the lemon juice. The grouping is neat, but useless, because the colour is not what makes these things what they are. When the grouping is wrong, every decision based on it is wrong too.
What is classification?
Classification is the process of arranging individual things into groups, called kinds or classes, based on the properties they share.
In simple terms, classification is answering the question “what kind of thing is this?”. When a child points to a new animal in the zoo and asks “is it a dog?”, he is already classifying. He has seen some dogs, formed an idea of “dog” and is checking whether the new animal fits that idea.
Particulars and universals
Philosophers make a clear difference between two things,
- Particular - One individual thing which exists at a place and time. Bessie, the cow in our farm, is a particular.
- Universal - The kind which many particulars share. “Cow” is a universal. You can’t milk the universal “cow”, you can only milk Bessie.
Plato believed the universals, which he called Forms, are the perfect and unchanging ideas, and the particular things we see are imperfect copies of them. His student Aristotle disagreed and said the universal exists only in the particular things, we find it by observing many particulars. Indian philosophy also has the same pair, the Vaisheshika school lists sāmānya (generality, what is common) and viśeṣa (particularity, what makes one thing distinct) among its basic categories of reality. Different traditions, the same discovery, our understanding of the world is built on the difference between “this one” and “this kind”.
Keep this pair in mind, because it is the same pair as the object and the class we discussed in Part 1. The rice packet on the shelf is a particular, “Item” is a universal.
What is generalization?
Generalization is the process of forming a general concept by observing several specific things and keeping only what is common among them.
Simply put, generalization is moving up, from many to one. A child sees a German shepherd, a Pomeranian and the street dog near his school. They are very different in size, colour and sound, but he notices they all have four legs, a tail, they bark and they wag the tail when happy. Slowly, he forms the general idea “dog”. No one gave him a definition, he generalized it from the examples.
Generalization gives us a huge benefit. Whatever we know about the general kind applies to every thing of that kind, even the ones we have never seen. When the child sees a new breed for the first time, he already expects it to bark and wag its tail. It means, generalization allows us to know things in advance.
What is specialization?
Specialization is the process of defining a more specific concept from a general one, by keeping everything of the general concept and adding what is different.
Simply put, specialization is moving down, from one to many. Start with “vehicle”, something which carries people or goods from one place to another. A bicycle is a vehicle with two wheels moved by pedals. A bus is a vehicle which carries many passengers on a fixed route. An ambulance is a vehicle which carries patients and has the right of way. Each special kind keeps the general idea and adds its own difference.
Genus and differentia
Aristotle gave a simple and powerful way to define a thing using specialization. Every good definition has two parts,
- Genus - The general kind the thing belongs to.
- Differentia - The difference which separates it from the other things in the same genus.
The famous example is “a human is a rational animal”, the genus is “animal” and the differentia is “rational”. The following diagram depicts few more examples, a bicycle is a vehicle with two wheels moved by pedals, a surgeon is a doctor who treats by operating. Notice that every definition is just a general kind plus a difference.

This way of defining is still used in every dictionary. Look up any noun and you will see the same pattern, “a chair - a seat (genus) for one person, with a back (differentia)”.
Generalization vs Specialization
These two are not separate tools, they are the same ladder travelled in two directions. Find below the quick comparison,
| Generalization | Specialization | |
|---|---|---|
| Direction | Bottom up, specific to general | Top down, general to specific |
| Starts with | Many examples | One general idea |
| Action | Keep what is common, drop the differences | Keep everything, add the difference |
| Question | What do these have in common? | What makes this one special? |
| Example | Dog, cow, cat → Mammal | Doctor → Surgeon → Cardiac surgeon |
In real life, we use both all the time. A doctor learns the general kind “fever” (generalization from many patients) and then the special kinds “viral fever”, “typhoid”, “malaria” (specialization), each with its own treatment.
What is a hierarchy?
A hierarchy is an arrangement of kinds in levels, where each level is more general than the level below it, and every kind belongs to exactly one place in the arrangement.
When we apply generalization and specialization again and again, we get a tree. The Greek philosopher Porphyry, in the 3rd century, explained Aristotle’s categories as a chain of genus and differentia, from “substance” at the top to “human” at the bottom. Later scholars drew it as a tree, which is called the Tree of Porphyry. In 1735, Carl Linnaeus published Systema Naturae, which arranged all living things in levels, kingdom, class, order, genus and species. We still use his system, and the scientific names like Homo sapiens come from it.
The following diagram depicts a small hierarchy of living things. Each level adds something to the level above it, an animal is a living thing which moves, a mammal is an animal which feeds milk to its young. Moving up is generalization, moving down is specialization.

The most important property of a “kind of” hierarchy is this, whatever is true for a kind is true for every kind below it. Every living thing needs food, so the mango tree and the sparrow need food. Every mammal is warm blooded, so the dog and the cow are warm blooded. We don’t need to say it again at every level, it flows down automatically. Hold this idea for Part 5, it is exactly what inheritance is.
Two kinds of hierarchy
Be mindful that the word “hierarchy” is used for two completely different things,
- “Is a kind of” hierarchy (taxonomy) - A dog is a kind of mammal, a mammal is a kind of animal. Everything true for the parent is true for the child.
- “Is a part of” hierarchy (partonomy) - A wheel is a part of a car, a district is a part of a state, a heart is a part of a body. The part is not a kind of the whole, a wheel is not a car, and what is true for the whole is not true for the part. A car can carry five people, a wheel cannot.
Many confusions, in philosophy and later in software, come from mixing these two. A heart is inside a body, but a heart is not a kind of body. Keep these two separate in your mind, the first one leads to inheritance (Part 5) and the second one leads to composition (Part 7).
What makes a good classification?
Not every grouping is a good classification. The traditional logic has a few rules for dividing a kind into sub-kinds, find below these rules in simple terms,
- One principle at a time - Divide by one property at each level. Dividing vehicles into “two-wheelers, four-wheelers and electric vehicles” mixes the number of wheels with the type of fuel, and an electric scooter falls in two groups.
- No overlaps - Each thing must belong to only one group at the same level, otherwise we don’t know which rules apply to it.
- Nothing left out - Every thing of the parent kind must fit in some group, otherwise we will find things with no home.
- Essential, not accidental - Divide by what the thing really is, not by what it happens to be.
The last rule is the most important one. Aristotle separated the essential properties of a thing, without which it is not that thing anymore, from the accidental properties, which can change without changing what it is. Being a liquid which quenches thirst is essential for drinking water, being in a steel bottle or a plastic bottle is accidental. The colour of the packet in our “wrong property” challenge is accidental, and that is why the grouping was useless. In the next article, we will see that abstraction is mainly this skill, separating the essential from the accidental.
Where classification breaks?
Classification is powerful, but the real world doesn’t always fit in neat boxes. Here are two famous examples,
- The platypus - When the first platypus specimen reached Britain from Australia in the late 1790s, some scientists believed it was a fake, an animal with a duck’s bill and a beaver’s tail, which feeds milk to its young and also lays eggs. It didn’t fit in the hierarchy. Eventually, the scientists didn’t throw away the hierarchy, they refined it and created a new group for egg-laying mammals.
- The word “game” - The philosopher Ludwig Wittgenstein asked, what is common to all games, chess, football, a card game and a child throwing a ball against the wall? Some have winners, some don’t, some need skill, some only luck. He said there is no single common property, only a “family resemblance”, overlapping similarities like the faces in a family.
It means, a classification is a tool for a purpose, not a perfect truth about the world. When a new thing doesn’t fit, we refine the classification, and for some concepts, we accept that a strict hierarchy is not the right tool. We will meet both of these lessons again, the platypus in Part 5 (when the “is a” hierarchy doesn’t fit) and the family resemblance in Part 6 (when things share only a behaviour, not a parent).
How these ideas lead to object-oriented thinking?
So far, we didn’t talk about computers at all, and it is intentional. Every idea in this article is how people have organized knowledge for centuries. Object-oriented thinking didn’t invent them, it borrowed them. Find below how each idea shows up in the rest of this series,
| Real-world idea | What it means | Where we use it |
|---|---|---|
| Particular and universal | This one and this kind | Object and class (Part 1) |
| Essential vs accidental | What really matters about a kind | Abstraction (Part 3) |
| Kind with its own rules | A kind which is responsible for itself | Encapsulation (Part 4) |
| Specialization and “is a kind of” hierarchy | Special kinds which keep everything of the general kind | Inheritance (Part 5) |
| Many kinds, one general idea | Treating different kinds the same way | Polymorphism (Part 6) |
| “Is a part of” hierarchy | A whole made of parts | Composition and other relationships (Part 7) |
Once you see this table, the four principles are not four unrelated rules to memorize anymore, they are the natural steps of the same way of thinking.
Wrap up
In this article, we have looked at classification, particulars and universals, generalization, specialization with genus and differentia, hierarchies, the two kinds of hierarchy, the rules of a good classification and where classification breaks. I really appreciate that you took the time to read this article and I hope this article provided you some insights into how our mind organizes the world. In the next article, I will walk you through abstraction, first as a way of understanding the world, and then as the first principle of object-oriented thinking.
Related Posts
How to model the real world with objects? - Part 1
This article introduces object-oriented thinking by modeling a grocery shop as customers, items and bills, then explains objects through identity, state, behaviour and classes for beginners.
How all these concepts connect? - Part 8
This final article connects the three series, showing how real-world problems, computational thinking and object-oriented principles form one practical mental model for designing software with a grocery shop example.
How objects relate to each other? - Part 7
This article explains association, aggregation, composition, dependency and inheritance, then applies each relationship to a grocery shop object model so beginners can choose connections deliberately.