Earlier this week I was fairly pleased with myself for writing a reasonably elegant piece of code that takes a bunch of variously-sized chunks of data and works out how to efficiently and predictably squeeze them into the spare bandwidth of another data stream.
The next day, I think while walking to the grocery store, it occurred to me that I could do the same thing with a mapping trick and some modular arithmetic.
I was prematurely pleased with myself. That version took two lines of code.
Posted by Milligan at December 7, 2007 11:27 AM | TrackBack