Social Algorithms

Everyone tries to make sense of the world around them. From the mundane to the fantastic, it’s always as the Merovingian said: “Cause and effect, my Love. Action, reaction.” I think this causality is particularly interesting to those interested in finding out the way things work. Sociologists study the individual and its composite effect into the social machine.

Swap the terminology and provide a few additional presumptions, and the natural order of the world seems to lend itself to the linear instruction set of the programmer’s mind. It’s like predicting the butterfly effect after skipping everything up to humanity. (Luckily, it seems, most of these effects can be generalized or canceled out from the effects of other butterflies.)

Somewhere along the way, I would say that every programmer has looked at the world and applied what they’ve learned in training or practice to what they see. Personally, it’s a weekly occurrence. And not so often is it a matter of stress or ire for understanding, but a colloquialism batted around between friends in the business to pass the time.

The classic example: The waiting line at a fast-food counter. The phrase “first-come, first-serve,” while generally precise, isn’t accurate. I’m certain that if President-elect Barack Obama stepped in line behind you at a Subway or Wendy’s, that most would step aside and let the man (and his five hundred Secret Service agents) get ahead in line. So the observed structure was a queue, but the factual component is a priority-queue. It was an amusing observation at the start, and certainly one which didn’t warrant any pursuant action; but, what it did offer was realizing the difference.

It’s the same thing with a program’s features. It may seem like a moderate improvement, but the differences between two scheduling algorithms can be all the difference in servers where uptime and throughput are extremely important. In college, I overheard a novel idea to implement a ’2-D’ chain: with origins in the North-East corner, one could traverse the ‘map’ in two directions. East-West was a standard linked list, but North-South was a pri-queue which would be deprecated upon every traversal of the E-W inbound link. It’s these innovations that in and of themselves aren’t staggering or ground-breaking, but could equivocate to the difference when Obama visits Subway or not.

Without having observed this simple fact, I wouldn’t have known how to pick up on it in the future. That’s a major difference between being a junior-/mid-level programmer and senior level architect: Being able to pick up on structural similarities, generalizations, and disparities then react to or plan for them, is a distinguishing ability. I’m getting better as the time passes, and hopefully it will only be a matter of time before I can efficiently and effectively take my Subway pri-queue observation and apply it to a client request; then I’ll know I can fulfill at least one of my self-prescribed requirements for a senior-developer position.


About this entry