May 9, 2008
-
Code comments are archaic
Comments in code today are so archaic. I just realized this when I thought about migrating this little sketch into some code I was writing. I could do it, and it wouldn’t be the first time I turned a simple diagram into either some overly verbose English description or some time-consuming ASCII art, like …
/*
Here’s a bad ASCII art diagram that poorly explains
the code below.
[ ][ ][ ]
[ ][ ][ ]
[ ][ ][ ] [ ][ ]
[ ][ ][ ][ ][ ][ ]
*/
Wouldn’t it be great if we could just annotate something with a tablet pen? The annotation could be stored as a compressed base64 string at the bottom of the same code file. It could be visually anchored to a marker within existing code or comments. Visual Studio could just collapse this block and render the inked annotation instead.Does anything like this already exist?

Comments (4)
not that I know of, but that would be cool
you could encode your sketches as a data URI, stick the data in your comment block, then write an emacs mode or whatever to display them inline with your code. DONE!
/me just realized thats pretty much exactly what you described :/
Yeah, but great minds think alike