Hand to Mouth: Assistive Technology

Entries tagged as ‘C++’

C++, feng shui, and Dragon 10

May 1, 2009 · Leave a Comment

I posted a while back that I was trying to learn programming, C++ specifically. That went on hold for a while mostly for health reasons, but there were more mundane reasons as well. Specifically, to paraphrase the genie in Aladdin, things requiring phenomenal cosmic mental power are much harder in itty-bitty living space. Especially if you’re trying to juggle a giant book while teaching your Dragon new tricks.

There were a couple of problems with the book holder I bought. First of all, I didn’t have anywhere to put it in relation to my computer so that I could comfortably see the book and dictate into Notepad or the compiler at the same time; I’m more or less backed into a corner with furniture in inconvenient places. 2nd, and more importantly, it’s unreliable; I can’t turn a page without knocking the book out of the pegs, or having a handful of the pages come loose. I was juggling the book and looking from it to the screen, all the while creating commands one by one in the Command Browser for Dev C++ (I was using Dragon 9.5).

So, I had to ditch the book holder. Eventually, I also ditched the book — I replaced it with Brian Overland’s C++ without Fear, which, despite having an older publication date than Teach Yourself C++ in 21 Days, is a lot more user friendly. For once, I don’t feel like I’m being condescended to because I’m a beginner. In a conversational tone, he explains things to you the way that you have to explain them to the computer: in small, clear steps. He also defines things as he goes along, rather than you having to remember a bunch of things that might not appear until later. He also uses pseudocode — the steps of the code in English — a lot, so his examples are actually comprehensible. He also tells you WHY you need to do things, even if the answer is occasionally “because I said so” if you absolutely have to use something he hasn’t covered yet.

Please note: The compiler that comes with the book (RHIDE) is useless, because it puts you completely in a DOS like environment in which you can’t even access Dragon.

I hadn’t foreseen this, but another thing that’s making me actually look forward to studying is my upgrade to Dragon 10. Dragon 10 includes the ability to make command shortcuts. That is, once I’ve spelled out a line like #include <iostream>, all I have to say is “select line” and then “make that a command.” The command editor appears, and you name it something like “pound include stream”. The text of your command is already in the content box. If you make it application-specific, the application you’re currently running will automatically be selected.

I think I’m going to enjoy this. Somehow I don’t think hard means impossible, and while I should be irked at Overland’s metaphor on the 2nd page, somehow it perversely cheers me up in places:

“But a computer…is the ultimate idiot savant. It can never guess what you want…Therefore, you have to be careful to say what you mean.” That comparison is unfortunate and inaccurate, referencing autism/Rain Man in its entirety. I am not condoning the stereotype of NVLD or autism or savantism as total brainlessness, and humans are certainly not machines without judgment, but still — how I understand that last sentence! If it takes one to know one, the computer and I should get on just fine.

Categories: Disability · Technology
Tagged: , , , , ,

Teaching Dragon to speak C++

August 2, 2008 · Leave a Comment

 

I finally graduated! So, to bide my time while I’m waiting for a job, I have decided to teach myself C++. I bought Teach Yourself C++ in 21 Days and downloaded Dev C++ from Simtel. I know I can’t do much with it; I just want to know roughly how it works. Problem is, I thought, that even with the Maltron I wouldn’t have the stamina in my hand for it. Enter the Dragon…

 

I’m now very glad I sprang for the Preferred version of Dragon 9.5. This version allows you to create text macros, which you insert by saying the command you assigned to that text. I did not know that computer code could be pronounced, although I knew it was considered language. The trick to dictating code is to tweak the pronunciation into something Dragon can understand. You will have to create commands for each bit of code (can I call them words?) you want to use. For example: std::cout is pronounced, according to the book, as “STD see out.” So, if you want to be able to dictate that into your compiler:

 

  • Tools on Dragon menu

  • Add new command

  • Say “S. T. D. see out” as the command name (without quotes). Always treat individual letters like initials, and Dragon will have no problem with them.

  • Put the same thing as the description, if you want.

  • For the content, simply spell std::cout

  • Save command

  • Repeat for new “words”

 

Sometimes, instead of treating everything like an initial, you can invent another word as long as you train it. For example, when I created the command for int main() I actually added another vocabulary word called “int,” and pronounced it as such. That way, when I put in the command name I could use “int main” instead of “I. N. T. main.” Saying “int main” is much simpler.

 

I should add, also, that Dev C++ works very well with Dragon. I can dictate the code into there directly without having to use Word or something as a buffer. The only thing I can’t do is access the menus by natural language — that is, to execute or compile a code I have to say “press Control F9″ instead of just “execute” or “compile.” But that’s no big deal. You do also have to be careful how things get spaced when you dictate; every once in a while you have to insert the spaces yourself because I think Dragon treats it like something in Spell mode. But on the whole, it’s excellent. I’m looking forward to learning more as I go along — I will need the distraction!

 

Note: I have heard that there are projects being developed specifically for dictating code itself, without having to jigger with the pronunciation or making new commands, but I haven’t seen any. This looks like it will work well for the interim. If you have used any specifically code oriented speech recognition program, I’d love to hear about it.

Categories: Disability · Technology
Tagged: , , ,