Have you tried literate programming? It is a way to download your thought process into the "code". Particularly good for those who like to write.
An example tool to create it is my own program at https://github.com/jostylr/literate-programming which uses markdown as the syntax. While the examples are web language-flavored, it can be used with any language.