views:

1072

answers:

13

Does anybody have tips for a programmer who recently found they have a form of dyslexia?

Currently any of the following would help...

  1. A suggested color scheme for Intellij (or any Java ide).
  2. SQL is the most brutal language for me to to read, everything blends in together due to a lack of sane automated formatting/coloring. ( I currently have to work with Oracle 10g)
  3. Any other general tips
A: 

The one general thing that comes to mind is using large fonts, and trying out a number of programmer fonts (there are related questions on SO with good answers). I'm sure legibility can always be improved compared to what ships as standard font and size in most IDEs.

Pekka
+11  A: 

I've found the convention of putting SQL keywords in all caps helps a lot, especially when paired with things like breaking after WHERE or JOIN clauses. Something like so:

SELECT id, line1, city, state, zip, country 
FROM addresses 
WHERE id NOT IN ( 
SELECT id 
FROM cache
WHERE addresses.id = cache.id);

It is a ton more verbose, but it helps it be read more easily.

Chamelaeon
+4  A: 

I'm not saying I approve of their solution, but I used to know a very productive dyslexic coder (C programming). They had a standard include file which contained things like:

#define fasle false
#define flase false
#define wlhie while
... lots more of these...

and just added to it as needed. It worked for them, but I'm glad I never had to work on their code myself! This was long before the days of automated spell-checking/correction in text editors.

