Document your code just by hitting “record”
paircast.io
paircast.io
I think that an audio (or video) version would be superior, but more because, assuming there are captions, the audio might be able to describe something beyond the code alone more easily than typing out a note would.
You don't just take a transcript of the dialogue in the movie to make a book.
It's way easier just to write a decent README.md.
Wonderful documentation is hard to beat from my learning perspective, but I find that level of quality is more rare.
Therefore, I learn better by watching something materialize on video at ~3x speed and often without any speaking.
I think it simply boils down to my level of trust that this person didn’t accidentally omit anything from their article or blog post or whatever and what I see on the screen is what I get. Now, that doesn’t fix when tools change etc, but videos instill a higher level of trust that, if I follow these steps, I will produce this output.
tl;dr: Refactor not comment
You might need comments to describe why you are doing something. And you definitely need comments for why you are _not_ doing something else.
As a tool to actually document code however as the title suggests this would be a terrible, terrible idea. No code comments or commit messages except a link to a video hosted on a website that may become broken or simply shut down at any time in the future? No thanks. What if I take 2 hours to write 10 lines of code, do I expect people who come after me to watch a 2 hour long video to understand what I was doing? It would also make public a mental process that may be messy, and maybe cause a similar effect to being watched over your shoulder while you code. Not to mention the usual problems of video like low consumption speed, linearity, and non-searchability.
> 93 percent of the respondents noted that incomplete or outdated documentation is a pervasive problem, but 60 percent say they rarely or never contribute to documentation.
The bet is that it's easier to talk about coding while you do it than sit down and write the docs.
I wouldn't ever prefer to create a video tutorial rather than just write out documentation. It's just too far from my workflow (maybe that's just me).
I can, however, see how something like this would be extremely valuable to people who are instructing others on how to write code (DevX, bootcamp instructors, people who do video coding tutorials). I think that "Document your code just by hitting 'record'" is overselling that value though.
There's a lot that is mistakenly conflated as "documentation".
Sometimes I would know enough about a topic except for one little thing and would look to the documentation. I only needed information on that one little thing to be productive, but I'd get stuck reading someone's entire backstory, trying to skim and find the one useful line in a random example to help me.
Other times, I would find documentation and struggle to follow it in practice until I came to the conclusion that I would need to read the whole thing in its entirety to become productive. I would either have to block out some time to learn it all or go with a completely different solution.
I used to think projects that claimed to be documented either fit into two groups:
1. Good documentation: I can find what I'm looking for
2. Bad documentation: I can't find what I'm looking for
My eyes were opened when I read something that I have since committed to memory: https://documentation.divio.com
There isn't just good documentation and bad documentation, there are 4 different kinds of documentation for distinct types of information delivery: Tutorials, How-To Guides, Explanations, and finally Reference.
Now I consider documentation good or bad based on if it contains all 4 kinds of documentation.
Creating incentives within a work environment to write better documentation is easier than trying to record video tutorials.
I agree it looks like a good tool for producing instructional videos.
I make heavy use of voice notes myself.
A transcription of those voice notes isn't something I've found useful. I have one, since it's just a little script but there is a very good reason that "stream of consciousness writing" isn't how we do ... anything.
I'm very curious to see how this can be used but I'm not immediately convinced, you generate commit comments while you write code, documentation is a completely separate thing.
A stream of comments on the why of some parts of code, for people who screencasted the development, would be useful. You could reorganize that stuff and get a really nice set of data about the reasons for code evolution.
That's not user facing documentation however, and providing design docs as documention, especially as stream of consciousness design comments seems like it might not be what people expect or want.
For example, I’ve got an open PR overhauling CRACO’s (create react app configuration override) documentation right now.
It’s a fair amount of work and hard to measure the impact.
There less ways to define “correct” when it comes to docs than bug fixes or feature enhancements.
I get why docs languish. Anything to make the process easier is probably a good thing.
OFTEN I want some form of "stream of consciousness" thoughts associated with code - "spoke with Titus and Jen about this, and the loop needs to be broken up because foobar...". most of the time if I embed comments like that, someone blocks a PR or just rips them out in the name of "cleanliness", then 3 years later people are wondering "why was this done this way?" Links to tickets can help, but ... ticket trackers change - a reference to Trello card GKO-826 does no good when the project moved off Trello 2 years ago.
Perhaps long term there's no good way to deal with any of this...?
// @medianote ./20180902121352.mp3
while (x<users.length) {
// ...
}
button in IDE to record audio note, and have it stored under ./.media relative folder... ?Keeping links working within your organization is really important, and I wish places prioritized it more. Our code often links to our bug tracker, and I'm thankful that my current employer does value this and these links work even when they are decades old.
There are quite a few problems to solve to support this that I haven't worked out properly, otherwise I'd be building it.
For example, where do you keep your backlog? How do issues and issue statuses get stored? How do you report on open tickets and progress if the state is scattered across a bunch of different branches?
However assumptions change with time. I'd like to be able to cross reference all the places in the code base where certain assumption was made to a readme section with necessary details and background. In my ideal world IDE would resolve these links and made them easier to maintain.
_EDIT: word order_
Since Paircast works with git, we can link each LOC to the point in the video where it was created. Take a look at the `git blame` and the Paircast links in the sidebar.
https://github.com/haxordx/paircast-demo-1/blame/main/main.j...
I really hate it when people do this. The commit message should be all about the why (the diff already tells me the what), getting rid of it means removing the only useful bit of info from the commit message.
Why not just use a "speech-to-text" software to add documentation?
Also, sometimes audio can let you more easily capture nuance/tone that you don't get in text alone. And ... some people just are good at talking through their thought process.
When I can, I try to keep some parallel /docs files with some relatively up to date tech notes close to the code. Jira/confluence/etc might also have info, but the docs that are connected in the same repo have a different level of usefulness for some things.
OneNote had (has?) a mode where you could click on sections of a meeting note and hear the audio from the time the text was written.
Extend that to an IDE and every time you found yourself saying “what were they thinking when they wrote this?” you could listen in on the conversation and find out.
Things I really liked:
1) the electron app records my voice and screen and then gets transcribed with some API in the back: as an English speaker with a thiccc accent this worked very well
2) git all the things: as you type and you record your screen, all changes are staged and time-stamped so you can quickly grep the result and find when you said or typed certain things. That is major useful for code-reviewing so you can go back during your pair session and immediately find things.
My only fear is that all this data is stored somewhere outside of my realm, and if it records personally identifiable data of some sorts from my screen, I never will feel like I will be able to make sure the recordings/transcripts are gone-gone.
Good job Ian!
Would it be possible to use an IDE, like VS Code, to replay git and video? The author's video could be a hovering head with video controls that are tied into git (repository contents being shown by the said IDE).
The comments here might seem demotivating but I too feel that video is not the best delivery mechanism for code - the IDE is. You have nicely wrapped Git with video timestamps. I feel that using video to show the code is poor UX.
[1] https://github.com/brainless/solvex/tree/develop
Edit: sentence structure in para 2.
Because the Paircast git commits include a timestamped link to the video, using something like gitlens in VS Code would allow you to click from code to video. https://github.com/eamodio/vscode-gitlens#autolink-settings
While I understand why others might like videos, I really hope they stop catching on so hard. Especially with a facecam.
One of the beauties of programming is that I can function with a bunch of fellow ugly nerds who don't make me show my ugly face just to get work done.
That seems better but putting effort into written communication is why I like it more than video anyways.
Personally when I do a recording I have constant mistakes. It would be nice if in editing, I could easily delete pieces based on the transcript, and it would automatically delete the corresponding part of the video. So I could just delete that part in the middle where I mistyped and had to spent 2 minutes debugging, instead of having to stop and start over.
I have tried the free public cast version. It works well. Now i want to delete that demo try cast. Delete buttons not responding.
Developer Console Output is below: Failed to load resource: the server responded with a status of 500 (Internal Server Error) production.min.js:1 Uncaught (in promise) CloudError: Endpoint (`deleteHighlight`) responded with an error (or the request failed). at Object.exec (https://app.paircast.io/min/production.min.js:1:1581269) at https://app.paircast.io/min/production.min.js:1:1580713 at new Promise (<anonymous>) at Object.toPromise (https://app.paircast.io/min/production.min.js:1:1580681) at Object.then (https://app.paircast.io/min/production.min.js:1:1580465)
Error Summary: (see `.responseInfo` for more details) ·-------------·----------------------------------------· | Protocol | http(s):// (jQuery) | Address | POST https://app.paircast.io/api/v1/highlight/delete | Exit | error | Status Code | 500 ·-------------·----------------------------------------·
Response Body: Internal Server Error
This could be helpful for code reviews imo regarding context transfer. I usually pick the easy stuff eg. syntax/more efficient code as opposed to the bigger actual context part depending on how big the review is/how familiar I am with that area.
The video would be distracting from the mental model I have built of how the calls stack and can get stale pretty quickly.
I hope you make traction with the new tutorial format.
documenting code - do not use video! Do you even document it while writing, that does not make sense because the video will be invalid and old in 2 hours
teaching -nope, just give us the working code
Pro-tip: don't record your demos on a 4k monitor setup or whatever this is. I just measured, and your IDE's font shows characters as 6 pixels high on my 1920x1080 monitor. Did you watch your recording?
There is a huge focus on text, which is why the full markdown transcript is included.