Don’t try to Memorize Code — Try this!

Kevin Michael Johnson
5 min readSep 13, 2021

Welcome, everyone! Hope your week is off to a great start. If you’ve read any of my previous blogs you know that memorizing code (or attempting to) is a topic that I’ve brought up a few times, and just as I’ve mentioned before, it’s not a good idea. Trying to memorize absolutely everything is just too much, and it’s okay to acknowledge that. Instead, I thought I would talk a bit about a different strategy for new developers who are struggling to comprehend everything that’s thrown at them.

Memorization is simply a terrible technique when trying to learn to program. It’s a good technique if you need to learn biology or history or if you need to learn random facts to be exact. However, with programming, there’s too much to memorize. If you really broke it down there are probably millions and millions of functions and methods and names, which takes memorizing all of it off the table. So stop trying to do it! And also don’t feel bad about it. So what should you do? Instead what you need to do is focus on the concepts of programming. There aren’t nearly as many concepts that you run into while programming to understand a language like JavaScript.

Think about it. If you understand how setting variables work, how functions work and how objects work, well you now know 50% of what you need to know to write a program. But be careful. Too many young programmers will get lost in the weeds when trying to learn these concepts because when they attempt to learn functions you also learn about built-in functions, and there is a lot.

So what does the beginner programmer do? They try and learn them all, they try to memorize all of them from the start. Instead what you need to do is focus on how these functions work and the concept of functions as a whole as opposed to individual functions. Listen, no matter what you’re going to forget about some random functions or you won’t remember the name of certain built-in functions. All that is okay. All that is stuff you can easily reference and find out.

Also, imagine all of the functions that you will hardly use at all. You don’t need to memorize these because you just aren’t going to be using them very often. So when you do need to use them, you can just look them up. The important part is that you know what to look up and then how to implement it. In the world of programming, we are very lucky to have everything documented very well. Also, you don’t have to worry about trusting the documentation or trying to collaborate with other sources to make sure it’s accurate. What you look up in the documentation for a language is going to be correct 99% of the time. To be blunt. memorization is not really a skill that you need as a programmer and it’s something too many new programmers try to do, and it’s usually just a bunch of waste of time.

Let’s say you want to try to do something with a function that does a specific thing. Well, good luck trying to remember exactly which built-in function may do that. Like we’ve said, there are just too many to remember them all. So instead you’re going to google it and find it, or you’re going to build the function yourself because there is no built-in function for what you’re looking to do. None of that requires any memorization. What it requires is the understanding of the concepts you can build that function yourself.

With programming, it’s an ever-evolving field. Things are always changing and being added. Using memorization as a technique really only works when you’re trying to memorize a small enough set of ideas. Instead, you need to focus on constantly learning. One thing about programming that most people don’t realize is that it’s a field that you constantly are learning in. You never get to a point where you’re done learning because something is always going to be new that’s coming out or there’s always going to be new things you can discover that have been around for a long period of time. If you want to become a better programmer instead of memorizing what you should do is focus on your skills of learning. Learn what type of learner you are. Do you learn from reading? Videos? Hands-on experience (usually the best way for programming, get the reps. Make yourself a better learner because as a programmer you’re going to spend more time learning than anything else. If you can become a quicker and more efficient learner you’re going to drastically increase the speed that you can become a programmer and learn new programming skills.

Think about it this way. Imagine we are learning math. When we are kids we start with simple word problems. Mark has 10 books and he’s read 3 of them. That means he has 7 books left to read. As we’re learning how subtraction works we start with real-life scenarios that are simple to grasp the fundamental concept. Once we have that it’s much easier to subtract 20 from 65 or 100 from 145, whatever it is. We can easily solve those problems because we understand the concept, not because we’ve spent hours and hours memorizing the possible subtraction outcomes of every number.

I know this is a pretty basic concept but it’s an important one. If you’re new to the world of programming stop memorizing everything! Trust me it’s okay, the information is out there for you. Happy Coding Everyone!

--

--