CodeTour: VS Code extension to record and play guided walkthroughs of codebases
github.com
github.com
Edit: It actually can reference a git ref, WOW: https://github.com/microsoft/codetour#versioning-tours
In general, I've seen a pretty great reaction from folks about the concept of CodeTour, and so I'm very focused on making them maintainable, since I believe that's the "big rock" needed to make them a worthy investment for more teams.
I personally envision using it for onboarding new developers to a code base, in which case I think being on an older ref should be fine, since I'm just trying to show the general structure of a project.
I could also see using it in a code review context, in which case pointing it at the branch would also be fine.
Also, if you look at the schema it generates for a tour, it would be pretty easy to go through and update the line numbers directly in the JSON.
EG a class or function.
Without this it seems tours could be broken/outdated very quickly in active code bases.
Do you have any plans for that?
tree-sitter [1] supports parsing a lot of languages and could be a good way to make that happen without too much effort. (as long as items stay in the same file)
But many developers might be very much against littering code with such tour comments, and be very much opposed to any kind of responsibility of updating tours during refactoring.
Me included.
Additionally, after speaking with a bunch of folks, there are definitely teams that weren't interested in "polutting" their code with comments that might be tailored to onboarding new team members, and therefore, didn't need to be always visible.
That said, I totally agree with the value of a literate programming-based solution. But there may also be some nice properties to a "side car" file as well, and so I'm primarily trying to explore how well we could make that work, in a resilient and easy-to-maintain way. We'll see how it goes!
Add an extension feature that toggles (hides/shows) those comments maybe?
It seems to me that CodeTour is very close to Knuth’s idea.
the first thing that came to mind are walkthroughs by original authors. in fact, i recently downloaded the source code for the first IRC server/client by the creator of the protocol. i could use a walkthrough. the c code is quite old and nothing online helps you understand it.
this could help explain old code bases like the first unixes or the first c compilers. or maybe we can get id software people to do walkthroughs for doom, quake, etc.
this is awesome.
Thank you for your hard work! I use both at work, so I'll still get some use out of this I'm sure.
I'm hoping that some day it'll be possible for my coworkers to follow a CodeTour without installing VS Code.
Either when GitHub Codespaces reaches general availability or if I ever find the time and motivation to learn enough about github1s [1] and CodeTour to integrate the two.
Nota: It was previously pushed on HN (without to much success): https://news.ycombinator.com/item?id=25823697
The VS Code extension is also very much appreciated here so congrats again for the awesome tool!
Or just have the user check out a specific commit
Either way, great product and implementation.