2014-05-12

We’re doing syntax highlighting wrong

James Fisher mentions two things that are often syntax-highlit wrong:

  • Comments in source code: “The comment is washed out. While the rest of the text exists in black, boldface, and bright colors, the comments fade into the background. […] The implication is obvious: we have collectively decided that the comment is less important than the code.”

  • Insertions and deletions in diff viewers: “[…] a red line is one that was deleted, and a green line is one that was added. […] Our diff viewer, then, tells us that deletions are bad, dangerous, and possibly an error, while insertions are good, safe, and successful.”

Consult the blog post for the rationales and several instructive illustrations.

No comments: