Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am visually impaired. With glasses I see well enough to drive, but at the font size I'm comfortable working at I can only see about 15 lines of 100 characters at a time. This has affected my coding style.

One thing I do is write shorter functions. My code tends to get good reviews because these short functions with good names make the higher level functions very readable, but in high performance situations some folks make comments about how much space I'm taking up on the stack by passing variables down several layers for processing.

A second thing I do is divide classes up between files to make shorter files. This reduces the scrolling distance to get to relevant functions and depending on organization may allow me to put the files up on different monitors to look at them together.

Both of these practices make for more documentable units that most coding styles require I document, which further aggravates the issue by extending the length of my file and the distance between related functions.

I'm currently using Visual Studio, which allows code folding at the function and comment block level (which I use frequently) but does not fold at the bracket level like Notepad++ does. The editor that offers better code folding doesn't have all the intellisense features of VS. I could use regions in VS, but this looks very cluttered if used every 10 lines. Folding is occasionally helpful to get completed code out of view while I'm working on a different feature of the code.

Can anyone recommend better coding practices to help with limited visibility of the code?

share|improve this question
I'm guessing you've already thought of this, but is a larger screen an option? –  Brian Snow Sep 3 '13 at 14:13
I'd recommend you to have as large display as possible. If you employee refuses/cannot afford one, you could even buy that yourself since it'll make you job much easier. Also search for a VC plugin with the folding capabilities you need, I'm sure there would be one. –  superM Sep 3 '13 at 14:13
About stack space: What about inlining functions (in c++)? –  Marcel Sep 3 '13 at 15:30
I'd also push for your employer to buy a larger screen. They should absolutely see that it's an investment in productivity, and they should be providing it, especially where there's a very legitimate reason (in this case your visual impairment). As for the code reviewers disliking stack space usage: has it led to a real performance issue, or is it just micro-optimization griping? Unless you're coding for embedded systems, this shouldn't be a problem. –  Daenyth Sep 3 '13 at 15:31
I find this amusing, because when I learned to program, the typical screen handled only 25 lines of 80 characters (or even only 40 characters!) Older editors (vi/Emacs) tend to do better in these sorts of environments. –  Steven Burnap Sep 3 '13 at 15:57

3 Answers 3

up vote 35 down vote accepted

Here are a couple suggestions. If you haven't already choose a font from these recommendations that makes it easier for you to see.

Many monitors support a 90 degree rotation. This is much better for reading and will allow you to get more lines on your screen. You can undock all of the VS tools and put them on the second monitor and just have a big code monitor to maximize visibility.

enter image description here

share|improve this answer
how does this answer the question asked? –  gnat Sep 3 '13 at 14:50
Can anyone recommend better coding practices to help with limited visibility of the code? @gnat Coding practices doesn't necessarily mean only VS features/folding –  Shoe Sep 3 '13 at 14:56
It does answer the actual problem, if not via the method requested. Sometimes in programming the hardest thing is to get the correct requirements from the customer. In this case I'm the guilty customer that didn't see a method other than my own proposal and tried to dictate design in my requirements. –  Denise Skidmore Sep 3 '13 at 17:11
Looking at my current monitor, it does not appear to support that feature, but it is something I'll try at my next gig. Maybe I'll try it in a home setup and buy my own equipment. –  Denise Skidmore Sep 3 '13 at 17:14
@Denise The rotation is actually typically handled by the stand not the monitor itself. Again something that your employer should be open to upgrading for you. –  Mr.Mindor Sep 3 '13 at 19:12

you might want to try contacting the Blindenzentrum (Center for visually impaired students) at the University of Applied Sciences Giessen/Germany (bliz@thm.de). They have specialized in helping students of all subjects including computer-science during their studies. Maybe they can give you some hints that have been proven in the field.

share|improve this answer
We had a completely blind CS student a year or two ahead of me. He had a braille display, worked entirely in console mode. Don't know how they handled the graphics project. –  Denise Skidmore Sep 4 '13 at 0:28

You mention missing Notepad++'s bracket folding. You can add this behavior to Visual Studio with an extension. The C# outline extension is an example. It's free and does the job. There's no need to mess with regions inside a function or control block.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.