Writing

Feed Software, technology, sysadmin war stories, and more.

Thursday, August 11, 2011

MD5 color stripes used for big system administration jobs

Not too long ago, I was responsible for managing rollouts for a global service which had bunches of moving parts. There were several different programs which constituted a stack of software for which we were responsible, each with their own versions, configuration details, and so forth. Somehow, we had to keep them all moving along, being upgraded and patched regularly, and not let any of them fall behind.

When I first showed up on that team, there was no way to see just what we had out there, and what it was doing. I found that unacceptable and decided to write something small and dumb just for my own purposes. In doing this, I also realized that trying to visually compare a huge list of flags is just not going to work. Quick, what's the difference between these two lists?

--scanner=on --location=qot --ram=12345 --steer=1500 --spine=false --osiris_replicator=true --chappai=goauld --smartand=final --godmode=iddqd --down-with --scc --you=know_me --tcp_window=broken --cat=furry --catalog_response=meow --disc=spinning+shiny --bigg=evil --realnames=stupid --save=yourself

... and ...

--scanner=on --location=qot --ram=12345 --steer=1500 --spine=false --osiris_replicator=true --chappai=goauld --smartand=final --godmode=iddqd --down-with --scc --you=know_me --tcp_window=broken --cat=furry --catalog_response=meow --disc=spinning-shiny --bigg=evil --realnames=stupid --save=yourself

Did you catch that? Those are not actually the same command line. There is a subtle difference in it which could mean something down the road. Unless you knew ahead of time to check, you wouldn't bother going through the entire thing to look for differences, or bother pasting them into two files and running diff, or whatever.

My solution was to make differences stand out by using colorful stripes. Let's try this again.

         

... and ...

         

Now imagine a whole column of these things on a web page. Just by scanning top to bottom, you'll see that there are a small number of possibilities, and that some of them clump together. You can say "oh, these two are the same, and those two are the same, but they are not all identical".

The trick is that I took the MD5 sum of that argument string, sliced it into 24 bit sections, and used them as colors. There are just enough bits to make 5 bars per item. SHA1 would give 8. SHA512 would give 128. 5 was enough for me, so I stopped there.

I call this kind of thing "monkey-level" interfaces, since you can tell at a very low level that something is wrong. Also, by having a bunch of colors instead of just one, there's a better chance of this continuing to work even for those people who can't tell certain colors apart. While that doesn't affect me, I never forget it when designing something involving colors.