Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   perl better than python for users with disabilities? (http://www.velocityreviews.com/forums/t901123-perl-better-than-python-for-users-with-disabilities.html)

Dan Jacobson 12-20-2006 04:11 PM

perl better than python for users with disabilities?
 
Can I feel even better about using perl vs. python, as apparently
python's dependence of formatting, indentation, etc. vs. perl's
"(){};" etc. makes writing python programs perhaps very device
dependent. Whereas perl can be written on a tiny tiny screen, and can
withstand all kinds of users with various disabilities, etc.?
Also perl is easier to squeeze into makefiles.


Martin P. Hellwig 12-20-2006 05:50 PM

Re: perl better than python for users with disabilities?
 
Dan Jacobson wrote:
> Can I feel even better about using perl vs. python, as apparently
> python's dependence of formatting, indentation, etc. vs. perl's
> "(){};" etc. makes writing python programs perhaps very device
> dependent. Whereas perl can be written on a tiny tiny screen, and can
> withstand all kinds of users with various disabilities, etc.?
> Also perl is easier to squeeze into makefiles.
>

Quite punny title though I assume you are really serious and mean people
with a physical disability, I won't comment any further on this subject
:-), if I already offended anyone, please excuse me, since I'm original
from Germany I'm not supposed to be funny.

--
mph

krakle@visto.com 12-20-2006 06:10 PM

Re: perl better than python for users with disabilities?
 


On Dec 20, 10:11 am, Dan Jacobson <jida...@jidanni.org> wrote:
> Whereas perl can be written on a tiny tiny screen, and can
> withstand all kinds of users with various disabilities, etc.?


Well... yes and no... While the handicapped users who are in a wheel
chair will find Perl easy to use the blind will struggle. From my past
experience posting here I think it's safe to say most retarts use
Perl... So the mentally challenged will have no problem using it
either... I mean, Tad uses it..


Steven D'Aprano 12-20-2006 10:03 PM

Re: perl better than python for users with disabilities?
 
On Thu, 21 Dec 2006 00:11:10 +0800, Dan Jacobson wrote:

> Can I feel even better about using perl vs. python, as apparently
> python's dependence of formatting, indentation, etc. vs. perl's
> "(){};" etc. makes writing python programs perhaps very device
> dependent.


I can't think of what sort of computer device you are thinking of that
can't handle indented text. Wait -- my old HP-48C programmable calculator
perhaps?

As for perl and () {} etc, I would have thought that for anyone with poor
eyesight, or using a tiny screen, they would be difficult to tell apart.

> Whereas perl can be written on a tiny tiny screen, and can
> withstand all kinds of users with various disabilities, etc.?


"Withstand all kinds of users"? I can't imagine what you mean by that.

> Also perl is easier to squeeze into makefiles.


Perhaps you are right. In eight years of writing Python code, I've never
once needed to squeeze Python into a makefile, so I don't know how hard it
will be.



--
Steven.


A. Sinan Unur 12-20-2006 11:50 PM

Re: perl better than python for users with disabilities?
 
Dan Jacobson <jidanni@jidanni.org> wrote in
news:87slfalf8h.fsf@jidanni.org:

> Can I feel even better about using perl vs. python


Initiating a Perl vs Python debate is the mark of a troll. Bye!

Sinan

Randal L. Schwartz 12-21-2006 01:11 AM

Re: perl better than python for users with disabilities?
 
>>>>> "A" == A Sinan Unur <1usa@llenroc.ude.invalid> writes:

A> Initiating a Perl vs Python debate is the mark of a troll. Bye!

And an obfuscated, indented troll at that. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

--
Posted via a free Usenet account from http://www.teranews.com


anno4000@radom.zrz.tu-berlin.de 12-21-2006 12:19 PM

Re: perl better than python for users with disabilities?
 
Randal L. Schwartz <merlyn@stonehenge.com> wrote in comp.lang.perl.misc:
> >>>>> "A" == A Sinan Unur <1usa@llenroc.ude.invalid> writes:

>
> A> Initiating a Perl vs Python debate is the mark of a troll. Bye!
>
> And an obfuscated, indented troll at that. :)


....armed with significant whitespace. Beware!

Anno

Veli-Pekka Tštilš 12-21-2006 01:07 PM

Re: Perl Vs Python: Blind Folks
 
Hi Dan,
I won't cross-post to a group I don't read, so this one goes only in
comp.lang.perl.misc.

Dan Jacobson wrote:
> apparently python's dependence of formatting, indentation, etc. vs.
> perl's "(){};" etc. makes writing python programs perhaps very device
> dependent.
> perl can be written on a tiny tiny screen, and can withstand all kinds
> of users with various disabilities, etc.?


Lemme address small screensize and input device constraints first. I've
tried writing Python on a series 60 celphone lacking a querty keyboard and
it is no fun. Getting all of the punctuation out is tedious, the dictionary
cannot auto-compmlete stuff smartly and the display is extremely small. That
being said maybe a case-insensitive language with lots of English would be
easier to write with such a setup. I'd go so far to say, based on an
intuitive notion, that neither Perl nor Python is very well optimized for
tiny screens or keyboards in which special chars are hard to enter, though
arguably Perl does have source filtering.

What kind of disabilities and rationales did you have in mind, in
particular? I suppose you're thinking of sight-impaired folks with the
indentation comment. Being legally blind and part of the blind-programming
list, I'd like to comment on that a little.

But let's shatter a popular myth first. AS with choosing an OS,
accessibility is a big consideration but once that's out of the way the same
factors affect blind folks that affect the sighted. Many actually like the
GUI for mostly the same reasons. And not all CLi apps are speech friendly,
listen to ls -l with Festival. As far as languages go, asking in a Perl NG
probably yields pro Perl answers. I'm a casual Perl coder but know Perl,
Python and Ruby programmers in the blind-programming list.

First of all, the range of disabilities and assistive technology (AT) being
used can be very diverse. Some people use magnification, meaning a smaller
viewport, less detail and slower reading speed. For me, that's 7x
magnification for comfortable reading (10 pt font 96 DPI at 1024x768 17
inches) and I can only see a few chars at once. My reading speed magnified
is roughly one fourth of what it is with speech.

Most screen readers primarily output stuff using highly intelligible,
synthetic speech. Generally the screen reader program driving the synth
tracks the keybord focus, reads stuff left to right and is very generic
having little notion of context and using generic punctuation names and so
on. This means some major difficulties in programming in any language. My
normal listening speed is roughly 330 words per min having used speech for 8
years or so on a daily basis.

Lastly, there's braille. Fixed-width, typically 40 8-dot chars on a line
which you read left to right using your fingers. It's often the easiest
medium for parsing nested expressions, be they math or programming, and is
good for homing in at specific bits. However, scrolling, getting the big
picture and unicode chars can be problematic. I do have a braille display
but don't use it as much as I should.

And to make things more complex people can generaly use any combination of
the above three output media. I myself am using a curious mix of
magnification and speech. I use speech with no punctuation to get the big
picture and home in at bits of an expression with magnification. I tend to
cursor left or right in textual units like words within an expression.

Regarding language issues, let's deal with indentation first. AS a
magnification user who uses an editor with auto-indentation, I find that
keeping stuff aligned as in Python is something I do in any
block--structured language anyway. My pseudo-code also uses that kind of
indentation. Indentation makes it easier to tell apart blocks of code even
without magnification, as you can see the big shift in the left margin with
relative ease. ON the other hand the magnified view port is very small. IT
is easy to leave something accidentally on the left or right side of the
screen and then miss it producing a flurry of mystical compilation errors.

As a speech user, indentation can be a real problem. Not something you
wouldn't get used to but I've noticed that some beginning sight-impaired
Python programmers appear to have more issues on average than the sighted
would. The problem is that white space has no natural spoken representation
and it is easy to lose the layout in a speech stream.

The leading Windos screen reader Jaws has some audible presentation for
indentation but the one I'm using, the Dolphin Supernova which is popular in
the UK, does not. Most other readers don't including basic stuff like
Apple's Voice Over, Microsoft Narrator, and I think, the Linux reader Orca.
Emacs Speak probably has the best speech support for programming languages
but comparatively few users have access to it, as Windows assistive
technology has several years of head start in features, app-specific support
and foreign language speech (Finnish in my case), among other things.

As I'm using a combo of speech and magnification I like the BSD/Allman style
personally in Perl and many other langs.

while(<>)
{ # Comment if any.
# do stuff
} # while

The reason is the small viewport in magnification. As the braces line up it
is quick to check, by merely cursoring up and down, that a block includes
both braces, for example. Using the K&R style Would require you to use end
to get at the end of the line to check the left brace. Also, I tend to
comment ends of blocks because I don't use punctuation in speech so the
right brace wouldn't be spoken otherwise. I use magnification to check most
operators. Actually, I think Ruby, having an explicit end, would be closest
to my preferences, which are largely due to what kind of AT I use and how.
That is:

while line = gets
# do stuff
end

About indentation and Braille, usually it is not a problem. Though screen
readers need to convert all text to fixed-width format as Braille is
inherently fixed-width by nature. Well, provided that the screen reader and
braille display have been configured correctly, spaces and alignment are
pretty esy to track. Again, though, stuff that's indented a lot requires you
to scroll to see the rest of the line. By the way, formats are white-space
sensitive and thus present the same basic problems as indented code.

Large part of the kind of issues people have with speech is that it is
produced rather mechanically. That is the star or asterisk, if you will, is
always said star here, no matter hether it means indirection,
multiplication, bold in e-mail, bullet character, a star or something else.
So Perl's special variables don't sound nice at all "dollar back slash", but
again there's the english module.

Regardless of language regular expressions can be very complex to parse with
speech. I need to usually home in at white-space surrounded bits and cursor
them character by character keeping track of parens, braces and what-ever in
my head. Comments and the X modifier as well as modules thatllet you use
more English-like expressions do help. Some sort of APi for
programmatically building up a regexp by calling English-sounding methods
would be great.

Another problematic construct is stuff that's read right to left such as
long list processing statements. I write loads of them and typically
separate them by whitespace so that I can read each piece left to right.
Still a syntax that's closer to piping in the shell would be my cup of tea.

I should also mention that when you do use speech, how the code reads out is
an issue affecting aesthetics and intelligibility. Most speech synths use
case changes, underscores and whitespace to break words but when the synth
resorts to spelling depends. For example, Dolphin Orpheus says lcfirst,
rindex, , substr, dbmclose and chown as words (some Python built-ins have
similar issues). They should be spelled e.g. , rIndex, , subStr, dbmClose
and chOwn to have the intended effect. I'm especially suffering from POSIX
names that are read as words e.g. S_IRWXG be damned, <smile>. Most object
oriented modules have English-sounding method names, though there are
exceptions.

These are not pure language issues but how the tools of the language work
with AT like screen readers affect matters, too. The control hierarchy,
relations, text, type and state should be programmatically accessible from
3rd party apps to make apps usable with speech and braille and make focus
tracking work with magnification. Python built-in docs aren't very
structured in terms of textually navigable units like HTML headings and
links, which screen readers use as navigation landmarks. Similarly any
language utilities currently written in TK are inaccessible, until Active
Accessibility support is added to TK itself. Unfortunately, the PPM utility
in Active State Perl is now graphical and TK-based. I gave plenty of
usability feedback but the worst issues can only be fixed in TK itself. If
it worked with my screen reader, I'd take the PPM GUI over the PPM CLI any
day. Though the PPM CLI is one of my favorite command-lien utilities, I like
its prompts as a speech user.

Another cconsideration are the GUis visually impaired people are producing.
They should be accessible to screen readers to be useful. TK is out as I
said. Fortunately Perl has Win32::GUI and Python WX Widgets both of which
are accessible, I think.

Wel, hope this gives you a detailed enough picture. I've written on
accessibility before, too. Links to Google:
Perl debugger with speech: http://tinyurl.com/sczrf
Python access issues: http://tinyurl.com/vmwkr

--
With kind regards Veli-Pekka Tštilš (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/



zentara 12-22-2006 12:53 PM

Re: Perl Vs Python: Blind Folks
 
On Thu, 21 Dec 2006 15:07:42 +0200, "Veli-Pekka Tštilš"
<vtatila@mail.student.oulu.fi> wrote:


>Another cconsideration are the GUis visually impaired people are producing.
>They should be accessible to screen readers to be useful. TK is out as I
>said. Fortunately Perl has Win32::GUI and Python WX Widgets both of which
>are accessible, I think.


You didn't mention Gtk2's ATK (Accessability ToolKit).

I havn't done anything with it myself, but it is described at
http://developer.gnome.org/projects/gap/

Perl's Gtk2 port contains accesability to the ATK library.


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

Veli-Pekka Tštilš 12-23-2006 12:58 PM

Re: Perl Vs Python: Blind Folks
 
zentara wrote:
> On Thu, 21 Dec 2006 15:07:42 +0200, "Veli-Pekka Tštilš"
> <vtatila@mail.student.oulu.fi> wrote:
>> Another cconsideration are the GUis visually impaired people are
>> producing. They should be accessible to screen readers to be useful.
>> TK is out as I said. Fortunately Perl has Win32::GUI and Python WX
>> Widgets both of which are accessible, I think.

> You didn't mention Gtk2's ATK (Accessability ToolKit).
> Perl's Gtk2 port contains accesability to the ATK library.

A good point, that's the choice you should use in any Unix-like OS. I'm a
Windows user because of various music apps and softsynths. I've found that
the WIndows GTK+ port is not accessible with the screen readers here so
that's why I didn't mention it. I should have either mentioned my Win32
background or taken a wider view. I wonder what's accessible in OS X using
Perl, by the way? GTK+ is X based and neither X nor classic is accessible to
VoiceOver. So can you write Cocoa apps in Perl?

Aditionally, only the title bars speak in GTK+ apps written in Cygwin. I'm
writing just such an app as an exercise in C and POSIX, and was disappointed
to notice that the accessibility is so poor I'll have to rely on Windows
magnification to use the app. Guess I'll do a rewrite with Perl and
Win32::GUI, isolating the GUI specifics.

--
With kind regards Veli-Pekka Tštilš (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/




All times are GMT. The time now is 07:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.