57 F
Los Angeles
Sunday, November 17, 2024

Trump Lawyer Resigns One Day Before Trial To Begin

Joseph Tacopina has filed with the courts that he will not represent Donald J. Trump. The E. Jean Carroll civil case is schedule to begin Tuesday January 16,...

Judge Lewis A. Kaplan Issues Order RE Postponement

On May 9, 2023, a jury found Donald J. Trump liable for sexual assault and defamation. The jury awarded Ms. Carroll $5 million in damages. Seven months ago,...

ASUS Announces 2023 Vivobook Classic Series

On April 7, 2023, ASUS introduced five new models in the 2023 Vivobook Classic series of laptops. The top laptops in the series use the 13th Gen Intel® Core™...
HardwareTablet PCEditing source code on a Tablet

Editing source code on a Tablet

I’ve been paying a lot of attention to how I might be able to edit source code while in Tablet mode. Why do I want to do this? Because many times, particularly when I’m debugging, I’m really not doing that much typing and so it seems that using a pen probably should work OK. And I like the idea of being able to debug while waiting for my tires to be changed or standing in an airport line or lounging on the couch or clandestinely in the middle of a meeting–all of which I’ve done.

The catch is that the user experience isn’t quite there. The Visual Studio editor has lots of terrific mouse-oriented capabilities, but the pen is just different enough that there are a few tweaks I’d like to see, which could make editing/debugging on a Tablet PC a must-have tool.

First, I “find” things a lot. I mean, I use search for text and jump back and forth between the occurrences of tokens and their definitions. There are UI features to navigate around, but I’d like something a little more direct. I simply want to be able to select a variable and then search. How the search is invoked is the key. One simple approach would be to automatically place the first 40 or so characters of selected text automatically into the Find edit field on the toolbar. Then with a new button next to it, I could tap on the button and go to the next occurrence of that string. This wouldn’t be too hard to do, but I think there are some other better approaches. I’d like to see a small icon pop up above selected text over which I could hover to access a popup menu. No clicking. Just hover. From that menu (and let’s imagine a large menu) I could select, let’s say Find or Copy, or maybe hover on one item to pop-up a submenu. I’ve never been much of a fan of pie menus, but I see where this might just be ideal here. A normally translucent floating toolbar may be a better choice since it would look more like standard UI elements, but the idea is similar. No matter. The goal is to provide direct and local access to common operations, such as finding text.

Another “tweak” that I’d like to see is on the recognizer side–in the TIP. I’d like to be able to reliably write program variable names. Right now it doesn’t work well. There are a couple culprits. One is that variable names can have abbreviations. Another is that they often have concatenated words with specific capitalization. What I’d like to see is a “source code” context mode added to the recognizer that applies a couple heuristics to improve recognition of such things as variable names. Here’s one approach: Let’s say as long as you write out all variable names as non-abbreviated words with the beginning of each word capitalized, the recognizer can use the capitalization to segment the words and recognize them better, rather than relying upon spaces. So a function name such as DoEverythingFunction would be recognized at a word level as “Do” “Everything” and “Function,” but the recognizer would also allow the concatenation of the three words because of the capitalization of the “D,” “E,” and “F.” This doesn’t cover all the odd words and spellings that may be necessary in coding, therefore, another feature would need to be the ability to add custom words to the dictionary trivially–I’m guessing from the TIP. I don’t know if the TIP recognizer would need to have feedback from the editor as to whether the current editing position is expecting a variable, keyword, or punctuation. I can guess it would help, but I imagine it’s a bit of work to implement and I wonder if other recognizer mods would be enough.

Here are a couple other recognizer tweaks (that apply to C#/C++):

* Improve recognition for comment delimiters: //, /* and */
* Allow punctuation (such as periods and arrows) within variable names or parenthesis up against function names or keywords.

There is lots more that one could do with ink and source code–some of which I’ve blogged about before–but tweaking the Visual Studio UI for pen use and adding a source code context to the recognizer would go a long way.

I hope the Visual Studio team is experimenting with Tablets. I can see where they’ve adjusted the UI quite a bit over the years so that the mouse is a terrific tool to use while editing and debugging–I hope they can do the same with the pen.

Loren
Lorenhttp://www.lorenheiny.com
Loren Heiny (1961 - 2010) was a software developer and author of several computer language textbooks. He graduated from Arizona State University in computer science. His first love was robotics.

Latest news

Related news

  1. You know just a thought on that “Find” problem. What you’re asking for is a tablet version of the “Ctrl-F3” system (where you double click to highlight a single word and then hit Ctrl-F3 find the next instance of that word). So all you should have to do is put the “Find next word” icon in your menu bar, highlight a word and then hit that button. I think that should work for that “tweak” problem.
    -Lewey