So, in cases like this, use multiple placeholders. You'll end up with a card that looks something like this:
I often find it useful to take things one step further, and create multiple flashcards, not just multiple placeholders. Out of this one task, I would create the following flashcards:
testdirectory?" With the answer:
testserver using Capistrano?" With the answer:
Breaking it up like this makes for more cards, but each card is easier. Instead of ending up with one mammoth card that'll be difficult to remember, you end up with a whole bunch of "knowledge atoms," each of which is easy to learn. Combined, they make up the whole answer — but you can now use them for many other things as well.
So you get:
This one's simple. Never create a card directly from Stack Overflow or any other source, without trying it out in code first. You have to know and see that it works. You're creating the memory when you try the command, not when practicing the card. That basic moment of seeing that it works is crucial, and you'll catch typos and discover other surprises, too.
Your flashcard deck is a living knowledge base. Don't let it get stale. If you're seeing a card that isn't quite right, edit it and fix it. If you make a big change to it, mem.dev is smart enough to reset your progress so you can learn it newly. If it's just a small tweak (fixing a typo, for instance), your progress will not be reset.
Of course, you can always reset your progress manually when reviewing a card by clicking the Again button.
Finally, if you're looking at a card and it feels silly, purely theoretical, or irrelevant, stop right there. Suspend it — you won't have to look at it ever again. If you ever need it later, you'll find it in your card collection, and will be able to revive it with a click.
The tips above are useful when creating new cards, but also when having trouble with an existing card. If you're seeing a card for the tenth time and you still can't remember it, stop. It's time to look at several things:
The key thing is don't just keep blindly hammering away at it — working with flashcards is not supposed to be an endless boring slog. If you're not flying through your cards, having a blast — something's wrong.
Let's say you have a card asking for something you know. For instance,
Named argument syntax in Ruby functions, with an answer like:
The card comes up, and you dutifully type the answer. You know it, after all. And great, you get it right. At that moment, wait. Don't just continue. Ask yourself one crucial question: Am I using this bit of knowledge in my daily work?
If you're not, there could be two explanations:
When the latter happens (you catch yourself not applying something you know), click Again. In other words, rank the card as if you failed it — as if you don't really know it at all. Because our knowledge is measured in application, not in theory. If you're not applying, you don't have it.
The card will then come up again tomorrow (thanks to the nature of spaced repetition), and you'll get several frequent reminders of the coding technique it's about. Sooner than you know it, you'll be applying it in your daily work.
Before we get into the articles and books, I feel Anki deserves its own section. It's the best-known flashcard tool today, and for good reason. Anki is completely free, and it's awesome. It uses a similar algorithm to mem.dev, but is optimized for general-purpose learning. It's great for learning languages, as well as general facts about the world. Has a free Android version, too.
If you need to learn anything that isn't programming, Anki is your go-to tool. Because we had the liberty to optimize mem.dev for one particular learning task (mastering programming), we were able to surpass what Anki has to offer on that particular use case. But for anything else — use Anki. I use it daily myself.
This is just about the most important article you can read about using flashcards. No matter what it is you're trying to learn, Dr. Wozniak is well worth reading — and re-reading. The tips above are my own understanding of some of Wozniak's thoughts, but you should really take the time to read the source reference.
Derek Sivers graciously allowed us to use a quote from this article on our homepage, but you should read the whole thing.
While I don't agree with everything Jack Kinsella has to say about learning to code using flashcards, many of his tips ring true. Note his first tip, on using screenshots, is actually better accomplished in mem.dev using our syntax highlighting feature.
While Fluent Forever is aimed squarely at learning new (human) languages, Gabriel Wyner's ingenious ways to use flashcards are inspiring. His explanation of spaced repetition is excellent, and the overall system is compelling. A great example for what flashcards can do when expertly used.
First and foremost, it's a great read. Joshua Foer's journey to becoming a memory champion is a true-life story that reads like fiction. But like Fluent Forever, Moonwalking with Einstein is great at explaining what our memory does well, and what it's not great at.
Anyone can start using flashcards; keeping up with it is the tricky part. Consistently practicing with your cards requires a certain mindset — that of a craftsman. Cal Newport's book explains why that mindset can change your career, and why "finding your passion" is basically bullshit. Become a master of your craft, and good things will follow.