Ask HN: Programming and dyslexia

41 points by erikbye ↗ HN
Any dyslectic programmers here? Is it an issue for you in your daily programming? Did you find learning techniques that helped when you were still teaching yourself?

Fonts, colors, screen readers?

I am currently teaching a teenager, it is obvious he understands principles fast and has great memory retention, but syntax is a bit of a problem. We obviously use helpful editors and IDEs in this regard, but it is still an issue.

36 comments

[ 3.3 ms ] story [ 88.9 ms ] thread
I use Tab completion alot. I do mostly mathematical programming, I can keep track of horrible extremely short namespaces easily and then use find and replace feature to make everything nice. Even though I have no real concept for it, I just do it to make the code more similar to my colleagues.

Every training I had to overcome my dyslexia was absolutely useless. Spellcheck is very important. Fonts and colors don't matter at all. Just seeing my own work after I forgot about it, actually makes me see my mistakes. This can take years, my memory is insane for my own work.

You can't see mistakes, since you basically have an internal autocompletion that doesn't allow you to see mistakes or missing words. Checking the code of my coworkers is surprisingly different, I can find their mistakes quite easily.

It is much more important to have goal and motivation. Don't worry about those little details, like floating letters and missing words.

> You can't see mistakes, since you basically have an internal autocompletion that doesn't allow you to see mistakes or missing words. Checking the code of my coworkers is surprisingly different, I can find their mistakes quite easily.

Sometimes I'll write something out and reread it several times fully aware that I tend to miss words or misspell things, but in the moments after I've wrote something I'll rarely find any mistakes. However, 30 minutes later after I've sent the email or Slack message I'll reread what I wrote and it's a completely different story. For some reason only then will my brain decide to actually read what was written, but by then it's too late.

I had no idea this was a dyslexic thing. I was diagnosed a while ago and while I know it effects my reading ability I didn't know proofreading specifically was an issue for us.

I don't believe I have dyslexia, but this happens to me.

My trick is that when I'm doing my final proofreading, I usually adjust the size of the window to reflow the text.

I am dyslectic and have been programming for over 20 years, largely programming itself doesn't seem to trigger for me, as I am creating, and I'm not working in sentences, but in smaller logical statements that doesn't often require the same processing as reading text does, I will admit that I can very easily screen up a variable name, and if I've read a variable name elsewhere and intend on referencing it, that can be tricky. But as the Scantis said, auto completion has been a boon, as it basically acts as a safe guard against these issue.

I think it might be helpful if you could say specifically what are they having issues with. what is triggering things and where.

As for fonts/colors/etc.. I always use mono spaced fonts, and ones that make clear distinctions between all characters (0/O) (I/l) etc...

I use dark themes but I don't think that helps with the issue, and is just a personal preference. I can't imagine using a screen reader and it not being horrible, code is far to many characters with specific meaning, for a reader to read them out would be minding numbing.

My brother is a dyslexic programmer and I had a coworker who was also for several years.

They didn't have much trouble with code, but reading specs was a pain.

I learned shorter sentences and more whitespace between them helped.

And, of course, brevity.

I am really bad with transposing numbers. I'll often even have trouble correctly reading a 2FA code.

I always have to triple check numbers, I often try grouping them in a few different ways, e.g. 327895 I would read as 32-78-95 and then again as 327-895 just to be sure I have not transposed any digits.

Other than this sort of discipline I have not found a solution.

I do something similar to you. I have particular difficulty with long numbers with no spaces, or multiple repeating digits. I'm especially careful with account numbers when doing electronic banking. On computer, I prefer copy 'n paste and then re-check.
A not tiny font size can help. Supposedly dark themes help, but I’ve never found this true myself. Honestly, I don’t think there’s any real accommodation needed here.

As others have mentioned, it’s all about motivation. The longest books I read as a kid were programming books - I got through them because I was motivated to learn. I’d recommend challenging him with puzzles - find something level appropriate such “print a pyramid with base size n” or “draw a maze that doesn’t loop back on itself” for advanced beginners.

Dyslexic programmer here! Here's some of my tips I use.

ALWAYS ALWAYS close your parenthesis/brackets/quotes as soon as you open them then go back to write what's in them. So, if I write: func(arg), the keystrokes for me are: f u n c ( ) <- a r g and it's muscle memory at this point.

Color syntax highlighting is a must! It lets you know your keywords are correct.

Copy-and-paste variable names. Write them once and then get fast at copying them.

And then some preferences I like, not sure if they're related:

I prefer coding styles with lots of vertical white-space. I also rotate my monitors to portrait.

Also, I've always used a dark mode theme. I thought that was a nostalgia for the old DOS days, but seeing other people recommend them, maybe it's a thing?

Huh, I dark mode everything too. Maybe it's a thing?
I'm not dyslexic, and I dark mode all the things, too. For me, it eases the eye strain. I also turn on night mode at 3pm, regardless of time of year. I'm prone to sinus headaches due to allergies and bright lights can make it worse (not quite migraine levels, but enough to make concentration difficult). I also have a tendency to spend long hours with minimal breaks in front of my screens (like +16 hours/day during work from home only occasionally getting up for coffee or bathroom).
> Copy-and-paste variable names

Notepad++ is very good at suggesting anything already typed in the document and supports syntax highlighting.

Not sure if this would be a good editor for a newbie, but it would work.

There is a couple of fonts aimed to help dyslexics.

[0] https://github.com/antijingoist/opendyslexic

You might also try BeeLine Reader, [1] which can be helpful for reading, though isn't used with IDEs. Disclosure: I am the founder, and I'm also happy to give extended free trials to anyone from HN (contact info in profile).

1: http://www.beelinereader.com

That is an incredibly hard to read font, see:

https://opendyslexic.org/about

I struggle far more parsing that than a typical monospaced font. In particular as that is 18pt, turn it down to a more normal 14pt and that's worse than most of Word's default fonts let alone coding specific ones.

There is a few such projects. I just pasted the one which came first in my browser history.

I use it on mobile in the ebook reader, I can't say it is dramatically better than any serif font but at the low pt it is slightly better for me to scan the page. I'm not a dyslexic, but have some trouble reading from the mobile screen lately, so gave it a test.

I've found it works better on my ereader then my screen. More about consumption than writing. Monospaced serifed fonts with lots of colors are better for programming for me.
OpenDyslexic is a TERRIBLE font for helping dyslexia, for how unconventional and distracting it is. I personally use Heinemann Special (but it’s not free), and sometimes Atkinson Hyperlegible.
> OpenDyslexic is a TERRIBLE font for helping dyslexia, for how unconventional and distracting it is.

It feels like it'd probably be nice to do more studies to explore which fonts are actually more or less helpful. I found this, but it only compares OpenDyslexic with some of the regular fonts: http://dyslexiahelp.umich.edu/sites/default/files/good_fonts...

For what it's worth, it seems like it's helping at least slightly.

I'm not sure if I'm dyslexic, but I do have a horrible time reading. The hardest thing is reading stuff I have written. I just get anxious, and find it tiring. I would often check in some very embarrassing typos.

The best trick I have found is having my work, and code read back to me using text to speech software.

Reading along as the computer speaks helps me to find spelling and grammar mistakes.

Are you sure he has dyslexia, as opposed to visual issues (especially binocular vision problems) that could show these symptoms as well? These issues relate to how the eyes track together across a page/screen, and are often confused for dyslexia.
I'm mildly dyslectic with a dreadful memory. I will stumble across a file I wrote a month or so ago and take a while to realize that I wrote it. The things that help me:

Use JetBrains mono-spaced font.

Use three big desktop LCDs, with largish font, green characters on black background and vim syntax highlighting.

Edit my code on the middle monitor and have reference information on the monitors on either side. Copy 'n paste rather than re-type stuff. Heavy use of keyboard short-cuts, avoid mouse when editing, etc. Lots of ALT-TAB switching between windows (Mate/Debian/Linux).

