Monday, October 11, 2010

Units of measurement for programmers

For some crazy reason, I was thinking of this (highly NSFW) comic today. I'm sure it had absolutely nothing at all to do with spending pretty much the entire afternoon mucking out the code equivalent of the Augean Stables. Complete coincidence, I'm sure.

Now, I figure if you're going to resort to "colorful" language, you might at least take advantage of the entire rainbow. So rather than opting for the old standby (Hint: It involves a hard liquor and two different dances), we should probably just make it more generic: Not-safe-for-work-isms. Also, the other failing of the comic's metric is that its unit of time measurement is the minute. No offense intended to the minute, but we programmers don't care much about you these days. Nay, the second (and its variants) definitely come in first. Millisecond-based timestamps, nanoseconds, megabit-per-second upload and download speeds, and even the hipster-nerdy bogomip.

Given the above considerations, our revised units of measurement would be a number of Not-safe-for-work-isms per second, or Nsfw/s for short. We can shorten that further by simply recalling that Algebra encourages us to simplify fractions. And, lo! We have an "s" common to the numerator and denominator in our Nsfw/s fraction. Thus, our unit will be known simply as the Nfw. Hopefully its maximum value (like sine and cosine) will be one. And, still more hopefully, not very often at that.