Live data from Hacker News

Memorizing a programing language using spaced repetition software

sivers.org

71–80 of 94 posts

Re: Memorizing a programing language using spaced repetition software

#71
I've been doing this for almost a year and I agree it accelerates programming languages/libraries learning. Not having to switch between my text editor and the language/library reference lets me focus on the hard problems.

As a programming languages geek, a few months ago a realized that every time I came back to a language that I had learned earlier, I'd forgotten a good chunk of it, rendering all my efforts in vain. So I started using Anki. Here are a few tips from my experience:

- Koans[0] are great as source material. They're available in almost every mainstream language, the problems are usually solvable in less than a minute and you can just copy & paste.

- Always open your repl and type your answer. Otherwise you're not really thinking about the problem but just memorizing the answer.

[0] https://github.com/search?q=koans&ref=commandbar

*Edit: BTW, I've got lots of Ruby, Python, Clojure, Erlang/OTP and a few Dylan flash cards, if anyone's interested.

Re: Memorizing a programing language using spaced repetition software

#72
post #36

Earlier quoted context omitted.

In our extensive user testing we have seen our users make great gains by using SRS. In blind Ruby coding tests we have seen users complete them faster with more confidence in their abilities and results they generate. Got some great data and numbers on exactly how much advantage learning this way gives you. Plan to release it when we launch in a couple of weeks. We are http://www.codesonic.com/ by the way.

> In blind Ruby coding tests we have seen users complete them faster with more confidence in their abilities and results they generate. Are these users' results actually better? In other words, is their higher level of confidence justified?

Yes, it's pretty obvious that the SRS makes a significant difference to the abilities of the users. There seem to be several gains but the biggest are

1. time saved looking things up 2. knowing what is possible and what tools you have at your disposal built right into the language.

Re: Memorizing a programing language using spaced repetition software

#73
post #71

I've been doing this for almost a year and I agree it accelerates programming languages/libraries learning. Not having to switch between my text editor and the language/library reference lets me focus on the hard problems. As a programming languages geek, a few months ago a realized that every time I came back to a language that I had learned earlier, I'd forgotten a good chunk of it, rendering all my efforts in vain…

Interested, in particular the Python ones! Do they go over the Python standard library and "pythonic" idioms?

Maybe you could put them on github, perhaps?

Only a few weeks ago I first read about the spaced repetition technique, and my first thought was "what would I want to memorize? maybe I could use this to learn the parameters and usage of Python (or some other language)'s standard library" ... and there it is, on HN, including someone offering a set of flash cards, saving me that work :)

Although creating one's own flash cards is a good first step in learning, I wonder how good it is (in that particular regard) to someone already reasonably familiar with the standard library, just wanting to save time by less looking up in the docs?

Re: Memorizing a programing language using spaced repetition software

#74

Earlier quoted context omitted.

Having seen a lot of code that duplicates basic functionality of libraries used in the project I'm working on, just writing code might even be counterproductive as opposed to a systematic way of learning the libraries and their usage in the project, reinforcing bad behaviour.

Right. In my proposal on the topic, I proposed dividing a freshman CS class into two groups. One group would use spaced repetition, the second wouldn't. To compare the groups, I proposed using a few common metrics (SLOC, cyclomatic complexity, Halstead's metrics) to get a gauge of the different size of solutions. My guess was that a more "fluent" student would write shorter and simpler programs simply by not needing…

But (in reference to the parent topic of learning libraries vs. learning language primitives) shouldn't freshman CS students be mostly NOT using library functions? For example the classic exercises in sorting, learning various sorting algorithms, or manipulation of tree structures, matrices, etc. if you're just using library functions you aren't really learning what's going on.

Not really commenting on spaced repetition here, that should be helpful in either case.

Re: Memorizing a programing language using spaced repetition software

#75
post #57
post #46

Earlier quoted context omitted.

I don't see use when learning to program but if I memorised, say, the PHP standard library with all its warts, it would make me far, far more efficient at work. Whenever I write in PHP, there's always going to be a lookup for something in the standard lib, whether it's the signature of a function, how it should be used or whether it exists at all.

