Readit News logoReadit News
stared · 2 years ago
Quite a few times, I got asked, "What should I memorize when learning Python?". I always answered: "Nothing! You will naturally memorize things that matter and others don't". Obviously, it is contextual - a backend developer will memorize different things than a machine learning researcher.

When we use anything, spaced repetitions come naturally (so it is also why our brain is tuned to them!). Artificial spaced repetitions are often helpful when we learn in an artificial environment - a new human language when there is little opportunity to practice it, things for an exam, etc.

With programming languages, as long as you have a computer, there is no reason to learn it without actually using it.

karmakaze · 2 years ago
My answer would be to memorize useful facts that can't be derived from other knowledge. But put the most effort in building up fundamentals that can synthsize most usages.

Arbitrary things like obscure names, weird parameter orderings, mutated inputs, etc are all the sorts of gotchas that can be learned up-front if you care to know them before being bitten.

An example for Python is the del statement `del d[key]` which I find arbitrary and non-intuitive.

Actually when learning any language I usually learn the collections usages early--these would be good to memorize rather than repeatedly looking up and learning case-by-case as a time saving (non flow state breaking) measure.

For Swift it was all the weird call forms with keyword/symbols that move around rather than being additional parts of a complete form.

stared · 2 years ago
Learning parameter ordering is precisely a thing that I advice against memorizing. Just use IDE.

Other things - well, there is Google, there is StackOverflow, and now - also ChatGPT with GPT-4.

Sure, it might not be enough for learning (at least, not for everyone), but well enough to avoid needless memorization. Memorization always comes at some opportunity cost of using time (and, well, brain capacity) for something more fruitful, e.g., learning good programming patterns, wise abstractions, etc.

BeetleB · 2 years ago
It's not an either/or.

I'm fluent in Python, but had spent most of my time in 2.x. When I had to finally switch to 3.x, I went through all the 3.x release notes for new capabilities. One thing stood out: scandir was the preferred method compared to os.walk.

There's no way I'll remember that and I'd be too lazy to Google it. So it went into SRS.

Ditto for concurrent.futures (broke my habit of using multiprocessing directly).

The other use case for SRS and programming languages: There are always languages I use only occasionally (e.g. Emacs Lisp) So I'll never develop muscle memory. Using SRS significantly boosted my Elisp capabilities.

I don't code in JS, but I decided to take a course on it and put a lot of the stuff in SRS. I've almost never used JS since, but a coworker is using it in a project we're both working on. I was looking at his code, and pointed out to him various alternatives that he wasn't aware of (e.g. newer features since the time he learned it). Definitely would not have been able to do it without SRS. I can mostly read/understand his code. Again, almost entirely due to SRS.

nequo · 2 years ago
> There are always languages I use only occasionally (e.g. Emacs Lisp) So I'll never develop muscle memory.

This is a fantastic use case that I hadn’t thought of.

One big problem with DSLs is that unless you use them on a near daily basis, you’ll keep forgetting how to use them. They really need to be worth the memorization cost that they introduce to a system. But SRSs can help.

thorum · 2 years ago
I mostly agree, except if you only learn this way, you’ll end up missing a lot of non-obvious features of the language. E.g. writing your own function to do something you could do in a single standard library call, if only you knew it existed.
tester457 · 2 years ago
I programmed a spaced repetition system that integrates the doing, so that my cards aren't just memorization and theory. Each flashcard is a kata I have to program, and the program checks if my output is correct.
Sakos · 2 years ago
How did you implement this? It's exactly what I've been wanting for ages.
kazinator · 2 years ago
Perhaps, as long as you have a computer with access to chat AI, there is no reason to memorize the whole language.

Without chat AI, or an expert Q&A forum, it is difficult to search for the best solution for a complex problem articulated in its entirety.

What will end up happening is that you will convert your Y problem into multiple smaller X problems and search for how to solve those. You will design the solution to the problem in the abstract language of your mind using these smaller steps, and then map those steps to the programming language. You can much more easily look up smaller steps such as "find the index of a character in a string".

