Is there something you can do that will help you learn coding? When learning something new, it helps to focus on associations, especially opposites. It’s hard to learn separate facts and ideas. Linking them together lets them reinforce each other. Instead of being more work, they will lend support. This will improve your memory too. Then, use what you learn for another link.
I first discovered this helped me learn languages. But it can also help you to learn anything new. This is the advice I gave to my son to help him learn how to code.
If you’d like to improve your coding skills, then browse the recommended books and resources at the Resources page. You can find all my favorite books and resources at this page to help you create better software designs.
Listen to the episode for more details or read the full transcript below. This started when I asked my son what was his biggest frustration with learning how to code?
I asked my son this question recently and he said that his biggest frustration was syntax.
If you share this same frustration, then I have something to help. It’s a way of learning that I’ve found effective and that I use in my classes. But I’m also going to start highlighting it more because it’s a small thing that’s easily overlooked.
I discovered this technique on my own many years ago when learning to speak another language. And I’ve naturally included it in my programming classes without even thinking about it.
The whole technique is based on opposites.
What do I mean by that?
Well, we learn best when we can associate new ideas with something we already know. Just look at a common and effective way that memory experts use to remember long sequences of unrelated items. They start with a framework of things they already know very well. This could be rooms in your house and going through those rooms, you pick out certain features or aspects of each room that stand out in your mind when you think of that room.
All you need to do is get these room features in a certain order. Maybe you can start with the room you first enter each day after coming home and visit each room and feature in order. Once you have this order, it’s easy to remember it. Because it’s something we’re familiar with and are exposed to every day, it’s almost impossible to forget.
Then to remember other things, you just take the first thing you want to remember and associate it somehow with the first thing from your house. By making the association clear, vivid, and hopefully strange or outlandish, then it will also stand out in your memory.
The whole point is that it really helps when you have something to associate a new idea with. If you just try to learn a bunch of new ideas in isolation, then you’ll quickly forget. It takes a lot of time and effort to learn by dry memorization only.
Now, I’m not suggesting that you learn how to program by linking programming topics to things in your house. Although, maybe that’s not such a bad idea after all.
What I encourage you to do is to learn by pairing things together into opposites.
I found that when I was learning a new language, it helped to remember the word for “up” by also remembering the word for “down”. In a way, what I was doing was grouping things together so they had their own associations.
I found that you can do the same thing with programming. Take syntax for example. He said something as simple as when to use parenthesis vs. curly braces can be confusing. Especially during written tests when there’s no computer to help.
My advice when you find yourself in this situation is to try learning the confusing parts together. Compare them and learn how they relate to each other. I think this leads to better results than learning topics in isolation. It gives you hooks that will improve your memory because you can let the topics reinforce each other instead of fighting with each other.
The C++ language uses and reuses symbols such as parenthesis for different purposes. For example, you can use parenthesis to declare a method and to call a method, to group expressions, and to initialize variables.
Let’s say that you already know how to use parenthesis to call methods when you learn that they can be used to initialize variables. One thing that will help right away is to think about how this is already similar to calling a method. You’re calling a constructor in the new usage.
Then it might seem like it adds complexity, but I say it helps to jump right into using curly braces to initialize variables too. This is the opposite aspect that I mentioned. Start by comparing them and what are the advantages and disadvantages of each. What can you do with one that can’t be done with another? Where are they the same?
It’s these types of comparison questions that will lead to a better understanding.
And when you discover a new use, go back and review the other uses. Make sure to firmly fit the new use together with the earlier uses and you’ll find better reinforcement of ideas.
The next step is to put your new skills into use.
Write some code. Use the new syntax in your code. This will give you another association because you’ll remember using the syntax in your program and where you used it.
The more you put it to use, the stronger your associations will become.