While writing code we generate many creative ideas. We visualize our systems from different perspectives and weigh different options. Eventually, we make decisions about how our systems will evolve. Sometimes we make mistakes or learn more about what we are building and have to go back and revise our code.
Often, there is not a good place to write down our thoughts and ideas about this aspect of the development process. It can be difficult to learn from experienced developers because we don't get to see them make their decisions or hear the reasons why they made them. A less experienced developer can learn a great deal from a more experienced one if they can get inside the head of the more experienced developer and be walked through the evolution of their code.
Storyteller is an editor plugin that records all of the changes made during one or more programming sessions. It allows these changes to be played back and annotated. These 'playbacks' are stored in easily shareable web pages. This allows developers to reflect on what they have done, write down their thoughts, and draw pictures to tell the story of how their code has evolved.
Code comments are not always the best place to describe one's thoughts and ideas. After all, it doesn't make a lot of sense to have a code comment describing why someone changed the name of a variable from
These are evolutionary decisions that, if documented, can provide valuable learning experiences for others.
Some experts find code comments to be too verbose and annoying. Some newcomers complain that the lack of any meaningful comments is frustrating. The fact that there are different audiences for code comments makes it hard to find the right balance between what should be in them and what should be left out.
Storyteller allows code comments that are evolutionary in nature to be moved out of the code and stored separately from it. The extracted code comments are still directly linked to the code, however. Doing this allows there to be multiple sets of independent comments reaching different audiences.
These comments coexist together without interfering with each other. It will be up to the reader to decide which, if any comments, to display with the code.
In addition to moving the code comments out of the code, Storyteller was designed to allow two major differences between traditional code comments:
The output of the Storyteller tool is called a 'playback'. Here are a collection of playbacks in C++ and Clojure that I used for some of my computer science courses:
(this tool is not solely for educational purposes- it is for anyone who wants to show others how they thought about a problem while coding it).
Some notes about playback. You can use the pause/play button (
There is some documentation about viewing playbacks, creating playbacks, the Visual Studio Code editor, and using Storyteller as a version control system on the Storyteller: Docs website.
I am looking for people to contribute. Reach out to me if you are interested in helping build Storyteller!
I welcome any comments, suggestions, or questions. I look forward to having discussions about the ideas that this tool addresses.
Mark Mahoney firstname.lastname@example.org