The best way to learn something is to teach it

Samer Buna
EdgeCoders
4 min readJan 22, 2016

--

My latest course at Pluralsight where I learned Relay.js and GraphQL

We all have different styles of learning, it looks like the researchers have identified these 7 major ones:

  1. Visual: Using images, videos, diagrams, colors, and mind maps
  2. Physical: Learning by doing
  3. Aural: Using sound, rhythms, music, recordings
  4. Verbal: Using words, both in speech and in writing
  5. Logical: Using logic and reasoning
  6. Social: Learning in groups or with other people
  7. Solitary: Learning alone and through self-study

I am definitely a “Physical” learner, and I think this style best fits when learning to code in general. If I am learning something challenging, and there are some visual aids available, I’ll mix visual and physical.

I am always curious about new technologies, and I am always exploring them. Even if I don’t end up actually using them, I always learn something valuable through the process. I learned Rails shortly after DHH did his first demo, there were absolutely no visual learning aids at the time (except for that excellent demo), so I learned it verbal-style first (mostly reading the code), and then physical-style by writing my first Rails application.

I have similarly learned React.js shortly after Facebook released it, and that has been great. React had a simple learning curve, I built few projects with it, and they were Ok, but I realized something important in the process. I got to a comfortable level with my knowledge in React only after I first taught it to a group of students (at ReactjsCamp). I went to that first workshop having built few project with React, and after being familiar with all of its API, but the experience of teaching it forced me to find the best way to explain it to others, and that in turn, forced me to “think” about the various things React do to be declarative and efficient.

The teaching process basically forced me to ask myself questions that I would not have asked if I was just building something with React. Tutorials usually give you the “HOW” you can do X, which is the easy part. But “WHY” is the best question you can ask yourself every time you learn a new concept. If you can’t guess and verify the answer to that on your own, then go find a learning-style channel to help you do so.

Example:

Let’s say we have an array of colors and we want to render a box for each color with jQuery. Every jQuery tutorial will tell you to prepare an array of HTML elements for each color with a loop, then append that array to the DOM when you’re done with the loop.

So that gives you the “HOW”, which is great, you can use that knowledge to complete the task and be on your way to the next great piece of knowledge. Right? Maybe not.

Ask “WHY”s, and ask a lot of them before you move on. Examples, WHY do we need a loop, WHY do we need to prepare an array of elements, WHY do we have to append to the DOM “after” we’re done with the loop, WHY can’t we append each color box to the DOM when we have it in the loop, and WHY are we still writing jQuery?

Another insight about learning anything (and this is especially true for coding) is that the learning process is not a one-and-done thing. I have been doing Ruby for over 10 years now, and I still learn something new about it every time I work on a Ruby project.

Learning to code is a lifetime activity, make peace with that. When you stop learning, you stop being a coder. Whatever skills you acquired up to that point will immediately begin to depreciate, and will be obsolete within few years, if not faster.

When I prepare to teach something that I am “still” learning (which is everything), I ask myself lots of WHY questions, because I know these are the kind of questions I’d like to have answered if I am learning the thing from another person.

If you think you learned something and you’re comfortable with it, try teaching it.

Having to teach new things all the time, I find this quote to be absolutely true. This was made crystal clear to me in my latest Pluralsight course about Relay.js and GraphQL.

Relay.js is a brand new JavaScript framework that uses GraphQL, which is a query language and runtime. They have been recently open-sourced by Facebook.

I have been trying to learn Relay & GraphQL since Facebook announced them, and I can honestly say, I’ve achieved a comfortable level in my knowledge about these two subjects only after I have finished a Pluarlsight course about them.

The course was certainly challenging, not because learning how to work with Relay & GraphQL is challenging, but because answering the so many WHY questions I had while learning them wasn’t easy, and I had to resort to mostly the logical learning style there. I realized while I was creating the course, that I was really learning more than I was teaching.

I’d like to propose a new learning style to add the list above:

8. Instructional: Teaching others about the subject that you think you learned

Samer Buna is the author of “React.js: Getting Started”, “Building Data-driven React Applications with Relay, GraphQL, and Flux” and multiple other courses on Pluralsight.

--

--

Samer Buna
EdgeCoders

Author for Pluralsight, O'Reilly, Manning, and LinkedIn Learning. Curator of jsComplete.com