Hacker News new | ask | show | jobs
by saqibs 5136 days ago
This is certainly one of the harder aspects of programming blind - particularly tackling a large, unfamiliar, codebase. In the case of a new project, I build up a mental map of how the program works - and memorise the conceptual organisation. With an existing codebase go-to-definition is invaluable, and stepping through in a debugger is just as useful for a blind person as for anyone - you get to see the lines in the order of execution.

This does influence my personal coding style - I always have the entry point at the top, which makes use of meaningful named methods - so it looks like the table of contents of a book. Next come the second level methods - and so forth, until the small auxiliary methods are way at the bottom. This lets me read it top-to-bottom, like a story. Much of this is just good coding practice - but, for example, I find it really frustrating to read code where functions must be defined before they are used - this results in details first, outline last - which makes it hard to build up that mental model (remember, I'm listening to the code line by line - no spinning the mousewheel).

Finally, I'm going to use this comment to express my dislike for underlines (yes, I'm looking at you, Ruby). Every underline adds three syllables to my audio stream - whereas screen readers read cammalCaseCode as separate words.

Feel to ping me @SaqibS on Twitter.

3 comments

It seems unfortunate that you can't configure screen readers to say "_" as "under" or some such thing. Also, I think it would be very useful if punctuation was pronounced in a different voice or tone.
That sounds like an issue with the screen reader, surely? CamelCase is arguably somewhat less readable for the seeing than underscore_separated_words, as the underscore can be read practically as a space. Presumably, you'd need a syllable to distinguish between CamelCased and underscore_text, but I don't see why you can't have Python or Ruby style underscores as a convention?
You would have hated some of the projects I've worked on - spaghetti code, full of variables like hold_value or temp_num and function names like doThing and doThingNow. As a fully sighted person, I mostly had no idea of the overarching organization of the problem. If I were blind and faced with the same project, I'd probably quit and take on something easier, like juggling chainsaws or trying out for major league baseball.