Using Spaced Repetition Software to Learn Programming Concepts

March 15, 2016   

As a programmer who still has so much to learn, I strongly feel that finding the right tools and methodologies in learning how to program is super important. Learning is a hard skill - especially when it comes to increasing your knowledge around textbook type subjects. Reading a textbook and going through lectures are not always the most entertaining, and it can easily lead to a unproductive study session.

I was studying for one of my computer science classes when I stumbled across this post by Derek Sivers. He explains it perfectly, so there's really no point of me explaining it:

"When you hear a new fact, it's forgotten pretty quickly unless it's brought back to the forefront of your mind repeatedly. You can do this haphazardly by immersing yourself in a language, for example, where the new words you learn will be brought up by chance occasionally. But memory research shows that the most effective and efficient time for a new fact to be remembered is right before you were about to forget it. Say if you learn a new word in a foreign language, you'd want to practice it again a few minutes after hearing it, then a few hours, then the next day, then in 2 days, then 5 days, then 10 days, 3 weeks, 6 weeks, 3 months, 8 months, etc. After a while it's basically permanently memorized with a rare reminder. Spaced Repetition Software does this for you, so you can just give it a bunch of facts you want to remember, then have it quiz you once a day, and it manages the intervals based on your feedback. After each quiz question, if you say that one was easy, it won't be introduced for a long time, but if you were stumped, then it'll ask it again in a few minutes, until you've got it." - Derek Sivers

Basically Spaced Repetition Software, or SRS, is a flash card software that is optimized to increase your chances of learning based on memory research. Pretty cool stuff - but like a lot of you (I'm assuming), I was kind of skeptical that this would actually work.

These were my questions:

  1. Is this applicable to programming? - is it better to simply just Google stuff and code?
  2. Would I stick with it?

And here are my answers:

After actually trying Anki (a popular SRS) out for 3 weeks now, here are my thoughts:

Is this applicable to programming? - is it better to simply just Google stuff and code?

Yes - and no.

What I've found that for a lot of things, it's just faster for Google to memorize. For example, if I were to use SRS to try and memorize how to reverse a string in Ruby, I could make a flashcard to remind myself every now and then. On the other hand, it takes 2 seconds to find out how to reverse a string in Ruby, so it really doesn't make sense to memorize it. If Googling will take less time, you shouldn't be trying to memorize it.

On the flip side, SRS is great for learning programming concepts. A lot of times (atleast for me), I read about a concept and understand it (at the time) and then gain the feeling of satisfaction. But then in a few days when a friend asks me about the concept, my memory is fuzzy or I just don't remember (even though I read about it and understood it a few days back). Once I started using SRS to recall my understanding, it got easier for me to not only recall the concept, but actaully apply it in practice.

This is more of a topic of learning methodology than it is of SRS - you need to find ways to recall information in order to retain your knowledge. That's why many people are avid note takers. SRS is just another way of retaining information - except it's super efficient.

Would I stick with it?


The great thing about Anki is that it becomes addictive - every day you start up Anki, and it provides you with flashcards to go over for the day. Once you go through the flashcards, it feels like you've learned so much in a matter of 10 or 15 minutes.

The difference between Anki and regular Flash Card applications is that Anki removes all the unnecessary going-through of flash cards for you - if you felt the question was easy yesterday, it won't tell you to answer the flash card the next day. That means less flash cards and better learning.

Doing Anki every day has been so easy for me, just because of the way it's designed. It was easy for me to start a habit of using Anki and there are tons of people that would say the same thing as well.

If you're currently trying to learn difficult programming concepts, then SRS might be the way to go. AnkiSrs is free open source software that you can download here.

I would highly recommend reading Derek Siver's post on SRS here, as it goes through the entire learning methodology involved in using SRS.