See the article, “Memorizing a programming language using spaced repetition software” here:
I use some super-dumb examples on that page, but I hope the points above the examples help.
Also make sure to read Piotr Wozniak's awesome “Twenty Rules of Formulating Knowledge”:
http://www.supermemo.com/articles/20rules.htm
(He's the author of SuperMemo, a predecessor to Anki.)
http://www.jackkinsella.ie/2011/12/05/janki-method.html
The trickiest part is knowing whether I am memorising trivialities and triteness or whether this will lead to deep understanding.
I've known about SRS for quite a while; I even wrote a project proposal to study whether it could improve academic performance of freshman compsci students.
It wasn't until I flamed out embarrassingly in a tech interview a few weeks ago that I decided that I really need to be mastering this stuff, not just bluffing my way through it.