PHP is a good example as it is very hard to remember all its functions, as it uses a mix of naming standards. (For example, the case-insensitive version of strcmp is strcasecmp, and the case-insensitive version of strstr is stristr) Whenever I write PHP I look up a lot more methods than when I write Ruby, even though I have more experience in PHP (Ruby cheats, a little bit, by having multiple names for many methods,…

PHP ... uses a mix of naming standards.

Not to mention a mix of function/method parameter conventions. Needle, Haystack vs. Haystack, Needle.

Re: Memorizing a programing language using spaced repetition software

#76
post #11

I was a contributor to Anki and one of the earlier language learning bloggers who wrote about spaced repetition for Chinese learning. One thing I noticed at that time was that those of us Chinese learners who were programmers went crazy about spaced repetition... some went so far as to SRS at the exclusion of actual reading. Other language learners blogging about SRS, often weren't so thrilled about the concept. http…

> How I wish I could explain that the context matters and they'd learn faster by actually using these discrete chunks of knowledge in context! That reviewing decontextualized data is a poor way to synthesize most thing! But who would listen? I wouldn't have 4 years ago.

Good point. When I read about SRS for the first time a few weeks ago, I had roughly the same idea as the author of this article (except I didn't carry it out--a million kudos because he did :) ).

Now I think the difference with using SRS for learning a natural language is the ultimate goal: It's not "I wanted to learn how to program in language X", if I wanted to do that, I'd do some tutorials or try to complete some Project Euler challenges in that language. Instead, it's "I want to spend less time having to look up parameters and usage of functions in language X's standard library, a language I am already quite familiar with, apart from spending too much time reading the documentation".

Now that I think about it, I see another great advantage: It's a personal thing, I don't expect most people to battle with this problem as much as I do, but whenever I need to look up something in the docs, the problem is not only that this takes time, but also that I have the tendency to read way more of the docs than what is relevant to the problem at hand, I click through to other pages that seem interesting, which reference an external site, I look up stuff related to that and get completely sidetracked. Not only does this take an extraordinary amount of time, but also drains mental energy that I should be using to work on the initial programming problem. This lack of focus has gotten so bad that it resulted in severe burn-out and I've basically resigned myself to not pursuing a career in computer programming related jobs, even though that's what I love to do.

Not having to look up things, so I do not need to task-switch (as much) and keep focused on the programming, well I tried so many other things, I really must give this a shot.

When I read about SRS, there were a couple of programs available, is Anki generally considered to be the best (free) one to start with?

Re: Memorizing a programing language using spaced repetition software

#77
post #70

Interleaved and spaced practice is a very powerful learning and knowledge retention technique. Some of recent findings in cognitive science has given credence to this approach. If anyone is interested here is the link to one of the research papers. http://uweb.rc.usf.edu/~drohrer/pdfs/Taylor&Rohrer2010AC... I think memorization doesn't really help understand the fundamentals of any topic. Rote memorization can only g…

> I think memorization doesn't really help understand the fundamentals of any topic. Rote memorization can only get you so far. As concepts get harder and complex, dependence on mere memorization leaves a lot of holes in the understanding of any subject matter. The existing research says that spaced repetition helps with abstracting and generalizing understanding as well as 'rote memorization': http://www.gwern.net/S…

Abstracting and generalizing, and understanding advanced concepts, is impossible if you don't have the fundamentals memorized.

Re: Memorizing a programing language using spaced repetition software

#78

Mnemosyne is the best spaced repetition software out there. Free and open source too.

I prefer http://exponwords.com/ Lean, free, open source, web based, works well on mobile. I use it every day, mostly to learn German. (I know the author.)

Re: Memorizing a programing language using spaced repetition software

#79

As others have mentioned, its less about the syntax of a language and more about the plethora of libraries that is the real boon when it comes to using a programming language. It has been said that the majority of a tough problem is worked out unconsciously. If we eschew memorization for "just in time" methods, we are essentially putting a hard limit on the type and difficulty of problems we're capable of solving. I…

Interesting point. I think an analogy that many people can appreciate is that one's knowledge of a language and libraries plays the same role in programming that one's knowledge of mathematics plays when learning physics in school. If you're struggling with the math, you aren't able to devote much thought to the physics you're supposed to be learning. I understood the principle very well in school and always made sure to refresh my knowledge of the required math skills before tackling my physics work, but I haven't applied it to programming as well as I should. Food for thought.

Re: Memorizing a programing language using spaced repetition software

#80
post #40

Earlier quoted context omitted.

> The more of the heavy lifting you can do unconsciously, a vastly higher level of output one is able to produce for the same amount of mental effort. I agree, but working from the standard library has it backwards. One should subconsciously know what is in principle possible and then look up/remember how it's called in the language you are currently working in, and if it is not there implement it yourself.

But the act of searching and evaluating the results limits your cognitive capacity for building even greater abstractions. If you already have some standard set of implementations memorized that frees up your mind to use those pieces as building blocks for new, grander structures. As you fill your working memory with minutia, the larger abstractions are bumped out which makes it harder or impossible to create new abs…

The phenomenon you describe is called "chunking".

[1] http://en.wikipedia.org/wiki/Chunking_(psychology)

Post reply on HN