[Writing]4 min

Teaching Programming Made Me Relearn the Fundamentals

How teaching programming to a friend changed the way I understood fundamentals, exposed gaps in my knowledge, and pushed me to look deeper into how computers represent and process data.

ProgrammingFundamentalsJavaScript

For a long time, I thought I did not understand programming fundamentals well enough.

I could write programs, work with different languages, and build projects, but I often felt that my understanding was incomplete. There always seemed to be another layer beneath what I already knew.

That changed when I started teaching programming fundamentals to a friend using JavaScript.

Teaching changed how I tested my understanding

When learning by myself, it is easy to recognize a concept, follow an example, and move on.

Teaching is different.

When someone asks why something works, remembering the syntax is no longer enough. I have to explain the concept clearly, often without looking at my notes.

I started noticing that I could explain many of the fundamentals from memory.

Variables, conditions, loops, functions, data types, and other basic concepts were more familiar than I had thought.

This made me realize that I had been judging my understanding mostly by how much I could remember explicitly, rather than by whether I could actually use and explain the concepts.

Teaching also exposed the gaps

At the same time, teaching did not suddenly prove that I understood everything.

It exposed the parts that I had only understood at a surface level.

Sometimes a simple question led to another question:

Why does it work this way?

That question is surprisingly effective at exposing gaps in understanding.

For example, I could understand how a programming language represents and works with values, but I had not always stopped to think deeply about what happens underneath.

Why is binary used to represent data?

Why do numeric types have limits?

What happens when a value exceeds those limits?

What are overflow and underflow?

These questions are not necessarily required to write a simple program, but they reveal another layer of the fundamentals.

Fundamentals have depth

One thing I have started to understand is that "knowing the fundamentals" is not a binary state.

There are different levels of understanding.

I might first learn how to use something.

Then I understand the concept behind it.

Then I become able to explain it.

After that, I can start asking why it works that way and what limitations or consequences come with it.

For example, knowing that a variable stores a value is useful.

Understanding how that value is represented in memory gives a deeper perspective.

Understanding the limitations of that representation explains why certain behaviors, such as integer overflow, can occur.

The first level is enough for many programming tasks. The deeper levels become increasingly useful when trying to understand how software actually works.

JavaScript was only the starting point

I have been using JavaScript as the language for teaching because it provides a practical way to introduce programming concepts.

But the more I teach, the more I realize that many of these concepts are not really about JavaScript.

Variables, control flow, functions, data representation, algorithms, and data structures exist beyond a particular language.

The syntax changes.

The abstractions change.

The underlying ideas often remain.

This has also changed how I approach learning other languages. Instead of trying to memorize every feature of a language, I want to understand which concepts are fundamental and which parts are simply the language's way of expressing them.

Learning by teaching

Teaching my friend has unexpectedly become part of how I learn.

Before explaining something, I sometimes review my notes or search for details that I am not completely certain about.

That process is useful because it forces me to distinguish between things I actually understand and things I only recognize.

Sometimes I discover that I already understand a concept better than I thought.

Other times, I discover a gap that I would probably have ignored if I had only been learning for myself.

Both outcomes are useful.

The goal is not to know everything before teaching someone else.

The goal is to be honest about what I know, identify what I do not know, and keep going deeper.

What I am taking from this

I used to think that improving my fundamentals meant repeatedly studying the same introductory material until I finally felt that I had "mastered" it.

I now see it differently.

Fundamentals become deeper as I ask better questions.

Learning how to use something is one step.

Understanding the concept is another.

Understanding why it works, what assumptions it makes, and where its limitations come from is another.

Teaching has made that distinction much clearer to me.

It also reminded me that feeling like I do not understand enough does not necessarily mean that I have learned nothing.

Sometimes the understanding is already there.

I just had not tested it in a way that made it visible.