Quietly read aloud to myself to check spellings, etc. User spelling auto-correction.

Use a fast machine and frequently re-compile individual files with maximum warnings level to get the compiler catch my typos.

I myself am, and I've also had colleagues that are.

Only thing I've noticed is that the way we absorb information and master it is very different from some of my colleagues. RTFM is really a struggle, and instead I do better learning through a million smaller pokes that slowly build familiarity (e.g. videos + playing with actual code, even if you don't fully grasp it).

I struggled more in college with contrived examples and math-like definitions, but you show me how it works and it working, and I get it very quickly.

As far as fonts/IDEs? Nothing unusual, just a high quality code font (monospaced, like Cascadia Code, Jetbrains Mono, etc), with normal autocomplete/AI suggestions. I do set my DPI to 125% but that may be an eyesight/personal preference thing.

That and tab complete, I tab complete prose, I tab complete commands, I'll tab complete the last letter of the command to make sure it's a command.

I'll tab complete while I code to keep those small errors out of the picture.

> RTFM is really a struggle, and instead I do better learning through a million smaller pokes that slowly build familiarity (e.g. videos + playing with actual code, even if you don't fully grasp it).

You know, I never thought about it but this really rings true for me. I'm the same. I think sometimes it's an advantage to learn this - the mental model I build can be very different from someone who RTFM

I second all that you said, even about RTFM struggles. I'd like to expand on RTFM, thought: for me it really depends on how it's structured. If it's a very "formal" or dry docs, I have problems absorbing them, but if they're informal or playful, I'm much better at absorbing them, even of they're information dense.

There's a fine line, though. Too playful and you'll lose me.

Also, progressive build up with examples (especially interactive ones) help me a lot, too.

I think this might be true for everyone, but for dyslexic people especially.

Edit: ROFL. I proofread it and didn't notice the typos/poor word placement until after posting. Leaving them in, to remain in the spirit of the thread.

The compiler will normally spot spelling mistakes.

My monitors brightness is turned down so the white sections on a monitor with a lux meter held 5cm away is reading 33 and the room in general is about 100-130lux (I have a lux meter).

I program in a blacked out air conditioned room with a warm white light bulb behind me, so alot like what you might find in a casino lighting levels. Edit:This also helps you lose track of time and become totally absorbed in the code. In the past I even looked into buying an underground military shelter to work in so I can remove all external stimuli in order to focus on the code because the internet is a big enough distraction as it is.

The white colour on the monitor is like the Financial Times "pink" which is more orange but in time you get used to this and dont notice the orangeness.

I program with the MS night light on 50%, have used F.lux (https://justgetflux.com/) before MS introduced it.

This removes the eyestrain enormously so you can spend hours in front of the monitor and ignore the "take regular breaks to avoid eye strain".

I prefer windows ClearType to be off so I can see every pixel in the font like windows 2000/XP, not these new ones which are all smoothed.

Have the "show location of mouse pointer when CTRL is pressed" switched on as its easy to loss the mouse on multiple big monitors.

OS 120dpi font size System Font size 18, but this depends on the size and resolution of your monitors, so you'll need to experiment with your fonts.

Basic text editor a little better than notepad but not as good as notepad++. No code autocomplete or anything.

One of the most gifted programmers I've ever worked with is dyslexic. His ability to conceive a total system is spooky great.

He never graduated high school, was lacking a lot of formal training and had an understandable hostility to orthodox approaches. Our boss paired us together because I was able to find ways to make certain computer science fundamentals palatable to him. It was a wonderful, humbling opportunity to help make someone incredibly valuable even better.

People used to give this guy crap because he made lots of typos in his comments and misspelled variables. It really pissed me off because it was such a superficial critique and as far as I was concerned embarrassed the critic by exposing their inability to recognize other much more pertinent qualities. But to his credit he was also very personable and was able to defuse their foolishness, just laughing it off and preserving productive working relationships.

I would caution that this fellow's dyslexia was not an asset — it was a hindrance that he was able to swamp through immense talent in other areas and strong dedication. Not everyone brings such outrageous gifts to bear. But we all have our own gifts, and when placed in a suitable environment we can all become much better that we would otherwise.

I am, but I also went through a specialised course when I was quite young & so my reading & writing are pretty OK generally.

My dad is as well and he did the same course but as an adult.

Then he partnered with some dyslexia specialists and wrote the first version of unitsofsound[1] (recently sold to nisai), I joined him and help with the re-write to the web version in the early 2000's

I would say that day-to-day the problems are more going to be related to reading that writing IMHO. The act of writing code is heavily supported with linters & compilers etc etc and so typo's don't tend to be a huge problem

Dyslexia usual manifests with short term memory difficulties, I tend to rely heavily on a pen & paper notepad with scribbles.

However, in the actual workplace, it can have its advantages. Dyslexics are encouraged to draw diagrams and other such visual ways of helping with memory & disseminating information (pictures worth a thousand words and all that)

When it comes to practical tips for learning ...

- learn how to read documentation - I find ligatures are useful (see visual clues) - thesaurus for naming things - practice practice practice, pushing syntax into long term memory rather than short term will be the key. Maybe reduce syntax to being with by concentrating on variable & functions to write in an FP style

I hope this helps and feel free to contact me to talk about it some more chris [at] matheson.it

[1] https://www.nisai.com/unitsofsound/

My overall expereience is that there's little, if maybe inverse relationship between programming skill and ability to spell.

But that much you've found out, I think discipline and good habits are what's most important.. Let's assume they won't become great at spelling, and not waste too much energy there, but instead focus on the mechanics around avoiding it becoming an issue.

The IDE will help with what's already in the language/codebase, and assuming those are spelled correctly, autocomplete makes it hard to mess up. The problem is new names, because they will proliferate throughout the codebase, while they may be easy to refactor internally, they will be challenging when they're exposed through some API.

My suggestion is that new names are verified by searching for them on a search engine and/or using a dictionary, not only to verify their spelling, but as importantly, to verify their meaning, (I've encountered correctly spelled words that just meant something completely different because spellcheck was used, but the word wasn't looked up in a search engine to find out if it actually meant what they thought).

Newly added names that has been added, can be kept in a list for quick copy-paste access to them while being used throughout the code-base, until autocomplete can reliably use them.

Another hint during "verification" is to avoid similar looking or sounding names if possible, but that's applicable to everyone, dyslexic or not.

Linters and types helped me a lot. When I started coding with Python and JS I introduced most Biggs due to typos or need to look up method names again and again and again ...

Now most of it is catched by tab completion, types and linting. That increased my joy of coding a lot.

Overall I like to code as you break down your intent into small statements. In high school I had to read and write long and convoluted texts and that was a pain. I made more then 25 mistakes on a single page during exames. Getting into software felt empowering as this did not matter anymore. There are still syntax errors in my code but I can fix them rather quickly without thinking to much about it.

I'm a dyslexic programmer and what I find hardest about the job is keeping up when people list things in meetings. The number of times people suggest "Keep notes" as a solution for this is very repetitive. To keep notes you either have to be able to pre-empt something being worth taking a note of (it almost always only becomes aparrent after more context, by which time I've forgotten the name of the thing I should have taken note of and simple can remember the reference) or you have to be able to take note of everything. Recording and typing back isn't an option either as it simply takes too long.

The other thing I struggle with is being able to recall things in detail from what I have previously worked on. "What was x called that did Y you were working on last week?" I really struggle with that style of question.

For the spelling of variables names I use vim with spell check and mostly use ctrl+n to complete words so that they are spelt the same throughout. For the memory of function names being able to spin up a repl or run a subset of unit tests/ google/ autocomplete based on the estimated available properties of an object normally get the job done.

There are some really nice spell checks that integrate with vim that check the spelling of the words broken up by underscore so that each is checked individually. That helps a lot when writing a variable for the first time.

Linters are my best friend. It also helps to use strongly typed languages like Typescript and Java