9 ms·
Sure, there are many (excellent) AST based editors. However an AST editor based on a keyboard, and requires you to learn to type at 160 WPM, won't help most tab
by nailer 11y ago
Sure, there are many (excellent) AST based editors. However an AST editor based on a keyboard, and requires you to learn to type at 160 WPM, won't help most tablets be good code creation devices.
Data structures are shapes. A shape is better drawn than described in text.
- TeMPOraL 11y agoMy point is - there are AST-based editors and languages (e.g. Emacs with Paredit and Common Lisp) and you can see that even in that mode of "thinking" about code, you can't beat the speed, efficiency and flexibility of the keyboard. > Data structures are shapes. A shape is better drawn than described in text. Draw me a linked list. Tell me how much faster it is than typing: (list 1 2 (foobar) (make-hash-table) (list "a" "b" "c") 6) Even on a visual keyboard on a tablet, it's faster to type than to draw data structures. A flat sheet of glass maybe gives us the ability to get the (x, y) coordinates of a touched point easier and with more precision, but it sacrifices many other important aspects - like tactile feedback and the ability to feel shapes. With physical keyboard, you're employing more of the features your body and mind has, and that's why it's faster than a touchscreen. Unless you can find a completely different way of designing UX, then a tablet won't be a suitable device for creation. None of the currently existing solutions come close to beating a physical keyboard and a mouse.
- nailer 11y ago> Draw me a linked list I don't normally use linked lists, but here's an array: "list joe (subtle gesture) mary (subtle gesture) dave end If I wanted to delete dave from the list I could grab it and slide it away or say "list delete last". > Tell me how much faster it is than typing Everyone in the room I'm in now can talk at 200 words per minute and use their hands. Very few of them could type that fast.
- TeMPOraL 11y ago> "list joe (subtle gesture) mary (subtle gesture) dave end How will you go about drawing "joe" and "mary"? Is it faster than typing? Note that you can't always select stuff from dropdowns - you often have to create new symbols and values. > Everyone in the room I'm in now can naturally talk at 200 words per minute. How fast they can track back and correct a mistake made three words before? Or take the last sentence and make it a subnode of the one before that? Speech is not flexible enough for the task unless you go full AI and have software that understands what you mean.
- nailer 11y ago>> You could easily build an AST with gestures and speech > How will you go about drawing "joe" and "mary"? I'll just say it, it's easier. As I said at the top of the thread, gestures and speech. > How fast they can track back and correct a mistake made three words before? I gave an example of opening an existing structure and modifying it in the comment you're replying to. > Or take the last sentence and make it a subnode of the one before that? Like in a DOM? Easily: grab it and move it, just like you do it in DevTools today, except with your hands rather than a mouse.
- TeMPOraL 11y ago> I gave an example of opening an existing structure and modifying it in the comment you're replying to. Sorry, I misunderstood what you meant by "subtle gesture" there. Anyway, in the original comment you said: > Data structures are shapes. A shape is better drawn than described in text. I'll grant you that speaking + gestures may not be a bad way of entering and manipulating small data structures and preforming simple operations. But until we have a technology that can recognize speech and gestures reliably and accurately (and tablets with OSes that don't lag and hang up for half a second at random), physical keyboards will still be much faster and much less annoying. But I still doubt you could extend that to more complex editing and navigating tasks. Take a brief look at the things you can do in Paredit: http://pub.gajendra.net/src/paredit-refcard.pdf http://pub.gajendra.net/src/paredit-refcard.pdf Consider the last three or four subsections and ask yourself, how to solve them with touch, gestures and speech. Are you going to drag some kind of symbolic representation of "tree node" to move a bunch elements into a sublevel? How about splitting a node into two at a particular point? Joining them together? Repeating this (or a more complex transformation) action 20 times in a row (that's what a decent editor has keyboard macros for)? Searching in code for a particular substring? Sure, it can be done with the modes of input you're advocating, but I doubt it can be done in an efficient way that would still resemble normal speech and interaction. There are stories on the Internet of blind programmers using Emacs who can achieve comparable speed to sighted ones. This usually involves using voice pitch and style as a modifier, and also using short sounds for more complex operations. Like "ugh" for "function" and "barph" for "public class", etc. So yeah, with enough trickery it can be done. But the question is - unless you can't use the screen and the keyboard, why do it? > Like in a DOM? Easily: grab it and move it, just like you do it in DevTools today, except with your hands rather than a mouse. DevTools are a bad example for this task. Using keyboard is much faster and more convenient than mouse. C.f. Paredit.