8 ms·
Ask HN: Blind programmers, what can I do to make my code easier for you?
I've often wondered what things we have in style guides which make it difficult for visually impaired programmers. I would like to know how to make my code easier for you to read and write. Please help me to improve my code for you.
- ioquatix 8y agoIf you know any visually impaired programmers, please share this with them!
- gus_massa 8y agoThere has been a very interesting discussion, that is not 100% equal but where you can get comments about similar problems, including some from blind programmer. I hope they may be helpful. "Ask HN: How should a programming language accommodate disabled programmers?" https://news.ycombinator.com/item?id=18414562 https://news.ycombinator.com/item?id=18414562 (164 points | 8 days ago | 116 comments)
- ioquatix 8y agoThanks! That's really helpful :)
- pmarin 8y agoI am not blind but I have shitty sight and I wish web browsers do the same thing they are doing now with http sites an deny access to web pages with light grey text over nuclear white background.
- defanor 8y agoA global [dark] CSS theme helps to deal with that. Setting display brightness to minimum and increasing contrast can help to mitigate it, too.
- zzo38computer 8y agoI do not think you need to deny access (although I think that if the webpage doesn't need colours, it shouldn't set any at all, instead using the user's preferences), but (as defanor mentioned) you can apply CSS (although it doesn't have to be global; I generally apply user CSS individually instead, since each webpage needs a different CSS to be fixed; usually webpages that don't already have CSS don't need any CSS to fix them, I find, though)
- Cyphase 8y agoA visually impaired software engineer at Yelp recently published a blog post titled, "A Guide to Software Engineering for the Visually Impaired"[1]. He also gave talks at PyOhio[2] and North Bay Python[3]. [1] https://engineeringblog.yelp.com/2018/10/a-guide-to-software-engineering-for-the-visually-impaired.html https://engineeringblog.yelp.com/2018/10/a-guide-to-software... [2] https://www.youtube.com/watch?v=L3WpnG49XLc https://www.youtube.com/watch?v=L3WpnG49XLc [3] https://www.youtube.com/watch?v=FvlzaOrLBNw https://www.youtube.com/watch?v=FvlzaOrLBNw
- xvilka 8y agoSorry for highjacking your thread, but since the subject of reverse engineering is very close, writing it here. Radare2 project is famous to be blind users friendly, but we want the same thing for Cutter also [1]. If you know how to improve radare2 expierence too, don't hesitate to open an issue on our GitHub [2]. [1] https://github.com/radareorg/cutter/issues/889 https://github.com/radareorg/cutter/issues/889 [2] https://github.com/radare/radare2/issues https://github.com/radare/radare2/issues
- metildaa 8y agoTo pile on here on a (vaugely) related tangent, Common Voice (from Mozilla) needs our help to build a public speech corpus for training speech recognition software and Text to Speech: https://voice.mozilla.org/ https://voice.mozilla.org/ Mozilla is currently hard at work on DeepSpeech for transcription and Text to Speech, which could be huge for accessibility. I hope it continues to improve :P
- airfreak 8y agoI used a screen reader for a few years due to sight issues, these days I use a screen again with magnification. When you work without a screen you end up having to build up a mental model of the code, which you keep inside your head. When you navigate the code, you are doing it mentally, inside this cathedral you maintain in your mind. So given that, the main challenge for me was code navigation. I used Visual Studio at the time and it allowed me to jump to method definitions, call references, jump to the start/end of a method etc. So the worst thing was long methods as 1) I had no efficient way of navigating them except to read each line 2) it was hard to keep track of all the things the method did. Breaking up code into smaller pieces with good naming of each method helped speed up my understanding and navigation of the code a lot. It also simplified the mental model in my mind.
- blumomo 8y agoAs a person who can visually see, I want to emphasize that these goals: short methods (max 40 LOCs) and speaking names for all code entities are equally important to me. I want to spend as few time as possible reading the code. I want to spend most time on modifying and transforming the code. I do so by building up a mental model which I can change freely before typing the changes down. Sometimes it helps to write down the ideas to see how they "look like", however everything you say applies equally well to me as a non-blind programmer. Another important trait of easy to read code is the rule of "Big picture" first. I.e. if you have a `main()` method you will find it first in my files, only then followed by sub methods which are called by main(). Same holds for types: first comes the class and then it's followed by any type which might be required for a class attribute. So, when opening a file you immediately get the big picture and depending on the granularity you want to build for your mental model you can continue reading by scrolling down. When the model is good enough, you can skip the rest of the file. I find this pattern to the contrary of how others design their files. There are people who list all details and sub methods first before telling me only further down the road how these details are put together. This forces me to read a lot of code to build a blown up mental model which might not be necessary for the current task at hand.
- loup-vaillant 8y ago
- nagisa 8y agoOne very specific thing I remember from discussions I had with a blind programmer was to use of multi-line comments (/* /) in favour of line-comments (//), especially for comments that do span multiple lines. That helps a lot because with a screen reader “slash star <comment text> star slash” is significantly more listenable to when compared to “slash slash <one line> slash slash <another line> slash slash <third line>…” Surprisingly this is the only thing I cannot seem to find around my IRC logs… Digging through the logs other things that were called out to make comprehension harder for blind people are: * Unicode identifiers; * Boilerplate you cannot easily skip past without losing context (common in e.g. Java); * Typos (esp. if done on purpose, inconsistently); All this comes from their preferred interface being a screen reader which, I believe, is true for most blind programmers.
- V-2 8y agoWho does inconsistent typos on purpose? And what's the purpose?
- deanmen 8y agoSome people use the archaic spelling "shew" but only the senses "to prove or demonstrate". Or again in mathematics "rng" to mean a ring that does not necessarily have an identity. Or "iff" to mean "if and only if". These would look like inconsistent typos to nonmathematicians. Or "referer" in HTTP because that's what the standard uses. Or "creat" when discussing the UNIX system call or a function with the same purpose on another platform.
- tonyarkles 8y agoI’ve also worked on codebases where the first developer misspelled a function’s name and everyone else just kept using it instead of fixing it. When I see stuff like that, I admit that I judge them probably harsher than they deserve. Sloppy!
- crehn 8y agohttps://blogs.msdn.microsoft.com/oldnewthing/20080519-00/?p=22273 https://blogs.msdn.microsoft.com/oldnewthing/20080519-00/?p=...
- Sjenk 8y agoMaybe this helps you giving you some insight: https://medium.freecodecamp.org/looking-back-to-what-started-it-all-731ef5424aec https://medium.freecodecamp.org/looking-back-to-what-started... also fun to listen. This is his screenreader: https://soundcloud.com/freecodecamp/zersiaxs-screen-reader https://soundcloud.com/freecodecamp/zersiaxs-screen-reader
- CJefferson 8y agoI'm not blind, but I have a blind PhD student. One useful thing seems to be using an auto code formatter and requiring the code is always autoformatted. Manually ensuring indentation is right is very awkward, just running clang-format, or whatever, is simple.
- sanderjd 8y agoI think this is my favorite trend in programming languages. It seemed controversial when Go shipped with a canonical auto-formatter, but now I consider it table stakes.
- 3pt14159 8y agoThis thread touched off an idea for a journalism piece that I think could work in something like The Atlantic. I bounced it off of my new writing partner[0] and she's interested in collaborating on it. If you're in software and you know a blind person that's working on something difficult, high impact, or otherwise noteworthy please reach out to me. It would be great to chat with them. The more that society appreciates the blind and understands their day-to-day the better it will be accommodated. [0] She's the former Sr Editor of The Walrus (essentially Canada's The New Yorker), so she's quite good.
- OldHand2018 8y agoIf you're using a smart phone, and it works, you're using code blind people wrote. I worked with many very excellent software engineers back in my days of writing network infrastructure code. Some just happened to be blind. Code is plain text, and development environments can be navigated with keyboards. If I were to suggest that a blind developer needed my help, I would have something thrown at me. Luckily, the aim is not so good.
- Jeremy1026 8y agoMight be worth checking out https://nfb.org https://nfb.org, they have a decently large software team made of primarily of visual impaired engineers.
- deleted 8y ago[deleted]
- smnscu 8y agoGopherCon 2018: Julia Ferraioli - Writing Accessible Go https://www.youtube.com/watch?v=cVaDY0ChvOQ https://www.youtube.com/watch?v=cVaDY0ChvOQ
- DoctorOetker 8y agoI often wonder how blind people deal with PDF's in general, and scientific articles (sometimes scanned, or pixel rendered) in specific? Or are they effectively locked out from reading scientific papers?
- OldHand2018 8y agoAsk for the tex file.
- DoctorOetker 8y agoof course not every paper has an associated tex file, ... some of them were supposedly even written before Donald Knuth was born...
- tarboreus 8y agoI think, as many seem to be picking up, that tooling is critical for blind programmers and is secondary to how the language is designed. No matter how the language is represented in text, it can be made accessible with the right tooling. Often, however, this doesn't exist. This is why Python is quite polarizing for blind programmers, some love its simplicity and readability and others find the whitespace trips them up. But I think this is a function of what tools blind programmers land on to use Python...and probably also how much residual vision the programmer has. Remember that only 10% or so of blind people are totally blind.
- mohancy 8y agoI think the coding is never easier for all. One of the most dangerous things I’ve seen happen to people who are just starting to code is being told that it’s easy. But when you done any task and project goal day by day you sharp your expertise.
- HenryTheHorse 8y agoCan I just say, kudos for being considerate, compassionate and inclusive?