Allow a holistic view of the tutorial code (for Parts II and III)
Some people have pointed out that Part II and Part III can be confusing with their “piecemeal” approach (sometimes people get confused as to what their code is supposed to look like after a given lesson, mostly). Having some way to show what the repo should look like at a given point in time would, I believe, solve issues like #110 too?
To do:
- [ ] Figure out UX
- [ ] Implement it
Would it be enough for starters, to remove line numbe rhave a link to the code like this (possibly create a new file without anchors):
You can have a look at the completed source code here
And remove line number references from the tutorial texts.
Without the line number, how would you suggest one applies the mentioned changes?
I'd also like to mention that I have in mind to present those projects as proper Git repositories, and using libgit2 to extract the diffs and present those in the tutorial.
(We could have the source code be part of the tutorial repo as submodules, linking the projects together.)
This does require some engineering, but I think it would also make sense to present projects as, well, repos, since it's good practice for one's own projects to be structured that way. It'd be a good example.
The what the code is supposed to look like after a given lesson thing seems almost trivial to provide with how the repo is currently set up. For part 2 at least, each lesson already has its complete source code separate to the others. The book could render the source files that were changed, in full, with minimal changes -- just strip the anchors, I think. Obviously this could be behind a link or collapsible thing, to avoid making the page really long unnecessarily. I think the main point @hollannikas was making above is pretty much this, although I'm not sure what the point of removing line numbers is.
I don't see #110 as being intrinsically linked to this. That's a bug with how the tutorial was written, this one is about how the tutorial is read (presented). To be clear, I'm sure it's possible to fit a solution to both problems, but I don't think the problems themselves are fundamentally related to each other.