by throw10920 · 4y ago · 0 comments
While I'm happy with the way the diff style turned out, I will say there is one big downside for me: It's a huge pain to write. Not only did I do a "git diff" every time I made changes and documented it, but if you end up changing something later down the line, then I basically had to go back to the very beginning of the chapter, follow the tutorial along, and double check everything. Maybe there's a more efficient way to do this, but it was a bit tedious and time consuming.
Still worth the effort in the end though, I think.
I ended up writing a whole little custom build system to automatically generate the snippets and their surrounding context based on comments in the source code [1]. It was a fairly complex program to write, but it makes it completely automatic and error-free. I can't imagine trying to maintain it all manually.
[1]: http://journal.stuffwithstuff.com/2020/04/05/crafting-crafti...