Just a quickie today. Bill over at ATMakers has a short video on Why He Uses Emacs. It’s actually a nice example of using keyboard macros to convert raw data into the required form.
I like it because it’s a realistic example. Very often when we want to convert a data set to some other format, we have the problem that the source data is not completely regular. Theoretically, this means we can’t write a quick and easy macro to do the conversion but, of course, that is not how we work. If there are one or two outliers in the data, we just convert everything according to the canonical data and fix up the outliers by hand afterwards.
That’s exactly what Bill does in his video. Most of the data is converted perfectly but the two outliers are easy to fix by hand and the entire process is much more efficient than converting each datum by hand or writing an app that does the right thing for each entry. Instead of an hour or two of tedious work or programming, Bill converts the first entry while recording his keystrokes and then applies that to all the other entries. The fact that it doesn’t work on a couple of irregular entries doesn’t matter; they are easily fixed by hand.
The video is only 6 minutes, 15 seconds long so it should be easy to find time for it.