in reply to Re: Code Readability. Break Rule Number 5?
in thread Code Readability. Break Rule Number 5?

Differentiating by colour is faster still than parsing the difference between a heredoc and code.

Perhaps for people with normal color vision it is.

  • Comment on Re^2: Code Readability. Break Rule Number 5?

Replies are listed 'Best First'.
Re^3: Code Readability. Break Rule Number 5?
by halley (Prior) on Apr 20, 2007 at 12:40 UTC
    Er, that makes little sense. I can't think of an editor that offers syntax coloring that doesn't also allow you to choose your colors. If red/green give you problems, don't use red for heredocs and green for comments (or some such). Even if you were unable to see ANY color, you could pick strong and weak shades of gray that would help you parse visually.

    I agree in general with the "don't depend on syntax coloring" but I won't go so far as to say that syntax coloring is unhelpful.

    --
    [ e d @ h a l l e y . c c ]

      Even if you were unable to see ANY color, you could pick strong and weak shades of gray that would help you parse visually.

      No, it really doesn't work that way. To disambiguate certain colors (and especially shades), I have to concentrate specifically on the colors to the exclusion of everything else.

      If using specific colors helps you personally, that's fine--but it slows me down measurably and raises my frustration level dramatically.

      My friends and I have gone as far as to mark all playing pieces in board games to disambiguate colors such as brown and green. Green pieces have little white dots, for example. Otherwise, I won't play because I spend too much time trying to distinguish the colors of individual pieces when everyone else can glance at the board and see what's happening.

      Again, if using specific colors helps you personally, that's fine--but despite red-green colorblindness affecting a statistically significant percentage of men in the world, the default choice of colors nearly always mixes red and green if there are more than two colors. I have my doubts that I could use any system that used color coding at its default settings.

Re^3: Code Readability. Break Rule Number 5?
by polettix (Vicar) on Apr 21, 2007 at 18:55 UTC
    An interesting comment made from someone whose nick is chromatic :-)

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.