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.
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.
Something like grep can easily meet the mark.
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.
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.
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.
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.
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.
My performance isn't any better on the deck I made myself.