I wanted to start a conversation about neurodiversity in tech.
One of my good friends found out she had dyslexia after struggling to learn code, for years. Our tools are designed for most people to read or write code the same way.
How does dyslexia affect learning, writing, or reading code?
There are ways to lessen the effects of dyslexia when coding:
Most modern code editors will let you bring your own font. Find a font with clear distinctions between commonly confused letters. I especially like
Hack
andSource Code Pro
.OpenDyslexic
is also an excellent option.Color themes also matter! Avoid high contrast colors like white-on-black and black-on-white. Play with themes until you find one that works for you specifically. (Dark mode and lower screen brightness also may help. Anything to reduce eyestrain, which worsens dyslexic symptoms.)
One challenge I have is whitespace. I always turn on "visible whitespace" so I can see how many spaces or tabs I have. Extensions like
indent-rainbow
in VSCode also help.Another issue I commonly run into is brackets. There are two ways I fix this: one is to use the Allman bracketing style, which requires a bracket to be on its own line, like this:
This makes the brackets MUCH harder for me to "misplace" visually. The
Bracket Pair Colorizer
extension for VSCode also helps.On a larger point, make more use of vertical space in your coding style. Avoid one-liners. Put spaces around operators. Do everything you can to avoid dense code. Give your eyes room to "breathe", even if that means your code file is twice as "long".
A good autoformatter will allow you to switch between your ideal style and that of your team.
Integrating a good linter into your IDE is also helpful, as it will draw your attention to many typos.
Turn on your editor's settings for highlighting your current line. This makes a huge difference with "vertical" dyslexia, such as mine.
Also, explore any extension which highlights important components of your code. I use
Comment Anchors
andTODO Highlight
to help me find important comments later.All of these tips are fairly general, however. Know your own dyslexia: it's a bit different for everyone.
I don't want to leave off on a note of "your brain is broken" sort of note! Living with dyslexia, I've learned something interesting: dyslexia is the ability to rearrange the world around me mentally! It simply happens on the page (or screen) without me wanting it to. I've talked to many fellow dyslexics, and they indeed share this ability (in varying, unique forms).
This provides a unique advantage as a coder! You'll likely find that you are good at mental visualization. Practice this and use it. When trained, it'll enable you to work with algorithms, software architecture, and design patterns in a way that most coders only dream about.
I was a Source Code Pro user, until I met Monoid. It's perfect for non-high DPI screens, all the straight lines are pixel-perfect sharp (kinda like Terminus) while still keeping antialiasing for diagonals and curves. And it's got modern font features like ligatures (optional), contextual alternatives (calt) and different options for characters like $ and zero. You can customize what you want on the download page. The only reason to not use it IMO is if you code on a 4K monitor or something like a 1600p macbook
Thank you. These are insightful tips. So, it sounds like there is a lot of customization work to set up the code editor and experiment with what works for reading/linting code!
I was going to post a long comment but it actually turned into my first blog post so thank you for expiring me to write and to somewhat answer your question.
dev.to/benjaminsmiths/can-dyslexic...
Thanks for sharing, Ben! Congrats on your first blog post! It's interesting how you mentioned PHP as the language you got hooked on. There are so many different ways to do the exact same thing, it's likely confusing to anyone trying to learn it!
I suffer largely in the organisation and get overwhelmed department, for instance Jira / Bitbucket is my worst nightmare (don't tell anyone 🤫). Who ever thought ticket numbers where a good idea... Anyway these days I work on a lot of different things across the board, In the space of 5 minutes, I will have asked myself, what was that ticket number again? It wouldn't be so bad if ticket numbers where nicknamed using a silly name generator.
How I remember stuff in a stateless way:
My 2 front door keys are identical (2fa) so I got myself little key jackets to differentiate them, the trouble with that is you end up with 2 different colour coded keys, that you still wouldn't help you know which key is for which lock, I always remember, "purple hair, green pants" to know which key is which, I can't say the same about ticket numbers unless you get a good one with a memorable number.
So let's see what else is a pain. Slack, slack is like bombardment of useful and useless information, I want to focus but I literally can't, because a channel that might have relivent information in the future just pinged me, I can't delete the channel in case, you know, I miss something. The answer to this one is probably AI, smarter notifications that work to protect me from the insanity of day to day office life, predicting my interests and what I need to know based on what I talk about the most.
There's a lot more but I'd be here all night.
Adam, thanks for sharing. It seems like you've found workarounds! I'm still working on them. Your comment made me smile!
I have worked in several teams over my career and in almost all of them the majority of the devs have been dyslexic so I'm not convinced it is a problem (except in may be the most severe cases).
I use eclipse and vim and both have a spell checker and tab completion of variable names to help out. I still struggle with row/column operations in 2d arrays but I just go more slowly over those parts and comment clearly so I can check it later.
Thanks for sharing! I don't think it's a problem to have dyslexia. But I think that most tools aren't optimized for a neurodiverse skillset simply because there are so many viewpoints out there.
It makes writing binary operations a challenge some times, and I tend to switch numbers in weird ways. It goes in waves for me and is better and worse based on stress and sleep for me.
That's a good point! Dyslexia is different for everyone and depends on the person's state of mind. I often mix up numbers, like 9523 and 9253, look the same to me at first glance. I'm curious, what's an example of a binary operation that could be difficult?
am I only one put left and right side arrow stickers in monitor ?
That's interesting! Why do you do this?
i constantly confuse which side is what, otherwise trim like string functions, css positions etc becomes nightmare.
That makes sense. Physical stickers for this are very useful!
There are so many good advice already that it is difficult to add something else! although I think that it is also interesting to mention the environment a dyslexic developer might find while working in a company or start-up.
As other dyslexic developers, I started into the artistic and design area and moved into coding, after a friend of mine (and mentor) convinced me that programming could have been more accessible than I though if I stop associating it with mathematics as I used to do. In facts it revealed to be a great creative tool for designing and implement "structures" and as architecting solutions.
I am very dependent on the "right" set of tools and IDEs, such JetBrains products (IntelliJ, WebStorm, ...) because of its superb auto-completion, grammar spelling/corrections, and a wide variety of plugins. I believe that a developer (and a dyslexics even more) need to invest the necessary money in buying a professional quality IDE that allow him/her to be as comfortable as possible in writing code.
Personally, if I had to use vim with all its mnemonic shortcuts or notepad, my career as developer wold have been much harder.
So, a professional quality grade IDE is a must.
The other aspects of hard-life for a dyslexic might be the environment. I personally never met another dyslexic in the companies I worked for and blending with people that are more "one-task-at-a-time" oriented, which often reflects project management leads it can be frustrating.
I usually find myself with the complete architectural picture of what I have to work on. An heuristic approach is for me fundamental. I have to learn by doing and exploring. Often challenging the so called standards and best-practices that by the time they are recognised as such, they are already old. I get seduced by reinventing the wheel, because even if in most case you come up with something quite similar from the existing model (web-component, UI element, even a complete frame-work), your journey makes you deeply understand the fundamental bricks of the technology you work with daily. And sometime, you can make the known wheel evolve !
What saddens me is that no matter the good results I deliver and bring to the table, I constantly need to defend and protects my way of learning and implementing solutions, which often finds me isolated and insecure of sharing my work with the so called "normal" brains. As if I carry with me the years of shame during formal education.
So, I would suggest to your friends to pick carefully the IDEs and tutorials for learning. The main point would be to find the "seducing" aspects of coding that she can gets passionate about. I think software development offers a lot of potential to make a dyslexic brain wanting to embrace it as a career/hobby (difficult to separate the two).
Indent-rainbow for the win!
Love them!