Hacker News new | past | comments | ask | show | jobs | submit login
Remember Rust with Anki (argpar.se)
77 points by shinryuu 65 days ago | hide | past | web | favorite | 34 comments



Personally, I never use a pre-made Anki deck. It feels like skipping over the initial learning period that I'm trying to lock-in with further study. Making every card I use myself means that I won't be totally baffled the first time it comes up, and there's a good reason I added it in the first place.

Using a pre-made deck just feels like a barrage of random information like this: https://twitter.com/zbgolia/status/1138489910757920769


Agreed; but once reading through https://doc.rust-lang.org/stable/book/ it is nice to have a deck like this. I wish it would be standard that all docs and books would include an Anki deck. I cannot remember squat without practice.


I think of (many branches of) knowledge as being like a web built on top of stakes stuck in the ground. Anki is really good at helping you stick those stakes in the ground, but it's still on you to build that web.

You can go either way; you can take a sort of vague, weak web you've already started building and use the stakes to fortify it. You can lay out a lot of stakes to help you build the web later. You can do any hybrid thing you want.

But either way, Anki may help you memorize things, but it doesn't really help you learn things. I think it's important to understand that when using Anki, so you don't accidentally convince yourself you're "learning" when you aren't. But it can greatly accelerate the learning, to the point that the memorization+learning time << learning time, depending on the circumstances.

