I’ve heard it said many times: “I’m a developer. I type code. Why do I need a Tablet PC or even ink?”
Sure, few developer tools support ink directly, but what if they did?
How might you debug an application if you could sketch out and archive the intermediate state of a program within your source code? No more ASCII diagrams to fiddle with. And what if you could capture a screenshot, mark it up with ink and embed it in your source code to archive a particular state of the program? Or maybe take a screenshot of a properties dialog and archive it as well?
These are a few of the possible uses of enhanced ink comments that I’ve been exploring.
Here’s a screenshot that shows enhanced ink comments in Visual Studio 2003.
It’s fairly straightforward. A tool window hosts the ink. Actually the toolwindow can hold more than just ink. You can insert screenshots, type freeform text, highlight items, draw simple diagrams, and more. Minimmaly, macros within the IDE synchronize comment markers within your code with the actual enhanced ink comments. (I call these “xnk” comments. Pronounced like “zinc.”)
When you create a new xnk comment, a marker similar to:
// <xnk id=”1″/>
is placed in the source code. In this example, the enhanced comment has an ID of “1” and is placed in a separate file (think resource file). One comment file exists per source code file that contains ink. In this way, the ink doesn’t get in the way of the source code. I have experimented with embedding base64 encoded versions of the ink and pictures and so forth in the source code, but the downside here is that the source files can get huge. In order to make this approach practical, source code editors and the like need to be able to better hide and ignore these data blocks when desired.
OK. You’re probably wondering how useful this stuff is outside of Visual Studio? What if you want to use another IDE? Well, the basic idea is fairly portable within Windows. (In fact, you don’t really need a Tablet PC. It’ll work on a regular Windows XP system too.)
Here’s a similar version of the tool window implemented in the Eclipse IDE–a development environment written for Java in Java that another developer is working on. Yes, Java. (Dont’ forget that Java backer IBM has a Tablet PC now. 🙂 )
An implementation using a standalone Xnk viewer also makes a similar tool possible for other development environments. I posted a demo of this a few weeks back–albeit it was shown using Visual Studio. Think Emacs or SlickEdit. Haven’t done it, but they should work too.
Now there are other ways of using ink in a development environment. One approach is to use ink as an overlay within the source code block like this:
Yes, this ink was actually drawn from within the Visual Studio editor. Turns out a feature like this involves some tricky problems (read bugs) that I have yet to overcome, but wouldn’t this be great to be able to explain source code in a classroom or conference session by marking it up at will?
There are a couple other ink-and-code efforts that I’ve seen on the Inkernet too. I’ll pull together a listing of them.
Yeah, I know I need a video or better yet a download, but first things first. I’d also like to write a more formal article that lists out some of the various ways I’ve been experimenting with ink in a development environment.