Re: Seeking feedback from speech users of Python

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 15 Dec 2007 16:48:48 -0500 (EST)

I just posted an update (December 15 release date) that automatically
inserts comments that indicate when a code block has just ended.  For
example, when converting from standard Python to PyBrace, a line might
look like the following:

}if

This means that a block that began with the "if" keyword has just
closed.  When converting such PyBrace code to standard Python, the
equivalent line would look like the following:

#if

Thus, one can convert to PyBrace and back, thereby generating comments
that make standard Python code more understandable with speech.

Jamal
On Sat, 15
Dec 2007, Jamal Mazrui wrote:

> Date: Sat, 15 Dec 2007 06:42:11 -0500 (EST)
> From: Jamal Mazrui <empower@xxxxxxxxx>
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: Seeking feedback from speech users of Python
>
> A few points I forgot to mention.
>
> The default IndentUnit setting of EdSharp is two spaces.  To change it to
> a tab character, press Alt+Shift+C for Configuration Options, Alt+I for
> IndentUnit, and enter \t as the value.
>
> If text is selected and you press Alt+LeftBracket for PyDent, or
> Alt+Shift+LeftBracket for PyBrace, the selected text is converted to the
> target coding style.  On the other hand, if no text is selected, EdSharp
> assumes you want to replace all text in the file being edited.  As a
> precaution, it creates a new editing window rather than replacing
> existing text.  The new window uses the same file name in its title
> except for the extension.  PyBrace code is given a .pyb extension and
> PyDent code is given (the normal) .py extension.
>
> One problem I have discovered with this approach is that an error
> message by the Python interpreter will correspond to the PyDent code
> that was run, but not necessarily the PyBrace code that was the original
> source, so one has to search for the offending code mentioned in the
> error message, knowing it is close to the line mentioned.  This argues
> for making PyBrace correspond line for line with PyDent, but that is
> more of a challenge that I have not yet tackled.
>
> To further explain the motivation for this experiment, I have observed
> that Python is both an excellent programming language and one that is
> inherently visual for speech users.  Speech communicates information in a
> serial manner, whereas the code structure in Python is conveyed by
> two-dimensional spatial organization that a sighted person readily
> understands.  I incorporated features in EdSharp (and TextPal before it)
> to help read and write indented code more efficiently with speech.  Those
> features are still available, and hopefully useful.  Despite them,
> however, I have still felt less in touch with Python code -- wondering if
> I was missing indentation when either EdSharp or JAWS was not set to
> verbalize indentation changes, and trying to avoid nested code blocks when
> programming so I did not have to track precisely how much indentation was
> required on any particular line.  Converting the same code to PyBrace
> format has made me feel more in touch with the code, and more likely to
> consider programming in Python.  As mentioned, this is still experimental,
> however -- feedback, suggestions, and contributions welcome.
>
> Jamal
> On Fri, 14 Dec 2007, Jamal Mazrui wrote:
>
> > Date: Fri, 14 Dec 2007 22:36:01 -0500 (EST)
> > From: Jamal Mazrui <empower@xxxxxxxxx>
> > Reply-To: programmingblind@xxxxxxxxxxxxx
> > To: programmingblind@xxxxxxxxxxxxx
> > Subject: Seeking feedback from speech users of Python
> >
> > I have included an experimental feature in EdSharp
> > http://www.EmpowermentZone.com/edsetup.exe
> >
> > In seeking a more efficient way of managing the indentation requirement, I
> > am trying a coding style called PyBrace, where the colon and indented
> > block are replaced by a set of curly braces surrounding the block.
> > Alt+Shift+LeftBracket (think of the brace character) turns either all or
> > selected text into this style of code, which makes it easy to understand
> > the structure with speech.
> >
> > The inverse command is called PyDent, Alt+LeftBracket, which converts from
> > PyBrace format to the equivalent indentation required by the Python
> > interpreter.
> >
> > PyBrace assumes that the opening brace will be at the end of the line of
> > text that starts the block, and the closing brace will be on a line by
> > itself.  Also, PyDent assumes that a single tab character is used for each
> > level of indentation -- though I intend to support other indentation
> > conventions as well if this approach seems productive.
> >
> > I have been able to convert to and from PyBrace and run a Python script
> > successfully (the Python fruit basket program).  If anyone else can try
> > this approach, and let me know your results as well as any other ideas for
> > improvement, that would be helpful.
> >
> > Jamal
> >
> > __________
> > View the list's information and change your settings at
> > //www.freelists.org/list/programmingblind
> >
>
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: