Collective memory

Mark VandeWettering wettering at
Sat Jul 12 21:40:56 CEST 2003

In article <vgvth12c4qoma7 at>, John Roth wrote:

>> Nope. That's a reason why code colouring is evil. If you write code,
>> and it isn't clear what you mean without the use of code colouring,
>> you did something wrong. Your code shouldn't rely on a specific code
>> colouring scheme to be understandable.
> This assumes that someone reading the code is going to be using
> a brain-dead editor. We need to get beyond that some day, and
> assume that people are going to be using decent tools.

I don't use code coloring editors for a number of reasons.  

1. Code coloring makes code harder to read.  There are two obvious choices to
   pick for the background color of text editors: white and black.  Against 
   a white background, only darker colors have contrast.  Against black, only
   lighter ones do.  This drastically limits the number of colors that you can

   Recently my place of employment changed the default vi that people use to
   perform syntax coloring.  The result: my comments became dark red against a 
   black background.  Some other class of keywords mapped to magenta and dark
   blue.  About 30 seconds of it made me want to gouge my eyes out.

2. Code coloring is almost always done on the basis of a syntactic basis.  
   Call me silly, but I've never found problems with syntax to be very 
   confusing.  Other features of advanced editors like class browsers and the
   like are useful because they relay some information which may not be 
   obvious from context, but that never seems to be a problem with syntax.

3. Good programming style allows you to read programs from top to bottom. 
   Syntax coloring encourages you to skip around by distracting the eye to
   other parts.  It's similar to the overuse of font changes in the written
   word: it is a poor visual style.

4. Some people are color blind.  Syntax coloring may not benefit them to 
   any significant degree.

I doubt anyone will find this arguments convincing, as this tends to be a bit
of a religious argument, but the problem isn't just one of tools: I have 
access to such tools, I merely find them useless.

> John Roth

More information about the Python-list mailing list