Skip to content

Comment on Memorizing a programing language using spaced repetition software

Comments

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 with them (IMHO). The available libraries are of course broader but the subset you use tends to differ from person to person and actual use will tend to reinforce what you most often use.

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.

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 to reinvent.

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.

It depends a lot on the structure of the course.

At my university the freshman course was, for two years, taught in Haskell. To my eternal shame I managed to dodge most of the first year with a fistful of RPLs, so I never got to sample it.

The result was that lots of students dropped out of computer science and went elsewhere. More than had when being taught something else.

So they switched back to a intro course based on Java (which is their main teaching language for the first two years, C is the second language which is picked up in the 2nd half of the first year). Then you go on to bog-standard Data Structures & Algos / Computational Structures courses, Algo course etc etc which is where you learn the ins and outs of sorting, trees and so forth. Or, in my case, you barely do so because you are a lazy student who didn't do his homework.

The upshot is that you wind up spending most of the intro course teaching the mechanics of Java and motivating students with "interesting" examples. Various graphical geegaws, basically. In such cases students usually aren't using the standard lib, they're using a provided library.

What happened to your research proposal? Did you do the research?

I submitted 4 proposals; I wound up doing a different one.

The others were:

* a robust user-tracking protocol for websites (this is the project I went with). Inspired by a business idea I had in 2008; currently the basis of my "big" startup project.

* a "whole-machine" architecture proof-of-concept -- basically a blog app targeting a VPS. Gives you a lot more design options if you can control the architecture from the OS up. Inspired by my eye-blistering hatred for Wordpress.

* "A model of player Agency for software-created, interactive, just-in-time plot generation". There's simply no way this would have fit into a one year project, but it would be very interesting to pursue some day. I was particularly proud of my little taxonomy of plot generation mechanisms. Inspired by chatting to mates about what's wrong with MMORPGs.

The last one sounds fascinating. I assume the generated plot would be a few levels beyond "Fetch X units of Y and take it to Z"? :)

Email me (see profile), I'll send you what I wrote.

Offer is open to other HNers.

I indeed would be interested in the taxonomy of your last proposal, too.

Great!

I've been learning to talk French using CD's from Pimlseurs that uses spaced repititon to help you memorizing words.

You're constantly beeing asked by a english voice to say something in french, and after an hour it asks you to repeat the new words you've learned.

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, making a wild guess much more likely to be correct)

PHP ... uses a mix of naming standards.

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.