Colorization Required

In addition to color, how about some whitespace? I found that XML chunk hard to read without some 4-space tabs to show the different levels of indentation. The hierarchical nature of XML is much easier to grok with a little …

white

space.

FYI. I have been using a similar prog for a while now called Notepad2. It does the same type of things plus a number of other advanced features.

That’s because the colorization breaks up the code into patterns that we can quickly recognize. Because we’ve learned to attibute behavior to specific colors in code/xml, it makes it easier to pick out the pieces within a block of text.

Now, imagine a colorization bug in that code, that would totally throw your perception of what that code/xml did.

It’s all about making Notepad2 be your default text editor.

Color coding really is a must have when working with code files. That’s why anytime I publish any code snippits to the web, I’m always sure to colorize it with GeSHi (http://qbnz.com/highlighter/).

It just makes it easier for everyone to read.

Know of any other good online syntax highlighters?

How 'bout VB.NET to regular expressions? No mention of VB anymore? Guess that’s what happens when you leave the ghetto ey?

http://www.codinghorror.com/blog/archives/000105.html

I look at it in terms of dimensions. Black Text only shows ONE dimension. Colored Text literally adds another dimension of information…it’s a new axis. Very Tufte.

FrontPage 95 did this … couldn’t tell you if there were programs that did this earlier than that, but I always thought it was genius. It made fixing that mangled, screwed-up HTML so much easier. 0.o

its not so much that the eye/brain groups similarity, just that its really really good at spotting differences.

Scott Hanselman wrote:

[…] Colored Text literally adds another dimension of information…it’s a new axis. Very Tufte.

I’m glad someone brought Tufte into this discussion. While I find that color aids in understanding, most IDEs and syntax-coloring programs seem to default to some truly garish color schemes. If you read Tufte’s “Envisioning Information” ( a href="http://www.edwardtufte.com/tufte/books_ei"http://www.edwardtufte.com/tufte/books_ei/a ), you’ll probably (hopefully!) never look at information presentation the same way again.

Take the example InfoCard coloration in this blog: To me, the red attribute names and blue attribute values indicate importance. More than likely, however, the attributes are less important than the content of the elements. That said, a generic XML syntax-colorer doesn’t have the advantage of knowing the semantics of the XML it’s formatting, so I guess I shouldn’t be too hard on it.

Also, deciding that color X implies meaning Y is a very subjective and personal thing. But I still wish that color-coding applications didn’t routinely aim for the highest-contrast color schemes possible.

I not sure if we need colorization to understand what we are looking at, but I would say we definately need logical grouping. For example, take this:

jonraynor

Now this…

JonRaynor

and finally this…

Jon Raynor

As the text is grouped, we can understand it faster and the meaning is more clearly understood. Colors definately help group the text in a more meaningful pattern.

Another item this illustrates is writing code with clarity.

Example:

This is OK,

if x then
dothetimewarp()
end if

But this is clearer with the the use of whitespace and further grouping of the expression…

if (x=1) then
dothetimewarp()
end if

Wow. I was just looking at some old Turbo Pascal source code in the IDE, which is color coded, but not to the degree of Visual Studio, and it hurt my eyes. I am too used to seeing user types in a different color, and classes in a different color (some of these things I personally change myself; they aren’t the default in VS). I couldn’t believe how hard it was to read that old code. Imagine going back to the days of BASIC, when I was told the program would run faster if I put as many statements on one line as I could, as well as make variables as short as possible, which means I made Tetris using variables called A, B, C, etc., with every line of code filled with statements (broken only by loops and the 255-char limit of GW-BASIC), ending up with a fully working game with a screenful of code, which essentially no whitespace except for within statements themselves. It’s just a jumbled mess. :slight_smile: