RE: Looking At Python Programming

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 6 Jun 2011 11:07:48 -0400

This is not meant to sound egotistical. I like the JAWS indentation scheme that 
I created that comes with EdSharp, in which musical notes play at various 
indentation levels. If you have an ear for ascending and descending tones that 
play as you move up and down, it's very quick to hear the indentations, and if 
JAWS says something instead of playing the tones, you know that your 
indentation is incorrect. I like the idea of PyBrace, but I feel that it's very 
good to simply learn the Python syntax, so that you can avoid learning two 
different things.  Maybe it's just my learning style talking, though.



-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Littlefield, Tyler
Sent: Monday, June 06, 2011 10:53 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Looking At Python Programming

There are ides that help out with Python, but there is a difference in
formatting code, and python's indentation requirement for blocks.
On 6/5/2011 11:20 PM, Katherine Moss wrote:
> That's the one reason why I fell in love with the way Visual Studio does 
> things.  It just takes care of the stylistic issues for you.
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx 
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of David Tseng
> Sent: Monday, June 06, 2011 1:12 AM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: Looking At Python Programming
> Chris,
> Agreed with all of your points; however, I'm not as certain about the rec 
> against py braces for those who are venturing into programming for the first 
> or even second time.
> In general, I'm more inclined to advise new blind programmers to stay focused 
> on the actual task of programming (control flow, conditionals, logic, loops, 
> etc.) rather than stylistic issues.  In python, of course, indentation, a 
> traditional style concern, becomes a syntactic feature.  The beginner must 
> cope with this from the beginning complicating the learning process.  Seeing 
> the true hierarchical relationship of the code rather than a flat list of 
> serial operations takes time and experience.  This is of course the right way 
> to think of code as it leads one to actually discover how compilers and 
> interpreters are implemented.
> This isn't to say that blind programmers shouldn't abide by style rules --- 
> far from it as it's a basic requirement for working with sighted programmers, 
> results in better design/maintainability/clarity, etc.  It's just that style 
> (of which indentation is only one
> component) doesn't come as naturally for blind coders as it has a basis in 
> visual styling.  I'd guess that most blind coders I've reviewed have a very 
> loose grasp of style.  To be honest, I had a loose grip on style until I 
> started hacking on common codebases with sighted people.
> More branches for thought,
> David
> On 6/5/11, Q<q@xxxxxxxxxxxxxxxxxx>  wrote:
>> While PyBraces and similar is a generally good idea, I strongly
>> recommend actually getting familiar with the indentation scheme of Python.
>> As David wrote, this is generally quite simple with a screen reader.
>> It has many benefits:
>> . It allows you to code anywhere with Python installed, a far greater
>> subset of computers than that with both Python and PyBraces installed.
>> . When writing in languages which use braces for scope control, such
>> as C, Java, C++, whatever, indentation is still important. If you're
>> working on code that you're sharing with sighted people, the
>> expectation will be that you indent. Python gets you into this habit.
>> . Using indentation alone is generally more efficient for
>> communicating information to a blind person. Observe:
>> def do_something(arg1, arg2): {
>> assert ([isinstance(i, (int, long)) for i in arg1, arg2]) if arg1<
>> arg2: { #Take an action here }
>> else: {
>> #Do something else here
>> }
>> }
>> Compare to:
>> def do_something(arg1, arg2):
>> (one space.) assert ([isinstance(i, (int, long)) for i in arg1, arg2])
>> if arg1<  arg2:
>> (2 spaces.) #do something here
>> (one space.): else:
>> (two spaces.) #Something else
>> I placed in leading parentheses the text which is spoken by the screen
>> reader as you navigate from line to line. Note that if two lines are
>> on the same indentation, the indentation will not be announced. Which
>> makes it really trivial to actually spot where indentation changes.
>> Compare to braces, where you have to keep in your head not only code
>> scope, but what braces go with what, as well as brace matching heuristics.
>> When working in a braced language, I often use comments to indicate
>> what the closing brace signifies. For instance } //Endif, } //end
>> function do_something. This is simply something which is unnecessary
>> when reading an indented language.
>> In short, spend the slight extra time to do it right, and you'll reap
>> the benefits, just like most other things in life, and especially
>> programming.
>> I welcome your thoughts and feedback,
>> Q
>> On 6/5/2011 7:02 PM, David Tseng wrote:
>>> As another aside, it's not difficult to write a script (given
>>> whatever screen reader you're using) to announce the indentation of a
>>> given body of text.  Just override the say line (prev, current, next)
>>> and do the preprocessing to calculate the space/tabs indent before
>>> speaking the line's contents.
>>> With that said, not sure why no one's pointed out that Jaws comes
>>> with such a feature already:
>>> Jaws-v,
>>> type "indent"
>>> toggle indent to "indicate".
>>> Sucha feature exists in other screen readers as well.
>>> Finally, though I've not used it, EdSharp and something called the
>>> settings packager contains this so beloved but mysterious
>>> SoundsForStuff sound scheme.  Not sure why all the folks on list who
>>> use EdSharp haven't piped up about this, but there you go.
>>> On 6/5/11, Trouble<trouble1@xxxxxxxxxxxxxxx>   wrote:
>>>> If you have jaws 8 and up then you have the sound schemes feature.
>>>> There has to be a configuration file for the program being used for
>>>> it to show.
>>>> It will use any sound you give it for what ever action you want it
>>>> to take.
>>>> At 07:48 AM 6/5/2011, you wrote:
>>>>> I originally got it from someone on this list, I think it was James
>>>>> Hommes. No, it does not come with jaws by default. However, you can
>>>>> tell jaws to speak indentation if you have no other option.
>>>>> On 6/5/11, Oriol Gómez<ogomez.s92@xxxxxxxxx>   wrote:
>>>>>> Where is this sounds4stuff scheme? I don't htink ti comes with jaws.
>>>>>> On 6/5/11, Ken Perry<whistler@xxxxxxxxxxxxx>   wrote:
>>>>>>> You will learn to not make mistakes like this over time but as a
>>>>>>> starter you might want to use the ed sharp command to change your
>>>>>>> python from normal to braces then look at the output.  It will
>>>>>>> help you find the problem by failing to put braces where you
>>>>>>> think they should be.
>>>>>>> Ken
>>>>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of
>>>>>>> Harmony Neil
>>>>>>> Sent: Saturday, June 04, 2011 4:38 PM
>>>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>>>> Subject: Looking At Python Programming
>>>>>>> I can't remember if attachments are permitted on this list or
>>>>>>> not, so I apologize in advance. I've been looking at functions
>>>>>>> and stuff in the python tutorials and although I copied them
>>>>>>> character for character, as far as I know, I get an error saying
>>>>>>> that there is an unexpected indentation.
>>>>>>> Would
>>>>>>> anyone be able to let me know if you find any problems with the
>>>>>>> indentation?
>>>>>>> Thanks,
>>>>>>> Harmony.
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>> --
>>>>> Have a great day,
>>>>> Alex (msg sent from GMail website)
>>>>> mehgcap@xxxxxxxxx; __________ View
>>>>> the list's information and change your settings at
>>>> __________
>>>> View the list's information and change your settings at
>>> __________
>>> View the list's information and change your settings at
>> __________
>> View the list's information and change your settings at
> __________
> View the list's information and change your settings at 
> __________
> View the list's information and change your settings at


Take care,
my website:
my blog:
skype: st8amnd127
My programs don't have bugs; they're randomly added features!

View the list's information and change your settings at

This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.
View the list's information and change your settings at

Other related posts: