3. If you make a GUI framework, use native controls. Screen readers aren't magical pieces of software that do their things using arcane spells, to read anything, they actually need to get the information to read. To do this, they use operating system APIs. When an application uses native controls, it exposes all the needed information through those APIs and a screen reader can get it easily. If an application has it's own GUI toolkit, it's own representation of controls that doesn't correspond to the OS notions of a control and draws on the screen directly, the screen reader doesn't know anything at all. This is the case with i.e. GTK on windows. For a long time, this was also the case with Flash, Java and QT. 4. screen reader users generally prefer words over symbols (controversial, some might disagree). Symbols are nice for sighted users because they take less space on the screen and are faster to read, but for screen reader users they are not. Lua's "if a less than 1 then print quote this is a test quote end" reads much more naturally than go's "if a less than 1 left brace fmt dot print l n left paren quote this is a test quote right paren right brace". There's a reason why blind programmers like lua and ruby. 5. Very hard to do right, but one of the most annoying thing for me is to deal with various messages in the console. If it's a web table, you can do two columns, timestamp and message, and a blind user will know it's a table and be able to navigate only in the second column. If it's console output, you can separate them visually, sighted users will just glance over the timestamps but blind users actually need to hear them before hearing the message. Imagine you need to listen through "two tousant eighteen colon eleven colon zero nine seven colon fourty five colon three comma 7520, /cmd/frontend/main.go:19: server started" before each message instead of just "server started". That's the sad reality for most blind people dealing with logs and messages that contain long paths etc. I don't know if that can even be done right without hiding the info alltogether, as it's not possible for a blind person to navigate a table in the console, but this is something that should be taken into consideration.
Ask HN: How should a programming language accommodate disabled programmers?
81–90 of 122 posts
Re: Ask HN: How should a programming language accommodate disabled programmers?
#82 for (int i; i
instead of: "for left paren int i semicolon i lessthan 10 semicolon
plusplus i right paren)"Re: Ask HN: How should a programming language accommodate disabled programmers?
#83Just want to note that in Haskell, whitespace syntax _is_ syntactic sugar for brackets etc. I don't recall that being the case for python. Interesting tidbit, some of the big names in the Haskell community have very idiosyncratic coding styles that use the bracket look.
Can you point out an example or two the bracket style that I could take a look at? Thanks.
Probably the simplest good example, gives rules for translating between styles
Re: Ask HN: How should a programming language accommodate disabled programmers?
#84One thing which I think might be useful for speaking code is to try to avoid needing a mental stack or going backwards as you go through code (at least for English speakers. Maybe other languages are different). For example consider reading aloud: x = some_function(something_else(y), z) You first need to keep in mind “x =”, then “some_function”, then think about what something_else(y) means, remember about some_funct…
It's much easier for me to interpret JavaScript or PHP method chaining. I find myself struggling when I can't use an ORM.
Re: Ask HN: How should a programming language accommodate disabled programmers?
#85Earlier quoted context omitted.
Are Unicode characters a problem for the tools you use? For example, some languages will let you use λ instead of lambda. Or when trying to define the logistic function, I sometimes find myself writing σ(x) = 1.0 / (1.0 * exp(-x)) Or the Julia language has ≈, which tests if two floating point numbers are approximately equal. Visually, this is a reasonable symbol, it's not like one of the weird functional programming…
My screen reader, Orca under Linux, read those as "sigma" and "almost equal to." So I suppose those work, though I'd have to hit Google to find out how to type them. :)
Re: Ask HN: How should a programming language accommodate disabled programmers?
#86Re: Ask HN: How should a programming language accommodate disabled programmers?
#87Earlier quoted context omitted.
Are Unicode characters a problem for the tools you use? For example, some languages will let you use λ instead of lambda. Or when trying to define the logistic function, I sometimes find myself writing σ(x) = 1.0 / (1.0 * exp(-x)) Or the Julia language has ≈, which tests if two floating point numbers are approximately equal. Visually, this is a reasonable symbol, it's not like one of the weird functional programming…
My screen reader, Orca under Linux, read those as "sigma" and "almost equal to." So I suppose those work, though I'd have to hit Google to find out how to type them. :)
Re: Ask HN: How should a programming language accommodate disabled programmers?
#88Considering that dyslexia is a reading disorder, I suppose that the programming language can be really important.
Re: Ask HN: How should a programming language accommodate disabled programmers?
#89Lisp: - Avoids the use of gratuituous special characters: (a b c) - use-dashes-in-symbol-names-instead-of-underline-so-its-easier-to-type (you can still use underlines or most any special character, but we like to keep it simple and easy). - has a simple prefix syntax, that makes it easier to read and understand complex expressions: (loop (print (read (eval))) So no risk of confusing special characters or syntax: the…
Well it seems that OP needn’t bother as this problem is already solved. You wrote (loop (print (eval (read)))). How does that go with a screen reader? Like: Bracket loop bracket print bracket eval bracket read bracket bracket bracket bracket? The key thing I think is balancing and shifting parens. (loop (print (eval)) (read)) Is quite hard to sound different from (loop (print (eval (read)))) And more crucially what a…
A screen reader need not literally read what’s on screen. It typically doesn’t with prose, where punctuation isn’t spoken, but affects timing and intonation, and abbreviations often are expanded (iOS speaks “Dr. John St.” as “Doctor John Street”, for example, but “St. John Dr.” as “Saint John dee-ar”. MacinTalk used to know that ‘Dr’ means ‘Drive’)
So, it need not do that here, and could say
“call read, eval it, print the result, and call loop on print’s output”
, using intonation or voice to indicate the difference between content read from the screen and text describing it.
Farfetched? Maybe, but take a look at what screen readers do with html.
A screen reader that knows lisp semantics could go even further, and replace loop by repeat forever or something like it.
Re: Ask HN: How should a programming language accommodate disabled programmers?
#90Just a random thought. Is there a programming language for dyslexics? Considering that dyslexia is a reading disorder, I suppose that the programming language can be really important.
I guess you could also require the edit distance between identifiers to be at least X, but I expect that to be wildly impopular, if only because its effect on identifiers in libraries.