(For human language learning, a common Anki task, I suggest an "all of the above" approach; some pre-made cards that probably are higher quality than what you can assemble yourself, some cards you make yourself based on your own learning and reading material, some raw vocabulary cards that doesn't much matter where they come from, non-Anki sources like textbooks, a little bit of everything. In most endeavors in life that's a recipe for diffusion of effort and a lot of wasted effort but it seems to me to be the way to go for human language. A single type of Anki card on its own may let you lay down a truly glorious set of stakes, but you still won't have "learned" much of anything.)


I use a pre made anki deck for medical school. I add some cards myself now and then, but it's sufficient. I review all the new cards once, first, and that way I've "learned" the material.

The other thing that helps is if you first read the source from which the anki cards were made. In my case, it's a specific set of books/questions.


Ok let me check with the help of this link that you given but if u take my opinion pre-made anki deck is not that much easy thanks for this link


I strongly recommend Anki, not just for learning Rust but for learning anything. It is a really amazing and underutilized tool. Not everyone likes flash cards, and it won't fix that, but it does make them far more effective.


It would be helpful if there were a few sample cards added to the blog post.


Agreed. Here on my phone in the gym, I'm really curious about the cards. To see them, I'd have to find a computer - last I checked I can't upload a deck from ankimobile.


Here's a few screenshots https://imgur.com/a/OMvlzij


On one hand, I understand how beneficial is to learn a new programming language. On the other hand, having to constantly beaten by mixing up simple language syntax, googling how to find an element in an array, or even create an Anki deck to revise from time to time is so funny to me.

The one thing that actually helped me to jump between languages and platforms is Haxe. Just use the same syntax and API for the basic stuff, and put the focus on actually building the program. I still have to understand and know well about the target (be it C++, JS, or Python), but the time and the mental effort saved from googling about basic syntax and standard APIs is massive.


This just isn't complete without rewriting Anki itself in Rust.


While Rust is great, one of the things I love with LISP (Clojure) is once you spend 3 min learning the syntax you know it or can guess the syntax in 99% of cases. No need to look up how to do something complicated, just look at the order of arguments.


I did the same thing for Java about a year ago:

https://ankiweb.net/shared/info/647806244


I'd love one of these for Elixir/Erlang and probably more so Haskell.


If you need flashcards to remember syntax, you're probably not writing/reading enough code.


Probably true if you can't remember how to write if/else or a for loop. But it's very useful for the bits of knowledge that you might not be needing all the time. Don't know how many tweets I've read from developers saying things like "I've been coding for ten years and I still have to Google this one particular thing". Those things are perfect for flash cards.

Example: I am almost never in need of grep. But sometimes I want to know which files in my project contain some string. Never could remember the right flags and order of arguments until I made it a flashcard--now I don't have to Google it anymore on those rare occasions when I need to know. Using flashcards for lots of little things like that really speeds up development; my cognitive switching costs are greatly diminished.


Does it speed up development? Or slow it down because you are reviewing things you rarely need instead of doing useful work? Sure in the moment it speeds things up, but over time it slows things down since you spend time learning things you might not need again.


This would depend on when you spend your review times. I do mine 2-3 times a day: morning with my coffee, around lunch, evening after dinner. Times that are otherwise mostly "idle" (if I'm doing anything else, it's browsing, reading a book, or watching a show). I do sometimes put together cards during the workday (I need to get back into this habit) after looking up something I don't know or couldn't recall but thought was worth committing to memory.

In the end, trying to remember everything would be silly and largely a waste. But memorizing those things that are common (but not daily) pain points would probably be an improvement over not. OTOH, I'm not going to quantify my time sufficiently to be able to provide clear evidence that it really speeds up my work.


One problem is, "might not need again" is self-fulfilling. When you're developing something new, you mostly rely on what you happen to know.

What you know is a Turing-complete subset with all the platform escape hatches you need, so you're able to get your stuff working.


Someone somewhere (gwern? Xkcd?) estimated: if you think you will lose 5’ in the rest of your life searching for it, you can anki it and will save time, statistically, over the long term.

Something like grep can easily meet the mark.


Me, yes: https://www.gwern.net/Spaced-repetition#how-much-to-add

The XKCD comic you're thinking of is much more general^: https://xkcd.com/1205/

^ and not too helpful here because it assumes you know how much time something saves/costs - which isn't obvious for spaced repetition because the entire point is to dynamically adjust the timing & number of repetitions over the long run.


The point of Anki is to enable you to retain memory of things which won't normally happen due to natural exercising of memory. Basically, by incorporating Anki into your life it becomes possible to "lock in" knowledge -- and ofc, this comes with opportunity cost so if you were to load up this rust deck you certainly are making a large commitment to retaining knowledge about rust over the long term.


Every person learns differently, so there's no absolute statement that applies when talking about learning.

You are right, if you code frequently, it becomes much more retained. Not everyone who wants to learn to code has time, that is, a full time job, or a dedicated course of study within which to build that repetition.

I'm managing now and when I go home I like to spend time with my family, but I still like to learn new things and play with new ideas/languages on hobby projects, but I am very time constrained. Things like flash cards help me a lot, especially if I have a large gap of time between the last time I touched something.

I assume the author is in a similar position to me, or that they learn better with flash cards. I went back to Rust to play around a bit and found myself having to re-read the Rust book to get my head wrapped around a few things that were really obvious, but lost in the prose of the book after being away for a few months.

I strongly encourage you to think about how others learn, especially if you're ever in a position to teach or mentor anyone in your field.


If you're writing 'enough' Rust, you're probably a Mozilla employee.


I've been writing almost exclusively rust in my day job at ThreatX for about 3 years now. It's getting picked up more and more in production everyday. It's a great, modern, maintainable, secure alternative to C/C++. I couldn't imagine doing another greenfield project in C again.


The numbers don't bear that out; there are far more orgs than Mozilla writing significant amounts of Rust.


Sure, but the glorious thing about Anki is the scheduler -- every time you get a card right it will reschedule reviews further away, on an exponential schedule. And if you self-grade 'easy' then it gets an even bigger time to next review. The cost of throwing in a few syntax oriented cards isn't terribly high in the grand scheme of thing, and there are many other bits of programming languages that are amenable to memorization -- libraries, APIs, common datastructures and idioms.


It's a fair point. I'd say it's helpful if you for some reason have an extended period away from the language and still want to remember it.

Also, when you're just starting out it's helpful, you've got the information collected in one place and won't need to hunt it down via google.


Your comment lacks substance: you have not tried both approaches to provide some insight into their relative advantages and disadvantages.

I've never used flashcards for remembering anything related to programming, but I know how effective it is for foreign language learning, so I wouldn't jump to the conclusion that for programming it would be no better than just working with code.

Languages don't just have syntax but standard library and API functions. It seems like spaced repetition would be an efficient way to remember the synopses of 5000 functions, compared to just spending years reading and writing code.


Alternatively, you're writing/reading enough code, but it just happens to be in four different languages because you're doing a mix of greenfield and legacy, and all of these languages have syntax that's both similar _and_ different enough to mess you up from time to time.


Making the flashcards on your own definitely helps with remembering things.


I have an anecdotal data point here. I have Japanese decks made from third-paty data, and one that I made myself by encountering words in the wild and adding them one by one.

My performance isn't any better on the deck I made myself.


[flagged]


What the hell is this?


Spam.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: