Thursday, August 24, 2006

Swapping Caps_Lock and Escape

Since I recently "switched religions"---i.e., I use vim now instead of xemacs, I find that I need to hit the escape key quite a bit more frequently for some reason. :-) Now, one of the major advantages of the vi-class editors is that you don't need to move your hands from the home row that often. If you happen to know how to touch-type, then this is a major advantage.

On my keyboard, the escape key is located way at the top. This is inefficient. Insprired by a recent discussion on slashdot, I decided to swap the escape and caps-lock keys. The slashdot people helped get me started by reminding me of xmodmap, but the poster was trying to remove capslock altogether. Acutally, I do use capslock on occasion. (I touchtype....)

I used xev to figure out the keycodes for the keys that I wanted to remap. Just run xev and hit the key you want. When I hit Escape, here's what it printed out:

KeyPress event, serial 29, synthetic NO, window 0x2600001,
    root 0x4c, subw 0x0, time 1088941543, (43,83), root:(594,518),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False
The "keycode 9" is the part you want. A similar action shows you that capslock is keycode 66.

Now you are ready to write your .xmodmap file. Here is mine:

remove Lock = Caps_Lock
keycode 0x42 = Escape
keycode 0x09 = Caps_Lock
add Lock = Caps_Lock
First, it removes the "lock" functionality from the capslock key. Then I tell it that key 66 (0x42 is hexadecimal for 66) is now the escape key, and that key 09 (the old escape key) is now capslock. Finally, I add the Lock functionality back to the new capslock.

It works very well. Typing in vim is much faster, since I can switch modes with the same ease that I can shift letters. And if I do decide to use capslock, it is still there, not that far away. Now that I've reprogrammed my keyboard, all I have to do is reprogram my hands....

Thursday, August 17, 2006

The Mother of All Blenders

I've been making my own soymilk for a while now, but the filter in my SoyaJoy finally wore out. I started making soymilk with my blender, and discovered that it was actually a lot easier than I thought it would be.

Until the magic smoke started coming out of the blender. It seems that grinding soybeans is very hard on a blender.

I'd wanted one for years, and now I had the perfect excuse. It Was Time.

I got the vitamix blender.

Imagine, if you will, a blender with settings from 1 to 10, and High. You then notice that 3 is labelled "liquidate". It's like in spinal tap where the amp can go up to 11, but in this case, it's more like 30.

The nice thing about this machine is that it can turn a vegetable into a juice (albeit a thick one) easily. It obliterates anything you put in there. The advantage is that you end up eating the whole fruit, skin, seeds, fiber, and all. Much better for you.

Other tricks it can do: ice and strawberries become icecream if you leave it in there for about 60 seconds. A blend left in there for 4-5 minutes will become soup, the friction heats it to boiling. It also can grind wheat berries into flour.

I've eaten more vegetables today than I usually do in a week. I had two carrot juices (one with a tomato and some ginger, one with some lemon); a soymilk and strawberry smoothy, a bowl of soup (carrots, tomato, potato, celery, etc.) which was very filling, and I made some lemonade. Of course, I also got to make my soymilk, which was the stated purpose of getting this in the first place.

I've been wanting to go more "whole food" for a while, this sure makes it easier.

Saturday, August 5, 2006

Brew 23 -- Orange Blossom Spice Mead

This is an old favorite of mine. The spices and the orange blossom honey make a great Christmas mead. Further, since this is National Mead Brewing Day, I decided to take lots of pictures. They're at the bottom.

First, here's the recipe I used:
Date of Brew: August 5, 2006
Date of Bottling: Not yet!

  • Honey
    6lbs Orange Blossom Honey
  • Spices
    2T freshly crushed allspice
    1t freshly ground ginger
    0.5C golden raisins
  • Water Treatments
    2 Gal Water

Number of Gallons: 2.5
Original Specific Gravity: 1.085
Expected Final Specific Gravity: 1.0
Expected Alcohol Content: 11.3\%
Yeast: White Labs Champaign Yeast, which didn't work (It was past the expiry date, I think that's what went wrong), and Red Star Bread Yeast, which started fermentation very quickly.
Quantity: 5mL of White Labs, 2 T of Red Star
Time of Pitching: 18:15

How to Make Mead

