From Periodic Table to Object-Oriented Thinking
Ethan lives at school.
Winter conditions are not easy.
He can only shower two to three times a week. Clothes are washed by hand even when a washing machine is available. The classroom and dormitory are cold, and heating is centrally controlled by the school.
When he does homework, he wears thick winter clothing. His right hand developed chilblains from writing in the cold, so he often keeps his left hand in his pocket for warmth.
These are the conditions in which learning continues.
In our class, Ethan arrived excited to share something from after the previous lesson:
“I put all atomic numbers onto the periodic table using code.”
He had built a Python turtle program to draw the periodic table.
A short video captured his work in motion.
The focus of the lesson then shifted from graphics to structure.
We entered the world of object-oriented programming, starting from a simple Student class.
Ethan defined attributes such as age, gender, and class.
At first, one important idea was missing: the name of a student as an essential instance attribute.
He noticed this himself later and smiled when it was pointed out.
Ethan quickly constructed a list of students:
s1 = Student(3, 'male', 'Bob')
s2 = Student(10, 'male', 'Mark')
students = [s1, s2]
a_age = sum(s.age for s in students)/len(students)
print(a_age)
He then returned to his periodic table project.
This time, he refactored it using an Element class:
H = Element(1, 0, 0)
He = Element(2, 17, 0)
elements = [H, He]
for e in elements:
draw_atomic_number_at(e.c, e.r, e.atomic_number, cell_s)
What had once been a drawing script became a structured system of objects.
The same idea now had form.
Learning can persist even under difficult physical conditions.
Structure in code often emerges gradually, not all at once.
Object-oriented thinking begins with noticing missing attributes.
Refactoring is a natural next step once the idea becomes clearer.
Creativity does not wait for ideal environments.
This lesson was not only about Python classes or periodic tables.
It was about something quieter:
A student continuing to build systems of thought in less-than-ideal conditions.
The periodic table became more than a chart.
It became a structure that could evolve.
And the class became more than a lesson in programming.
It became a continuation of thinking, despite everything around it.
🌱 iOS Dream Team
Small circles. Big thinkers.