Skip to content

Instantly share code, notes, and snippets.

@zcaceres
Created May 26, 2017 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zcaceres/0a0de80cae070d112ce5ad2630c69940 to your computer and use it in GitHub Desktop.
Save zcaceres/0a0de80cae070d112ce5ad2630c69940 to your computer and use it in GitHub Desktop.
bootcamp mastery: do it from memory

Do It From Memory

I love flashcards. One of the fun things about programming is that you can turn almost anything into a flashcard.

The secret of flashcards is spaced repetition. Just as something is slipping out of memory, flashcards force you to retrieve it. This strengthens the neural connections to the concept, just like exercising regularly strengthens your muscles.

You can use Anki to make your flashcards, because it automatically spaces out your repetition.

Practice every day. Put 'review Anki' in your todo/task list of choice.

Memorization gets a bad rap. In programming, some people will say 'I can just look it up in the docs when I need it!', or 'Programming isn't memorizing syntax, it's about knowing how to reason through problems.' Don't listen to these people.

This is like saying that I speak French but I need to look up verbs in the dictionary every time I use a verb in conversation. You'll often use docs for things that you do rarely, like building boilerplate, deploying an app, or configuring a database. You'll use docs when debugging a particular library. But a high level of fluency in your language of choice requires memorization.

Whatever language you choose, you should know the language's major methods and data structures by memory. These form useful chunks in your mind, which you can apply when solving problems and writing code.

If you don't memorize, you'll move more slowly while coding. The constant back and forth between your code and the docs can prevent you from getting into the flow state that is so conducive to solving tough problems. You'll also be a less valuable pair-programming partner because you'll only be able to speak in generalities rather than helping your partner implement with the right tools.

At Fullstack, we recently had an exam that showed the usefulness of memorization. The exam required us to use a technique called eager loading to access additional data from our database. I don't know why, but everyone (including me) had trouble using eager loading. That's why memorizing how Sequelize handles eager loading was so useful. A problem that could have been a 20-minute romp through the legendarily-confusing Sequelize docs took about 30 seconds, because it had been committed to memory.

Finally, avoiding memorization will make you worse at solving problems. Why? You will come to associate certain methods as the right tools for certain problems. 'This sounds like a .reduce() problem.' 'We could easily get at these values if we stored them as a Set.'

Memorizing doesn't just make you faster, it primes your mind for recognizing categories of problems and their solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment