expatiari expatria

Fahrenheit vs. Celsius

Banging out a quick chart with Google Chart Tools was pretty easy, but tweaking it to look just right seemed to be beyond me. I’m more likely to use Google’s chart for the first draft and touch it up in some other editor. For example, I found it difficult to align the tick marks, grid, and labels. The grid does not correspond to values, but percentage of range. Furthermore, the wizard accepts only integer values (12 or 13) while the URL accepts decimals (12.5). Thus tweaking of the URL is an absolute requirement.

Meter per degree longitude

Spurred by a mnemonic game while hiking in both fog and mountains, I am now trying to memorize GPS coordinates. But just how many of those little digits must I keep in my head? How big is a degree of longitude anyway?

Naively, we can divide the 40 megameter earth circumference by 360° and divide again by 60′ minutes and maybe 60″ again for seconds. And for latitude, that’s pretty damn close, about 15 cm short of a nautical mile. But like most spinning objects, the Earth is a little fat around the middle and not wrinkle-free, which throws a wrench in our trigonometry.

One latitudinal minute is 1842m on the equator, 1862 meters at the poles, with an average of 1852m defining a nautical mile, or roughly 111 km per degree. However, longitudinal lengths vary greatly as a trigonometric function of degrees from the equator, simplified as:

degree longitude = 111km * cos(latitude)

Using a bit more sophisticated equations, I’ve plotted a few longitudinal lengths (error < 1%):

latitude longitude (meters)
degree minute
111319 1855
15° 107550 1793
30° 96486 1608 (wiki: 1605.6m)
45° 78847 1314
60° 55800 930 (wiki: 925.2m)
65° 47176 786
70° 38187 636
75° 28902 482
80° 19393 323
85° 9735 162
90° 0 0

So, in Nuuk (64° North), a degree latitude is more than twice the length of one degree longitude (about 1858m vs. 815m per minute) and almost ten to one at 86°.

Putting a box around Nuuk, the downtown southwest corner is N 64°09.7 W 51°45.2 and the northeast corner (north of the airport and west of Qinngorput 2010) is roughly N 64°12 W 51°40. One significant decimal seems appropriate downtown for an order of 100m precision, while 1km precision should be good enough for finding an airport – on foot at least. Three significant decimals is more precise than GPS provides as of 2010.

Nuuk vejr

METAR, etc
2 day forcast3-9 day forcast

Xmonad on Lucid Lynx

While Gnome on Lucid Lynx is pretty and Gnome has a bunch of features that make window management a bit nicer than before (like Win-w,e,s,n,m) I immediately longed for a decent tiling manager. So, within ten minutes and without further regret:

Get the latest xmonad packages

Unlike Karmic, Lucid repositories have the latest version of Xmonad (0.9).

$ sudo apt-get update
$ sudo apt-get install xmonad dwm-tools feh

Switch window manger

If you’ve installed vanilla Ubuntu 10.04, you’ll want to switch from gnome-wm to xmonad.

$ gconftool-2 -g /desktop/gnome/session/required_components/windowmanager
$ gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string

Start xmonad from script

We’re changing one line of xmonad.desktop. Rather than start xmonad directly, we want to run the xmonad.start script.

$ sed s:^Exec=xmonad$:Exec=xmonad.start: /usr/share/xsessions/xmonad.desktop > ~/tmp.xmonad
$ sudo mv ~/tmp.xmonad /usr/share/xsessions/xmonad.desktop

$ sudo wget http://genaud.net/alex/2010/04/xmonad_files/xmonad.start -O /usr/local/bin/xmonad.start
$ sudo chmod +x /usr/local/bin/xmonad.start

Configure your own xmonad session

Note, you’ll need to type colon-quit (:quit) to exit the haskell compiler (ghci). Hopefully all modules load OK.

$ mkdir ~/.xmonad
$ wget http://genaud.net/alex/2010/05/xmonad.hs -O ~/.xmonad/xmonad.hs
$ ghci ~/.xmonad/xmonad.hs

Configure xmobar

Xmobar is activated from Win-p. Just start typing the first few characters of the command you want and hit enter.

$ wget http://genaud.net/alex/2010/04/xmonad_files/.xmobarrc -O ~/.xmobarrc

Finishing touches

Remove all the panel clutter and add pretty background image.

  • Delete the bottom panel ( Right click > Delete This Panel )
  • Autohide top panel ( Right click > Properties > Autohide )
  • Set a desktop image by uncommenting and modifying the “feh --bg-scale” line of /usr/local/bin/xmonad.start

Log in to xmonad session

The moment of truth… (oh wait, if you’ve never used xmonad before, take a look at the next section before it’s too late).

  • Log out
  • Click on your user
  • Select Sessions:xmonad (from the bottom, was GNOME)
  • Type password and Log In

Five important commands

There are more than a dozen commands. But that’s it. The steep learning curve immediately plateaus. Print a cheat sheet and you’ll be a tiling window master in no time. Here are perhaps the most important commands:

  • Win-Shift-Return – to open a terminal window
  • Win-Space – toggle between three columns, two columns, two rows, and full screen
  • Win-Return – make selected window the master window
  • Win-h – shrink master window
  • Win-l – expand master window

Some more commands

  • Win-Shift-c – close selected window
  • Win-1 (or 2,3,4,5,6,7,8,9) – switch workspace
  • Win-Shift-1 (or 2,3,4,5,6,7,8,9) – switch selected window to another workspace
  • Win-j (or Win-Tab) – select next window
  • Win-k (or Win-Shift-Tab) – select previous window
  • Win-Shift-j – switch selected window with next window
  • Win-Shift-k – switch selected window with previous window
  • Win-, – add another window to master area
  • Win-. – remove a window to master area
  • Win-p – start typing a program name, say “nau” for “nautilus”
  • Win-q – restart xmonad (useful after modifying xmonad.hs config)
  • Win-Shift-q – quit xmonad (quick way to log out)

If you Win-(left-mouse drag) you’ll pop (un-tile) a floating window. You can Win-(right-mouse drag) to change the size and Win-t to set the window back into the tile layout. Some people like this and claim it makes working with Gimp or other dialog boxes easier. At least one person disagrees.

In the animated sequence below, we have three windows. The spreadsheet (white) is the master along with two terminals. The animation demonstrates toggling between two full screen windows, then cycling through four layouts from full screen, three column, two column, two rows, and back to full screen. From the keyboard that would be: Win-j, Win-k, Win-Space, Win-Space, Win-Space, Win-Space, ad nauseum.

toggling between four different layouts

Tea Science

tea + water + temperature + time

Steeping the perfect cup of tea is a science. Most important of course are the tea leaves (or tips and/or stems), then the water, then temperature, then time. However, whether due to laziness or to ignorance, emphasis is too often precisely backwards.

For example, let’s take a typical but hypothetical New Jersey suburbanite. She uses the lowest quality tea dust, the stuff that fell through every conceivable crack in the cultivation, transportation, separation, and oxidization process (aka tea bags). She then dunks this powdered substance into a cold cup of cold tap water. Finally, she microwaves the tea cup from cold to boiling in precisely 2 minutes and 22 seconds. Why this particular time? Perhaps because 222 is convenient and produces a slightly better cup of tea that 111 or 333. I don’t know.

Time and temperature

Bitter tea is a product of steeping too long and too hot. Steeping too short or too cool will not extract much flavour. Of time and temperature, temperature is most important. Buy a thermometer and always preheat your teapot.

Do not trust recommended temperatures. Well, none but mine, of course. The recommendation is often, but not always, too high (I’ve never seen a temperature too low). I suspect this is based on the assumption that the average consumer will not preheat the teapot. Experiment; Get to know your teas.

Water

Tea is what — 99% water? You can do everything else right, but if your water sucks, so will your tea. An unfortunate population must boil a bitter perfumed black tea to mask foul liquid they call water. If you can not afford clean water, there are people who can help.

Tea

