342 private links
Write the documentation of what you do, then write the code snippets to make it work. The comments are the main attraction and the code is secondary.
In an interview in coders at work it's inventor Donald Knuth explains his enthusiasm for it: "First rule: understand your audience and write for that audience. Second rule: say everything twice in complementary ways so the reader has a chance to put the ideas into their brain in ways that reinforce each other".
To document the progression, write atomic commits (the minimal and accurate solution to one agreed problem. It's the occasion to describe the change in the commit message. "Even if you don't know the language the code is written in I bet it makes a lot more sense by reading what it's supposed to do in plain text first."