Saturday, December 1, 2012

Color Helps Me Keep Track of What I'm Doing

I use color a couple of ways.

One way is to color-code my prompts. I have red-versus-green for stop-versus-go etched into my firmware, so whenever a command fails, I turn the prompt red. When it succeeds, I turn it green.

I seldom overlook an error message, and I don't need to print out $? to see the exit status of my commands. I don't have to think about this, the color just makes it jump out at me. Maybe it's just me, but if it's you, too, the code to make it happen is here, on GitHub.

The second way I use color is to color-code my terminals.

I'm an SCM/build guy, so I always have a lot of terminals up on my screen, connected to a plethora of machines, and as an array of users: myself, git, root, someone else I'm helping out, ...

Some folks have information about who and where they are in their prompts. Doesn't work for me.
First, the prompts get really long. Second, like Google ads, my brain's learned to ignore them.

Not so, color. Red prompt? STOP! Pay attention.

In the terminal app, I go to Edit->Profiles, and create profiles for an array of background colors. Then, when I go to a new machine or become a new user, I pick a different profile for that terminal window. My own machine is always the default profile. Root is almost always yellow. When I swap to a new window and it's yellow, I'm more cautious, without thinking.


Ubuntu 12.04's "terminal" gives me a lot of convenient, pre-defined color profiles. I remember when "making color profiles" meant tediously picking values from a color wheel, for both background and text.

Actually, I remember when, ....


I was in Dave Barach's living room when he got a call from our Maryland office saying they'd gotten the delivery of our editor, to go into IBM's still-unreleased PC/IX. Dave listened as they inserted the floppy and brought it up.

"It's coming up. That's good. ... It's up. ... Great. What? ... It's the wrong color? ... What do you mean, color???"

Every monitor we knew, and had developed for, was green-on-black. Nobody'd ever even hinted that an IBM PC might do colors.

No comments:

Post a Comment