Making mead is very easy. If you are thinking about getting into brewing, and are concerned about the complexity, this is the easiest starting point.

You will need, at a minimum...

  • a fermenter, such as a 3 gallon carboy.
  • an airlock and stopper,
  • honey,
  • something to use for yeast nutrient
  • sanitizing fluid,
  • and yeast.
Life is easier if you also have...
  • a hygrometer, to measure the specific gravity of the brew. This allows you to tell how much alcohol is in your final product. This, of course, is optional. If you like how it tastes, you've done what you set out to do!
  • oxygenation equipment, to oxygenate the must (unfermented honey solution). You could just shake up the fermenter after you add everything; that will probably be enough. Using an oxygenation system will lower the risk of contamination, and take less time.

First, you need to get out your equipment. Here is the fermenter, (a three gallon carboy), 6 lbs of Orange Blossom Honey, and the yeast.

You also want some sanitizing fluid. Really, the only two non-negotiables in homebrewing are 1. start with good ingredients, and 2. cleanliness is Godliness. Any bacteria that get into your must/wort is going to have a party, so make sure not too many get in there.

Now, add the honey to the fermenter.

You may want to rinse out the honey jar to get the remaining bits.

Next, take a sample. You need to measure the specific gravity to know how much alcohol is in the final product. Don't worry if you don't have the equipment for this; it will still taste just fine.

Here I am reading the hygrometer. It's at 1.085. You should drink the sample, or throw it out. Never return a sample to an unfermented wort; you risk contamination that way.

After adding other ingredients, I added the yeast.

Then I forced oxygen through the must to give oxygen to the yeast cells. You usually don't really have to do this, but it helps the yeast.

Finally, you add an airlock. You want the carbon dioxide to get out, but you don't want anything outside (oxygen, which will spoil the mead once it has fermented; and bacteria) to get in. I'm putting Soju in it, a kind of Korean vodka. It's sterile, and if some of it accidentally gets inside the mead nothing bad will happen.

Now all I need to do is wait....

Wednesday, August 2, 2006

End of the Summer

The summer semester is finally over. Teaching two courses over the summer is a lot of work! Especially when one is a new prep. I have about three weeks before the next classes start. I have a few projects in mind....

  • Course development! No, I'm not a workaholic. I just don't want to stop.... I have three courses next semester. Two of them are well-prepped, but a course (if you care about it) is like a book or a painting---you never really finish it. If you have a passion for anything creative, you know what I mean.

    One thing I want to work on is my Question Database. That came in really handy this semester; the text book had very little in the way of examples (not the authors' fault--it's still in progress), so the ability to post many examples with solutions really helped the students out.

  • I'm thinking about making some more web pages for my course, especially data-structures and programming languages. I was inspired by this Biology text. Tons of extra content on the web... I'd like my courses to have stuff like that. Hm... pod-casts about lambda calculus? Maybe not. But there have been some very interesting posts about Java, the antifunctional programming language, and a related post about fold and map, two higher order functions, and how they are used by Google to get real work done. As a specialist in functional programming languages, I have to say I approve.
  • Learning Statistics and the R programming language. This language reminds me of APL. I love collecting data, but don't have much reason to do so, except analyzing exam scores. Next semester I am going to start taking attendance and correlate those with exam grades. It would be nice to have some data about how much attendance affects learning outcomes.
  • Rewrite my file cabinet software. I put a number on each file in the cabinet, and put a description in a searchable database. Pretty obvious really, except hardly anyone ever does it. You can find something in the cabinet in about 5 seconds or so if you do it right. Oh, bad things happen if you lose that database though....

    I hosed my computer this summer, and ended up installing xubuntu, the XFCE version. I didn't want to reinstall mod_python, so I'll have to redo the pages in ruby.

  • Brew some Mead. August 5 is National Mead Brewing day. I also recently got an All Grain brewing kit, so I'll try that out once the temperatures reach something approaching reasonable. And I have two wine kits I need to get started....
  • Weddings! I have five of them to go to in the next two months! I got a good deal on a car rental, though, with I-go cars, a car-sharing network in Chicago. For $60/day, you get a car and 200 miles. This includes gas and insurance! (If you sign up, let them know you heard about it from me, okay? I get a referral credit!)
  • I'm starting to do research again, too....
Another busy vacation...