By the time you get to these small steps, you're imagining a detailed solution, whereas the language could offer something more direct.

One tell tale sign of this is code that contains functions which have exact equivalents in the standard library.

When you ask the programmer why they didn't use the library functions or built in syntax they will often say, oh I looked for something like that, but didn't find it; it was faster to just write the code than to look for it.

Zababa · 2 years ago
> With programming languages, as long as you have a computer, there is no reason to learn it without actually using it.

Spaced repetition isn't about learning, it's about remembering. From the article:

> Flash cards are for remembering what you’ve learned.

Flash cards are great for something that you don't use often but still want to remember. I use it a lot for CLI options (docker, ripgrep, etc), parts of the standard library that are useful once in a while but not always, algorithms, editor shortcuts. It also means that when you switch environments you can still remember everything.

brushfoot · 2 years ago
When this comes up, I often see the criticism that it's better to learn by doing, because you retain what's necessary and forget the rest. On the contrary, that's exactly the problem this solves.

There are lots of things that you don't use day to day that it may be useful to have in memory when the need arises. That could be libraries, syntax, concepts, patterns, etc.

An example for me is CSS flexbox. I work with CSS just enough that when I need it, I don't want to sift through blog posts and MDN documentation to get what I need; I just want to know it. Chances are you can think of similar situations in your own work or personal life.