Tea quality is not entirely subjective. First of all, what may be called tea is not always, in fact, tea. Herbal ‘tea’ is not tea. Jasmine is not tea, nor is vanilla, rooiboos, bergamot, any type of fruit, oil, scent, spice, essence, perfume, grain, nor chemical. Only one humble species of plant, Camellia sinensis, is tea.

C. sinensis, also exclusively know as tea, has a few subspecies which are processed in generally four varieties, depending on the level of oxidization: white, green, oolong, and black. The quality of the leaves range from whole tips and leaves to powdered dust. Tea degrades in light and moisture. Otherwise, there is great diversity of flavour, colour, feel, scent, texture, and other subjective attributes.

Choosing a tea

Price is a poor gauge of quality or likely preference. My every day ‘table’ oolong from Fujian is half the price of a popular but inferior grade tea (purportedly from either France or Russia) and a seventh of the cost of a famous Wudong oolong I find nearly undrinkable. My absolute favourite oolong from Taiwan is priced somewhere between the latter two.


price of most recently purchased teas, from least to most appreciated
least appreciated $ / 100g most appreciated
7 76 17 47 11 11 16 28 20 38

Find the tea variety you like best. Let me suggest some starting points. Silver Needle is the finest white tea by definition, otherwise White Peony is a fine choice. Gyokuro is the best Japanese green, but Sencha is the cheaper gold standard. Oolongs range anywhere between flowery perfume to rich caramel roasts. Wuyi Oolong (at 85 C) is my benchmark for all teas. Similarly, there is an enormous variety of black teas, from the light (technically oolong) Darjeeling to Keemun, Assam, and finally the powerful (almost fishy) shu pu’erh.

To understand teas, you must resist the temptation to cloak tea in scents, fruits, or oils. If your tea is unpalatable without sugar then (A) your tea sucks, (B) you’ve stewed it too hot, or (C) you don’t actually like tea.

Preparing tea

For sampling teas, I recommend the Gongfu Cha Dao method (yeah, that’s right, the kungfu of tea). While the Japanese, British, and others have ritualized tea making and pomp, only the Chinese ceremony focuses on flavour above all else.

Until you’re a black belt kungfu tea master, you will require a thermometer, timer and a kettle. Additionally, kungfu tea requires a tiny teapot (1-2 dL), a cooling pitcher, small cups, and of course crisp spring water and fine tea leaves. The Taiwanese introduce a few other tools, though I insist only on a fair pitcher. If you’ve got a catching tray, lucky you; I use four plates on which I have a yixing teapot, two matching pitchers and on the last plate, four small thin wide cups.

Gongfu Cha animated

I pour hot (nearly boiling) water into the empty teapot and cooling pitcher. I place the thermometer into the cooling pitcher and wait for the appropriate temperature for the particular tea leaves (If I loose my zen, I may transfer some water between cups to accelerate the cooling process). When the temperature of the water in the cooling pitcher is almost perfect, I start boiling some more water and pour the teapot water evenly into the cups. In other words, get everything hot and slowly cool down.

I add the leaves to the teapot. Now the cycle begins.

I immediately pour the water from the cooling pitcher to the teapot (and tea). I set the timer (in reality, I just glance at the music player). I then refill the cooling pitcher with a fresh splash of nearly boiling water.

This last step is tricky and is what makes this something of an art. You want the cooling water to reach the perfect temperature at the same moment the tea has completed steeping. It’s actually a bit more complex than that; You don’t want to keep water perpetually boiling because it will loose oxygen and become flat, so you’ve got to sync the boiling, cooling, and steeped tea. This is kungfu, remember.

Anyway, once the tea has steeped at the perfect temperature for the perfect amount of time, pour your perfect tea from the teapot to the fair pitcher. Pour the perfectly warm water from the cooling pitcher to the teapot. Set the timer. Pour the tea from the fair pitcher to the emptied warm cups. Pour nearly boiling water from the kettle to the cooling pitcher. Enjoy your tea. Repeat.

To maximize this perfect absurdity, check out the Taiwanese additions which include scent cups. Each video on the net is worse than the next. Best of luck!