Margin Notes: Automatic code documentation with recorded examples from runtime
geoffreylitt.com
geoffreylitt.com
On the viewer side I've thought about building a Sourcegraph extension which would consume a standardized trace format and then display it in any editor, on Github, etc.
I mean doctest: https://docs.python.org/3/library/doctest.html
2. Serialize as/to doctests. Is there a good way to serialize Python objects as Python code?
3. Add doctests to callables' docstrings with AST
Mutation testing tools may have already implemented serialization to doctests but IDK about docstring modification.
... MOSES is an evolutionary algorithm that mutates and simplifies a combo tree until it has built a function with less error for the given input/output pairs.
Even for statically typed languages like Java, I find the existing tools lacking in helping me understand the code thoroughly. I mostly rely on the IDE to navigate code which I then mentally jot down the behavior of the code segment. Writing code this way is way too error-prone, and unfortunately testing isn't foolproof either.
It isn't until something breaks that we really begin to learn the nuances of the system...