Title: Miscellaneous Techniques for Programming by Voice
1Miscellaneous Techniques for Programming by Voice
- Alain Désilets
- Institute for Information Technology
- National Research Council of Canada
- Canada
- alain.desilets _at_iit.nrc.ca
2Miscellaneous techniques
- Techniques discussed
- Breadcrumbs
- Navigation by line number
- Continuous scrolling
3Breadcrumbs
- Similar to Back/Forward buttons in a browser
- Certain commands automatically drop breadcrumbs
- Can use commands to move forward/backward through
the trail of breadcrumbs
4Breadcrumbs Example
For ( )
Test.cpp
breadcrumb inserted here
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
search forward for get cited by
5Breadcrumbs Example
For ( )
For ( )
Test.cpp
other crumb here
DocList DocumentgetCitedBy(mode
aMode) char temp256 fstream blank
hotList if( children NULL ) // call get
URL if( !getDocumentsCitedBy(hotList,
identifier) ) cout ltlt "CITEDBY " ltlt
identifier ltlt
" (primitive error)"
find again
6Breadcrumbs Example
For ( )
For ( )
Test.cpp
aDocument (biblioDocList)biblioIndex mapUsing
(biblioIndex, aDocument-gtgetCitedBy(STORE))
back 2 crumbs
7Breadcrumbs Example
For ( )
For ( )
Test.cpp
Popped back to original position
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
next crumb
8Breadcrumbs Example
For ( )
For ( )
Test.cpp
Moved forward again
DocList DocumentgetCitedBy(mode
aMode) char temp256 fstream blank
hotList if( children NULL ) // call get
URL if( !getDocumentsCitedBy(hotList,
identifier) ) cout ltlt "CITEDBY " ltlt
identifier ltlt
" (primitive error)"
9Navigate by line number
- Kudos to Jonathan Epstein
- Identify a target position by giving a line
number and a particular landmark on that line - Landmark can be
- punctuation mark
- symbol
- character
- etc...
10Navigate by line number Example
For ( )
Test.cpp
132 DocList DocumentgetCitedBy(mode
aMode) 133 134 char temp256 135 fstream
blank hotList 136 if ( children NULL
) 137 138 // call get URL 139 if(
!getDocumentsCitedBy(hotList, identifier) )
140 140 141 142 cout ltlt "CITEDBY " ltlt
identifier ltlt 143
" (primitive error)"
go to paren on 36
11Navigate by line number Example
For ( )
Test.cpp
breadcrumb here
132 DocList DocumentgetCitedBy(mode
aMode) 133 134 char temp256 135 fstream
blank hotList 136 if ( children NULL
) 137 138 // call get URL 139 if(
!getDocumentsCitedBy(hotList, identifier) )
140 140 141 142 cout ltlt "CITEDBY " ltlt
identifier ltlt 143
" (primitive error)"
move cursor here
12Continuous scrolling
- Kudos to Jonathan Epstein
- Similar to Dragon Move left/right/up/down macro
- Tell cursor to move in a certain way
- Cursor keeps scrolling until you ask it to stop
- Can change direction and/or speed of movement
- But, cursor may move by more than one line or
character at a time
13Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
keep searching for a vector
14Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
move here...
15Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docIn
dex) if( left ! NULL ) aVectorleft-gtlistI
ndexesInOrder() retVector-gtadd(aVector)
here 1 sec later ...
16Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docIn
dex) if( left ! NULL ) aVectorleft-gtlistI
ndexesInOrder() retVector-gtadd(aVector)
here 1 sec later ...
faster
17Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
here 1/2 sec later ...
stop
18Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
after a some time
back
19Continuous scrolling Example
For ( )
Test.cpp
Vector aVector Vector retVector new
Vector() if( right ! NULL ) aVector
right-gtlistIndexesInOrder() retVector-gtadd(aVec
tor) delete aVector retVector-gtadd(docInd
ex) if( left ! NULL ) aVectorleft-gtlistIn
dexesInOrder() retVector-gtadd(aVector)
here 1/2 sec later etc...
20Continuous scrolling
- Similar functionalities for
- paging up/down
- moving up/down one block of code at a time
- moving up/down one function/class at a time
- looping through open files
- etc...