Live data from Hacker News

Memorizing a programing language using spaced repetition software

sivers.org

11–20 of 94 posts

Re: Memorizing a programing language using spaced repetition software

#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://www.sinosplice.com/life/archives/2009/08/06/the-space...

At this point, I'm seeing the same thing again, but distributed to a larger group of people. Everybody and their cousins are making SRS programs for learning languages, often Chinese, and that giddy feeling I had when encountering the idea of SRS seems to be all over the place!

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.

SRS is seductive. It's amazingly good for things in which there is a set number of essentially unrelated pieces of information to memorize (e.g. 5000 common Chinese characters), but it's terrible for learning something more nuanced (e.g. how to read Chinese). I do still keep it as a tool, but it's a special purpose one.

Re: Memorizing a programing language using spaced repetition software

#12
The examples you give are idiosyncrasies that shouldn't be in your code base in the first place (IMHO). These are things that vary from language to language and trusting yourself and others who are going to be reading your code to keep track of them correctly is not a good idea.

    a = 5 + '5'
Ignoring the lack of a sigil, in PHP, a = 10.

In Python, this fails to typecheck.

In Javascript, as you note, a = '55'.

(I used an interpreter for each of these languages to verify this)

For me, I could potentially see the usefulness for this in two things: the various meanings of the 'this' keyword in Javascript and the positioning system for CSS. I always have to look that stuff up. Never seems to stick.

Otherwise, the 'factoids' I have 'memorized' are all out of necessity and come from repeated usage. I don't consciously memorize anything.

Re: Memorizing a programing language using spaced repetition software

#13
post #2

Thanks for posting this. I hope this format is useful to you guys. I actually spent the last two days making a video of this, with screen recordings of using Anki and such, and then felt it's a lot more efficient to just get the info on a static HTML page instead. Any advice appreciated. - Derek

I'd attempted to do this before but got stuck formatting the cards. Going to give it another shot with your examples - cheers!

Re: Memorizing a programing language using spaced repetition software

#14
I have been programming for the last 15 years and I still sometimes look things up, even in languages I use daily. I would not really change this, since if I use it often I will remember it - - and if not, it's just one search away. I think memorizing random facts is a really bad way to become a better programmer - - much better ways is to solve problems and read expert code (via ex. GitHub).

Regarding the memorization technique I am unsure if this is the most effective way of remembering things. The book "Moonwalking with Einstein: The Art and Science of Remembering Everything" presents a lot of tricks on how to memorize things that could be more effective than the method described in this article.

Re: Memorizing a programing language using spaced repetition software

#15
Oddly enough, I've tried SR multiple times in the past, with very bad outcomes. For example, if I added 10 new english words on day 1 (english is my second language), I would only recall ~10-20% the day after.

Then a few days ago I started reading The Memory Book which really emphasizes on visualizing things, making correlations, etc. The effort of visualizing and using imagination really made a difference: in one hour I memorized the list of 50 states forward and backward with almost 100% accuracy after 2-3 days (I had never head of some states before).

Quickly after I realized that my limited english vocabulary was also the weakness in this system, so I started visualizing and adding new words to Anki once again. The result is that my recalling after 24 hours is close to 80-90% for new words, which is encouraging.

I've been doing this for ~1 week, so take it with a grain of salt, but for me it seems that visualizing the words and using SR is helping. It takes 3 times the effort, but as long as I remember things, I don't care.

The idea of applying the system to programming sounds interesting, and definitely worth a try.

Re: Memorizing a programing language using spaced repetition software

#16
post #8

Once you know a few languages, picking one up in the same family isn't that hard. The biggest challenges, for me, when picking up a new language is to: 1) Learn to write idiomatic code. 2) Learn the name of the library functions, so your flow isn't constantly interrupted by looking for what you need. 1) I think, can only be done through reading other people's code. But I've previously thought about doing 2) by using…

2) Learn the name of the library functions, so your flow isn't constantly interrupted by looking for what you need. Eh, this isn't necessary. I've been programming (and continuously making a concerted effort to expand my programming knowledge) for more than a decade, and memorization of anything simply hasn't been very helpful. For example I have no idea what Python's regex syntax/library function is, even though I'v…

If you don't memorize anything you'll be going to stack overflow for everything. If you spend 10 seconds everytime you need to get the first char of a string, a substring, create an array etc you'll be wasting an awful amount of time. Knowing the core functions is a huge timesaver. Python's regexp functions are arguably not 'core' library functions.

Re: Memorizing a programing language using spaced repetition software

#17
post #12

The examples you give are idiosyncrasies that shouldn't be in your code base in the first place (IMHO). These are things that vary from language to language and trusting yourself and others who are going to be reading your code to keep track of them correctly is not a good idea. a = 5 + '5' Ignoring the lack of a sigil, in PHP, a = 10. In Python, this fails to typecheck. In Javascript, as you note, a = '55'. (I used…

Yeah, the `new Array...` questions as well - they should all be trick questions with the answer "don't use the Array() form".

Re: Memorizing a programing language using spaced repetition software

#18
post #16

Earlier quoted context omitted.

2) Learn the name of the library functions, so your flow isn't constantly interrupted by looking for what you need. Eh, this isn't necessary. I've been programming (and continuously making a concerted effort to expand my programming knowledge) for more than a decade, and memorization of anything simply hasn't been very helpful. For example I have no idea what Python's regex syntax/library function is, even though I'v…

If you don't memorize anything you'll be going to stack overflow for everything. If you spend 10 seconds everytime you need to get the first char of a string, a substring, create an array etc you'll be wasting an awful amount of time. Knowing the core functions is a huge timesaver. Python's regexp functions are arguably not 'core' library functions.

If you spend 10 seconds everytime you need to get the first char of a string, a substring, create an array etc you'll be wasting an awful amount of time.

Not at all. You only need to do it once for the current program you're writing. Now you have a working example to refer back to, within the program. So the lookup time only comes into play the first time you need to do a certain thing. It's a negligible constant factor (about a couple minutes in total per program, and without interrupting flow).

Also, being prejudiced against those who have a bad memory is not helpful.

Knowing the core functions is a huge timesaver.

Not really. By using Google effectively, it's possible to be productive in any language without knowing any of the core functions.

Re: Memorizing a programing language using spaced repetition software

#19
post #8

Once you know a few languages, picking one up in the same family isn't that hard. The biggest challenges, for me, when picking up a new language is to: 1) Learn to write idiomatic code. 2) Learn the name of the library functions, so your flow isn't constantly interrupted by looking for what you need. 1) I think, can only be done through reading other people's code. But I've previously thought about doing 2) by using…

2) Learn the name of the library functions, so your flow isn't constantly interrupted by looking for what you need. Eh, this isn't necessary. I've been programming (and continuously making a concerted effort to expand my programming knowledge) for more than a decade, and memorization of anything simply hasn't been very helpful. For example I have no idea what Python's regex syntax/library function is, even though I'v…

> But that doesn't matter: alt-tab to chrome, ctrl-N, "python regexp", stackoverflow pops up with an example, copy-paste, done.

I find, though, that this is one of the most insidious causes of bugs in my code. All the little idiosyncrasies in those functions - do they throw an exception when they fail or return a code? Are regexes multiline by default or not? does re.match() match the whole string to the pattern or just part or it? Time and time again it's my assumptions about these subtle behaviors that creates bugs in my code, and I've actually come to the conclusion that I need to do some SRS type learning to get newer languages into my head.

Re: Memorizing a programing language using spaced repetition software

#20
post #7

This is a good post that I'm glad to see refers to a lot of the work done on the subject of memorisation and it would be very useful for vocabulary building in language acquisition (amongst other things). I can't see the utility for programming languages (compared to human languages) however as the grammar and vocabulary of programming languages are tiny in comparison. The best way to learn them is to write something…

The "vocabulary" in a programming language isn't really the reserved words. It's the libraries . Deep recall of the standard library of any major language would probably improve programming fluency a lot -- and it might improve code quality too. I wrote an honours research proposal on this; email me (see profile) if you want a copy.

What happened to your research proposal? Did you do the research?
Post reply on HN