Monday, May 26, 2008

Respecting knowledge, and alphabetizing

While I've been on the topic of ignorance not respecting knowledge, here's another example - one that is exceedingly self-defeating. In the IT world, building your own wheel when you could pull one off the shelf is a sign of incompetence, not a demonstration of skill.

My main reason for posting this, though, is just to point out the Shark Tank web site. The stories of clueless users are amusing and I'm tech-savvy enough to usually laugh along with the writer - I already knew that the bubble sort has О(n²) complexity, for example, and that this gets very bad as your lists get very large. But once in awhile, I come across a story that surprises me and I have to think, Hmm, I'm not sure I would have known not to do such-and-such, either. Forewarned is forearmed, as they say.

Unfortunately, the stories don't always provide enough information for me to understand exactly what should have been done rather than such-and-such, but I still find it a valuable exercise. I may avoid some terrible error some day because of it.

Speaking of sorting, I had a chance to do some at work the other week. The contents of our rare book room had gotten considerably disordered at some point, plus there were a couple tables of books outside the RBR that needed to be blended in. I began by creating groups of books within certain call number ranges; then I could deal with each small subset in turn. It worked rather well - I got done sooner than my supervisor expected.

I first started using this method - a variant of quicksort - when I was faced with graded papers or exams that I wanted to alphabetize by student name. I began by tossing them into four piles of A-F, G-L, M-S, and T-Z (in practice, I usually had to treat the W's as a separate subgroup). Then it was fairly easy to sort each of these smaller piles and just stack them with the A's on the top. It turned out to be much less tedious than flipping through the pile to find the correct place for a paper, one at a time.

1 comment:

Heather said...

Hmm, I always alphabetize like that too. Must have been something you taught me. ;-)