IshKebab · 2 years ago
I think good quick reference guides are a better answer to that. Learning by doing is spaced repetition, with the added benefit of automatic tuning (you don't waste time learning stuff you never use).

In other words, you could equally say "I work with CSS just enough that I don't want to spend ages learning it via SRS; I just want to look it up when I need it".

The key is making looking things up as painless as possible.

kazinator · 2 years ago
Problem is, there are things you don't know you need until you know about them.

You can always code around not knowing your entire programming language or libraries.

Spaced repetition is obviously a tool for someone who wants to know all the nooks and crannies, in order to become a walking reference.

It could always be used for a subset. If there some 15% of some language you think you're going to use, and not much more, you could still SRS on that 15%.

breathen · 2 years ago
Why not just google it? Seems like a better use of both time and brain space. Reminds me of Socrates complaining about how the kids these days write everything down and don't bother memorizing anything.
jodrellblank · 2 years ago
Why would you learn Spanish? If you got to Mexico you can just Google "how to understand Spanish" and then you'll understand it completely, just like in the Matrix.

While you are trying to Google the right thing and make use of the answer, you're missing the limited chance to be talking with people in Spanish, had you already known it.

Instead of Googling "how do I trim a string in {language}" you could be thinking about the problem you actually want to solve.

thfuran · 2 years ago
You probably won't Google a footgun until it's too late. Why would you not want to save yourself the trouble?
BeetleB · 2 years ago
Have you tried Google of late? I have to click way too many links to find the site with my answer. Even for basic Python APIs.
Geeflow · 2 years ago
I can't recommend spaced repetition enough. I use it for everything: Phone numbers, names, business knowledge, dungeon and dragons, ...

A different article[1] sums it up pretty well: "Anki makes memory a choice, rather than a haphazard event, to be left to chance."

[1] https://augmentingcognition.com/ltm.html

Dead Comment

dang · 2 years ago
Related:

Memorizing a programming language using spaced repetition software (2013) - https://news.ycombinator.com/item?id=30545544 - March 2022 (9 comments)

Memorizing a programming language using spaced repetition software (2013) - https://news.ycombinator.com/item?id=21481461 - Nov 2019 (43 comments)

Dead Comment

hiAndrewQuinn · 2 years ago
Spaced repetition is great! Reading and making around 300 Anki cards out of Networking for System Administrators was one of the highest ROI things I did in a while - I finally understand at a high level how all those networking stacks actually work together, and I know a bunch of useful new command line tools to boot.
victorlf · 2 years ago
This is the basic idea behind https://python.cards, the site I'm building to learn Python with spaced repetition.

The hard thing is building the deck. With pre-built decks I expect to greatly reduce the effort required while getting most of the benefits of spaced repetition learning.

dan-g · 2 years ago
Writing effective cards is more of an art than a science, I've found—and seems to work best when you're the one writing the cards for yourself. A good resource for those interested in learning the craft is "How to write good prompts" by Andy Matuschak: https://andymatuschak.org/prompts/

However, he's also shown that cards can be written for a general audience with careful thought, see his & Michael Nielsen's work on http://quantum.country.

I'll be curious to see how python.cards goes!

max_ · 2 years ago
I was really fascinated with the idea of space repetition. For a long time.

I only have 1 problem. There is no good space repetition app on for smartphones. Websites & computer apps are just too clunky for me to use the effectively.

I would like to build one, but I really don't have a comprehensive on how the entire concept works and how to implement it.

Does anyone recommend any great books or resources that comprehensively describe space repetition & how to use it effectively

gentleman11 · 2 years ago
This guy's work more or less kickstarted the movement, but be warned: there's a lot of reading here

https://supermemo.guru/wiki/SuperMemo_Guru

max_ · 2 years ago
Thank you very much. The resource is such a gold mine.

God bless you!

delackner · 2 years ago
Anki is well regarded and has both first and third party (AnkiWeb) iOS apps
hiAndrewQuinn · 2 years ago
Yeah, the Anki apps are honestly some of the best apps I've used on both Android and iOS. Assuming you already know how Anki itself works, that is.
PNewling · 2 years ago
The book Make it Stick by Henry L. Roediger III, Mark A. McDaniel, and Peter C. Brown includes a good deal about spaced repetition.
mahatofu · 2 years ago
I find Brainscape to be the nicest overall app. Free to use. Tons of existing content. Mobile and web friendly.
allig256 · 2 years ago
What were your issues with the standard Anki app? It might not be the prettiest app, but it is effective.
max_ · 2 years ago
Every time I open the Anki app I really don't know where to start or how to use it. There are just too many options distracting me.

It would be easier if the features were reduced & the app kept minimal. Think the apple notes app & Google keep, but for space repetition. Anki feels like Microsoft Word.

Also a sample collection of decks with something to start learning right away (just to understand how the app works) would help me alot. Maybe a language, math theorems, APL verbs etc.

zsoltkacsandi · 2 years ago
What do you mean by speaker repetition app?
Jtsummers · 2 years ago
It's probably autocorrect from some typo'd version of "spaced".
max_ · 2 years ago
Sorry typo. I just fixed it.
chenxi9649 · 2 years ago
Also saw this on Twitter a few days ago https://www.pinecards.app/

Haven't tried it myself but it seems like a more modern/gamified version of Anki.

I wish there was a market place for spaced repetition decks on different topics/fields. It does seem like the closest thing we have to downloading a "topic" into our brain.

Ajedi32 · 2 years ago
> I wish there was a market place for spaced repetition decks on different topics/fields

Anki has https://ankiweb.net/shared/decks

So far I'm really enjoying the geography decks, like https://ankiweb.net/shared/info/2109889812

Rexxar · 2 years ago
I'm not a regular user of Anki. But if I start again, how does it work when someone want to upgrade a package to a more recent version ? Does it merge correctly if I have added some cards or added some personal fields to the "Note Types" (and updated some card consequently) ?
isaacaderogba · 2 years ago
I'm the developer of Pine, thanks for sharing! I've actually written a bit about how the whole memory scoring system works here https://pine.substack.com/p/designing-spaced-repetition-syst...
epiccoleman · 2 years ago
I've wondered a few times about trying to sell a deck for some music theory stuff I want to memorize. Idk how much precedence there is for selling decks but it seems like it could easily be worth $5 or $10 to take the work of deck construction off someone's plate and just let them get cracking on learning it.