timday
This is a very bad idea! Instead of one programmer having a problem with dyslexia, now *all* the programmers have to deal with it.
Zan Lynx
That would be SO not fun to maintain his code...
David Oneill
Why didn't this person simply automate grep spell checking into the makefiles? That's way, way better than this. Oh God... the horror. +1 for a great example of what *not* to do. (also, it's slightly amusing)
dss539
@dss539: Why should they ? To this guy, fasle, flase and false were equally valid, but the evil compiler (clearly prejudiced against dyslexics) was imposing the tyranny of correct spelling (which is a relatively recent invention - http://en.wikipedia.org/wiki/A_Dictionary_of_the_English_Language#Background - as he'd frequently point out to us). Of course if anyone else had needed to take on his code I'm pretty sure it would have got some sed/regexp treatment pretty quickly.
timday
@timday: What he should have done is rather maintain a reference file of correctly spelled words; and when the 'evil compiler' complains but he can't spot the problem; he just copy/pastes the reference term.
Craig Young
You're not seeing it from his point of view: he simply didn't acknowledge there was or should be such a thing as the definitively correct spelling. The include file was the quickest fix for the broken dyslexic-oppressing compiler. "Shakespeare didn't have to worry about correct spelling" was another favourite of his (true; see e.g http://en.citizendium.org/wiki/William_Shakespeare )
timday
@timday Why should he? Because it's common convention that `while` is a keyword and `whlie` is gibberish. Redefining the language is not user-friendly and may have unintended consequences. What if someone has a variable named `wlhie` or `flase`?
dss539
+2  A: 

Auto-complete can help reduce typos by showing you if what you already typed "makes sense" in whatever context you are typing into (terminal, source files).

Syntax coloring is a great help as it shows obvious results if you typed something correctly or not such as language constructs or keywords, or left off a quote or used a single instead of double etc.

Since I make a lot of JavaScript for web apps running in a native WebKit-based client I use the Google Closure compiler to verify the JavaScript functions before pushing a JSP to a server.

Lots of other types of software have syntax verification functions or tools (perl, Apache's apachectl can verify httpd.conf). Use them.

Basically anything above Notepad (or TextEdit) is a must to help catch errors for dyslexic programmers. And regular programmers, I guess.

ExitToShell
+4  A: 

Free online SQL fromatter with many options. I use this regularly to clean up messy SQL.

http://www.wangz.net/cgi-bin/pp/gsqlparser/sqlpp/sqlformat.tpl

z5h
+1 for “fromatter” ;)
Agos
+27  A: 

As someone who has mainly overcome my dyslexia and have always been a productive developer according to my employers I can offer some advice, some of which has been pointed out.

  • Find a text size that works well for you. This may not be big! For me if text is too big it is just as bad if it is too small.
  • Customize syntax coloring and coloring in general where possible. This is a big help for me. Find colors schemes that work for you. The ability to see when keywords were misspelled is a great help.
  • Generate code where possible. You talk about SQL. This indeed can be tricky especially where a single letter can be a large difference (e.g. customer vs. customers). The "Script Table as" functionality in SQL Server Mgmt studio can be a real life saver. I also have written scripts to write tedious look up tables etc which are prone to spelling and typo errors.
  • Keep you code well formatted. For me at least this helps me spot typos. There is nothing worse than opening a huge messy legacy file with no indenting or formatting.
  • Proofread your code. I think ALL devs should do this. Letting the compiler find your errors is lazy IMO. I often catch typos reading.
  • Take your time. You are not a secretary. you do not need to type like one. A few extra minutes typing which saves an hour long debugging session is much more productive.
  • Eye strain. Again this is probably true for all devs but I recommend taking a few minutes of non-monitor time every hour or so. Sometimes it is hard when you are "in the zone" but staring at a monitor for 3+ hrs is just not healthy and will lead to errors.
  • Energy level/food/caffeine etc. Personally when I am not well rested my dyslexia kicks in much worse. Coffee/caffeine is not a replacement for rest. Often when I am jacked up on coffee, I make more mistakes than when I am just tired.
  • Read often. Honestly this is one of the biggest suggestions for overcoming dyslexia in general. Force yourself to read both things that are naturally interesting to you and naturally hard. This will teach you much more about your condition than anything else. When you are reading try to be aware of when you are losing focus and concentration. Take breaks and then start again.
Nick
I'm very particular about my text size because of dyslexia. It's amazing how 'comfortable' reading is easier reading. As for SQL I'd like to add... Train your hands to type specific words (a physical memory of spelling instead of a mental). That's what helped me the most with SQL.
KSimons
"Letting the compiler find your errors is lazy IMO." Wasting 30 seconds performing a mechanical process when the compiler can do it in 30 milliseconds is inefficient IMO. In addition, the mental effort spent focusing on syntax and spelling could be better spent on analyzing the domain problem.
dss539
Fair enough but anyone who has dealt with dyslexia knows that part of overcoming it, is training your mind not to make mistakes and recognize them when they happen.
Nick
These is very good advice, even for a non-dyslexic developer!
Mathias
+4  A: 

I have dyslexia and I code. As you are aware, there are two areas that need to be addressed.

With respect to actually writing the code, one of the keys to my being able to get along is touch typing. I usually think of what I'm writing in the correct order and don't have a problem translating that to my fingers as long as I'm not looking at what they're doing. Seeing the keys on the QWERTY keyboard can just nuke my concentration.

With respect to reading the code, I use highlighting a lot. You can't use automatic highlighting because it's not smart enough. I use my mouse to highlight key character sequences and make sure they're what I think they are. Sometimes, when I'm really seeing things weird, I'll copy the variable and paste it into a stand-alone window where I can take a really close look at it.

You're going to make mistakes and need to have personal mitigation plans in place. For me, this includes incremental compiling, running lots and lots of unit tests, etc. The upside is that if you're careful and successful in your own development, you'll actually produce better and more reliable code than your "normal" counterparts.

Good luck!

jfawcett
+8  A: 

I suffer with mild dyslexia and have been coding since the late 70s. Here is what I tend to do:

  • use auto-complete.

  • Spell Checker for comments.

  • Re-read your source several times, this helps me, in re-wording comments to be more understanding.

  • Peer review.

  • Inform people about your dyslexia, tell them what would make your working environment more comfortable.

I have worked with several fellow suffers and one thing that we all agree on, work is better when not stressed. Having someone looking over my shoulder just makes my mind go completely blank.

Oh, lastly, it's not the end of the world, I have found we all work out ways of working around our conditions; personally I have found visualizing the word on a printed page helps me form and type/write that word. Good luck and lets hope all answers help you.

Neil
Here's an example of *peer* review in action. (pear is a fruit)
David Oneill
@David, you perfectly represent one of the biggest problems people with dyslexia have to deal with: pedants who take pleasure in pointing out their every mistake.
Ash
@Ash - I disagree that David is being pedantic. I feel he is actually helping Ash drive in the answer with regards to peer review. (He probably is a perfectionist in real life. I didn't even spot the error and I have perfectionist tendencies.)
ChaosPandion
@Chaos, I don't understand your second sentence. A dyslexic programmer has to deal with a higher percentage of "perfectionist" colleagues than many other professions. In my experience these perfectionists need to be more understanding and not try to continually make corrections where it is just not important.
Ash
@Ash: my first instinct was to just fix it myself, but I don't have high enough rep to edit others' posts yet. I'm glad Chaos was able to do so. As to being a pedant, I am overly concerned with formalism and precision in some areas. It is something that has cost me many awkward moments and much stress throughout my life interacting with people more normal than I. I end up being http://xkcd.com/386/ even when I try not to. Thanks for the reminder to think twice about if what I'm about to correct is just not that important. (I'm serious, not sarcastic in this)
David Oneill
+2  A: 

My problem is attention deficit disorder. I find that I have some of the same difficulties as a dyslexic person. For instance, I just typed and deleted difficluties, is, and difecit. (And the big red dotted undlies (underlines) that Chrome helpfully provides. I don't look at my fingers as I type and haven't for 10+ years (ignore the plus ;). You may assume that the problem lies in not looking at my fingers as I type, but I do the same with reading and writing as weel (well).

Having said that...

One thing that helps is accepting that I will have syntax errors. When web programming, I have the apache log file open, so when I get that blank page on refresh, I command/alt-tab and reload the log file. Sure, I can read through the code, but really, this way is faster. (Although, ADD impatience might have something to do with it.) I code enough of a chunk to test (the chunk size depending on the confidence I have for the language) in increments.

Sometimes, this doesn't work, because the error doesn't generate a warning or notice. The other day I almost posted a question to SO. Because of the strict guidelines of carefully pasting your code and your output and formatting it, I found what had happened. I spelled a variable wrong. (Some languages would produce a warning, hm....I wonder if PHP has the Perl equivalent of use strict and user warnings). So that's my solution number two. If you're working through a problem, go through the motions of posting to SO (or actually do).

Another thing I do, is keep my file sizes small. On one hand, it allows for reuse of code, and helps separate out logic. For me, if the file is too big and I have to go from the top to the bottom of the file looking for something (and I haven't documented well enough), I'll forget what I was looking for by the bottom. Maybe not applicable to dyslexics, but it leads me to my next point.

Which is to just accept that you have a difficulty that will never go away. Well, at least say it out loud sometimes. This acceptance will make things a little less frustrating. Sometimes.

Hope this helps.

Elizabeth Buckwalter
Mine is not dyslexia, nor it is ADD. It is procrastination, which is an embedded hell inside your head with guilt, low self-esteem, and anxiety tugging and nagging all the time. Unfortunately, I haven't yet found any effective tactics to fight it.
Majid
"Sure, I can read through the code, but really, this way is faster." Machines exist to serve. ;) Honestly, the problems you mention apply to many people, dyslexic or not.
dss539
@Majid, I find that procrastination can be explained by a difficulty in finding where to start. The mantra I use is "break the problem down". The self esteem issue can be helped by my last statement in my answer. Acceptance. With that you can then move to solutions. My laundry rarely gets done, but it helps with coding. *sigh*
Elizabeth Buckwalter
+1  A: 

First, even without Dyslexia SQL can be a real pain.

Things I do... Test as often and at every increment. Slowly build the SQL.

When it doesn't work I do copy and paste into a text editor with table names. So... copy table name from the DB and paste over the SQL statement to just see if they look the same. You will notice the lines just don't look the same and can then figure out where they are spelled different.

Ben
+1  A: 

You say you have to work with Oracle 10g. In that case you will derive a lot of benefit from using an IDE to support your working with the database. Firstly because a GUI will reduce the amount of SQL commands you will have to type. Secondly because the editors are attuned to the Oracle syntax, which will help when you do have to type SQL or PL/SQL.

Oracle's SQL Developer tool offers both code completion and syntax highlighting. Unusually for an Oracle product it is free. Find out more.

APC
A: 

I am dyslexic/hyperlexic. I am not a programmer, worked in the arts as a manager: opera mostly. Discovered I am dyslexic twenty years ago im my mid-forties. I found going off refined sugar made a big difference in my willingness to be quiet enough inside my body to handle lots of words. It also increased my willingness to consider reading. I became more disciplined with daily exercise - at least 45 minutes for at least 6 days a week. I began using color: highlighting, and creating symbols in color that meant something to me. You can learn more about my process on my website: www.dyslexiadiscovery.com

Ann Farris
+1  A: 

I work as a network admin in Germany. This involves a lot of IP addresses and in German numbers are reversed when spoken, so 192 is spoken hundred, 2 and 9.

Over the phone I insist on slow speaking, one by one of each number and then answer each digit. I know it gets on peoples nerves but it works and forces people to slow down.

For text, I like to print out code samples I'm working on (mostly Cisco syntax). Formatting in Word with a fix-width font helps. This way I can highlight and circle elements that reference other points.

The thing is to slow down and don't rush.

kruczkowski