Logo




Subscribe:
RSS 2.0 | Atom 1.0
Categories:

Sign In


[Giagnocavo]Michael::Write()

 Thursday, February 12, 2004
Some colour tips for Visual Studio .NET

One thing I don't understand is why VS.NET ships with no color coding for strings.  It's right there in the options.  But, it's left as automatic.  Considering how much strings are used in .NET coding, I'd think they'd warrant a bit more attention.  I set my string color to Maroon.  It's dark so it doesn't stick out too much, but just enough to let me know where character and string data are. 

When writing  of code (esp. when mixing string literals with code, as I am now for outputting dynamic JScript to web pages), this helps me catch a lot of errors that I'd normally find at syntax checking or compile time.  When scanning through to make a change somewhere, the string data sticks out enough that I can easily find a section.  I also know explicitly where I'm passing strings around (and thus can find places that might have a refactor possibility).

For those of you who haven't, go into VS.NET Tools -> Options -> Environment -> Fonts and Colors.  Go change your string colour to maroon and see if you like it.

My second tip is against eye strain.  By default, you have a white background.  That's fine if you deal with paper all the time, and thus most text is dark on light.  However, if you're like many programmers, time spent on paper during the day (reading programming books in bed doesn't count) is significantly less than time on-screen.  Thus, you can benefit by changing text to be dark on light, or in my case, dark on not-as-dark.

What I've done is change my text background to gray (specifically 205, 205, 205).  It's light enough that the standard text colours work, but it's dark enough that there is a significant reduction in light output from my monitor.  At first it's a bit odd, but quickly you start to feel more comfortable.  Naturally, there's less strain on your eyes, since there is less energy going in.  This may be one of those things that takes a few years (like ergonomic keyboards) before you realise the benefit.  Since eyes are harder to fix than wrists, I'd play it safe and try to reduce strain as much as possible instead of having problems later on. 

Oddly enough, this is one area where most systems have gone backwards.  When I used various versions of BASIC over 14 years ago, white text was the norm.  Heck, even in Turbo C++ I remember not having a white background.  One company that does realise this is discreet*.  All their products have a “charcoal” interface, where everything is dark.  They have a more urgent reason for this, since their products work with video and graphics: your colour perception gets distorted by extra light, thus by keeping the UI dark and as invisible as possible, you don't mix the UI into your colour corrections.

Code | Personal
Thursday, February 12, 2004 2:57:56 PM UTC  #    Comments [1]  |  Trackback

Thursday, February 26, 2004 5:17:44 PM UTC
Thanks for the tips. Lately my eyes have been feeling a little strained. The eye doctor said that you blink less staring at the monitor, so your eyes tend to dry out.

I've been using eye drops and that helps. I'll see if the gray background will make it better as well.

Also, the tip about the string color is great. I don't know why I didn't think to to change it. I guess I never looked through the whole list of items.

I'm also using Lucida Sans Typewriter as my default font. I think it's much easier to read than Courier.

Thanks again!
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview