61.5 F
Los Angeles
Sunday, February 5, 2023

Apple March 8, 2022 Event

Apple announced several products during their March 8, 2022, event. Studio Display Mac Studio iPad air iPhone SE iPhone 13 and 13 Pro color addition Some of the products will...

Eastman files motion for exculpatory information and continuance

In response to the January 6 Select Committee Brief to Eastman Privilege Assertions, Eastman has filed a new motion with the court. A request for the court to require...

February 2022 Employment Report

U.S. Bureau of Labor Statistics reported today that total nonfarm payroll employment rose by 678,000. The unemployment rate edged down to 3.8 percent The employment number exceeded forecasts The...

Enhanced comments for developers

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.

VS2003EnhancedComments.gif

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. 🙂 )

EclipseInkScreenshot.gif

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:

VSInkOverlay.gif

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.

  1. Does it work in Visual Studio 2005?

    This is pretty cool. I’ve been using VS2005 on my Tablet now, and I’m still waiting for an ink-enabled IDE that lets me use gestures/shortcuts/symbols for language keywords. That would make my life so much easier.

  2. I’ve been working on a Visual Studio 2005 version too, however, VS2005 is still in beta and there are some bugs that are getting in the way. I imagine in the coming months these will be worked out and I’ll have a 2005 version running.

    In terms of keyword programming via gestures, I haven’t gotten that far yet. I agree that accessing features faster when using the stylus can make all the difference. Good ideas are sure to be lurking here.

  3. Rob, thanks.

    Next up I want to get this working with ASP and HTML pages. It would be an interesting way to capture and archive the states of the UI along with the source.

  4. Casey, code reviews could be a lot more interesting with ink.

    Michael, Yeah, programming languages designed around “tap, select, drag and drop” are much better suited to the stylus than text-oriented languages. Looks like Gamemaker would be a great candidate for some additional Tablet enabling.

Related Stories