2007/06/05

SQL Server: Avoiding multiple record sets

I have a stored procedure which needs to execute other stored procedures in order to generate its results. Unfortunately, those nested stored procedures can perform SELECTs. The end result is that, instead of returning one record set, my stored procedure may return multiple record sets.

How to prevent this? According to http://databases.aspfaq.com/database/using-stored-procedures.html :

After the BEGIN command, we SET NOCOUNT ON -- this prevents interim statements from being returned as recordsets.


Does NOCOUNT really affect whether or not multiple record sets are returned? Not when you're dealing with nested execution of stored procedures...

The only solution I can find is to create a temporary table, in the calling stored procedure, and to dump the results of the called stored procedure into that temporary table, then to delete it.


CREATE TABLE [#unused] (foo REAL, bar REAL);
INSERT INTO [#unused] EXECUTE my_nested_sp @arg1, @arg2;
DROP TABLE [#unused];

Westinghouse service (?)

Last year we bought a Westinghouse LVM37w3. It's a great monitor, and it does a great job of displaying output from a Sony HD camcorder.

Well, it used to. Early this spring it started flaking out. After it had been on for awhile the backlight would suddenly go out, leaving us with audio and a pitch-black screen. To get the picture back we had to cycle the thing off and on again.

After reading a few anecdotes online, which claimed that others had cured this problem by resetting to factory defaults, we gave it a try. The change was noticeable. Now, as soon as the monitor was powered up, the backlight would go out.

Luckily the monitor was still, barely, under warranty. We called Westinghouse tech support (1-866 -287-5555), who said they would call us with an RMA number within a couple of days.

After a week, tired of waiting, I called them again. They had the RMA number and claimed they had left it on our answering machine. I wonder whose answering machine they really left it on, but no matter: we shipped off the unit at considerable expense (a couple hundred dollars).

It has been gone since May 3rd. Checking the status of the unit has been painful: call Westinghouse tech support, ask for a status update, hear the poor staffer on the other end explain that (s)he needs to submit a status request to the warehouse and to call back in two or three days.

For the past two weeks the answer has come back that the monitor has been repaired, but is still listed as "processing" by the warehouse. They will call me as soon as they have a UPS Ground tracking number. (They haven't called yet.) If I don't hear from them within a week, please call again for an update.

Something sure seems fishy here. Or at least incompetent.

MarsEdit 1.2: Growl, Picasa and Vox!

MarsEdit1.2.jpg

MarsEdit 1.2: Growl, Picasa and Vox!:

MarsEdit 1.2 is now available for download (or just ‘Check for Updates’ from the app). This is a free update for all registered MarsEdit users.

Three relatively big changes in this release: [...]

Picasa image uploads for Blogger.com. This is pretty transparent. Just select your Blogger blog as the upload target from Images & Files, and MarsEdit will pop the images into a MarsEdit album in your Picasa Web Albums account. Note that Picasa only accepts JPG format images for upload.



Woohoo! I've been wanting this for a long time. And it looks like it works just fine!

Thank you, Daniel Jalkut.

2007/06/04

"REPLACE INTO" for SQL Server

MySQL has handy syntax which lets you look for a record by primary key and, if it exists, update its fields; otherwise insert a new record.

I wish something similar existed for SQL Server. If it does, I can't find it. But there is another way to achieve a similar effect, without too much typing:

BEGIN TRANSACTION;
DELETE FROM my_table WHERE prim_key = @prim_key_val;
INSERT INTO my_table (prim_key, other_field)
VALUES (@prim_key_val, @other_field_val);
COMMIT;

I'm probably missing something; haven't thought this through very carefully.

Cottonwood Rumble


Cottonwood Rumble 1
Originally uploaded by Mitch Chapman
I've been meaning to call a tree trimmer. But I really thought the dead branches were the biggest threat.

2007/06/02

One smart baby

When Bobi brought Aigerim home from Kazakhstan she was not quite nine months old -- way too young to talk.

Aigerim has a stuffed pig of whom she's very fond. Almost from the moment she saw it she's been calling it "n'Goita" or "Nyáh-do" or "Nyáh-da". (We live in New Mexico, so of course we've been repeating this as "Nacho" or "Puerco Nacho".)

But she also uses this word for other things. Typically, she'll repeat it insistently, arms outstretched, while leaning way out from whomever's holding her, as she tries to reach some object.

Lately Bobi has begun to think this might be a word from the Baby House. So this morning we pulled out the Langenscheidt Russian to check. A search in the English section for "want", "give", etc. turned up nothing. But then I flipped over to the Russian section, and there it was:


Надо - need, want


What an awesome little girl.

2007/05/31

China's Solar-Powered City: Rizhao : MetaEfficient

China's Solar-Powered City: Rizhao : MetaEfficient:

"
In Rizhao [City, China], 99% of households in the central districts use solar water heaters, and most traffic signals, street and park lights are powered by photovoltaic solar cells. In the suburbs and villages, more than 30% of households use solar water heaters, and over 6,000 households have solar cooking facilities.

The achievement was the result of an unusual convergence of three key factors: a government policy that encourages solar energy use and financially supports research and development, local solar panel industries that seized the opportunity and improved their products, and the strong political will of the city's leadership to adopt it.

Mayor Li Zhaoqian explained: "It is not realistic to subsidize end users as we don't have sufficient financial capacity." Instead, the provincial government invested in the industry to achieve technological breakthroughs, which increased efficiency and lowered the unit cost.


Found via Ottmar Liebert.

2007/05/22

Did a comet wipe out prehistoric Americans? - space - 22 May 2007 - New Scientist Space

Did a comet wipe out prehistoric Americans? - space - 22 May 2007 - New Scientist Space:

The Clovis people of North America, flourishing some 13,000 years ago, had a mastery of stone weaponry that stood them in good stead against the constant threat of large carnivores, such as American lions and giant short-faced bears. It's unlikely, however, that they thought death would come from the sky.

According to results presented by a team of 25 researchers this week at the American Geophysical Union meeting in Acapulco, Mexico, that's where the Clovis people's doom came from."


These claims are pretty wild, but they're interesting. If the researchers are right, the Clovis people didn't kill off all the big North American mammals and then starve to death. Instead the lot were wiped out by hellfire and brimstone. Or, rather, by ice, rock and dust that started some very big fires.



Update: If you have an online subscription to Scientific American, the New Scientist article above might make an interesting contrast to this recent article on restoring Pleistocene-era big mammals to North America.
The theory--propounded 40 years ago by Paul Martin of the University of Arizona--is that overhunting by the new arrivals reduced the numbers of large vertebrates so severely that the populations could not recover.


Also see the Pleistocene Rewilding website. It looks like White Man's Burden with a paleontological twist.

2007/05/17

ONLamp.com -- Tools for Geographically Distributed Software Development

ONLamp.com -- Tools for Geographically Distributed Software Development.

Lots of familiar stuff. Some items, such as writewith, are news to me and worth investigating, since all of my projects now involve distributed teams.

2007/05/05

n'Goita

"n'Goita" is one of Aigerim's favorite words. Google didn't turn up any matches, so I thought I should create a definition page for it here.

Sometimes she says "n'Gah'ta" instead. We think this is her name for Ceniza.

2007/05/03

Real ID: Mark of the beast

National ID card a disaster in the making | CNET News.com




I wonder why those who are charged with national security so often converge on solutions which destroy the freedoms they are supposed to protect.

In a recent CNET article Mssrs Forno and Schneier summarized the Real ID national identity system system, which was approved by Congress after having been buried in a 2005 "must pass" military spending bill.

There is something in the system to worry everyone. Christians may see aspects of the mark of the beast. Jews may see reminders of sufferings they have already endured. IT types will note the increased risk of identity theft inherent in a national identity database.

... the functionality of a single database remains intact under the guise of a federated data-interchange environment.

...the very last paragraph of the 160-page Real ID document deserves special attention.,, DHS declares that states are free not to participate in the Real ID system if they choose--but any identification card issued by a state that does not meet Real ID criteria is to be clearly labeled as such, to include "bold lettering" or a "unique design" similar to how many states design driver's licenses for those under 21 years of age.

In its own guidance document, the department has proposed branding citizens not possessing a Real ID card in a manner that lets all who see their official state-issued identification know that they're "different," and perhaps potentially dangerous, according to standards established by the federal government. They would become stigmatized, branded, marked, ostracized, segregated. All in the name of protecting the homeland; no wonder this provision appears at the very end of the document.

2007/05/02

Hacking Your Body's Bacteria for Better Health -

Wired recently ran an article on probiotics. It had so many interesting observations that I've had a hard time summarizing it.

Okay, the summary is that we need bacteria in order to stay healthy.

Hacking Your Body's Bacteria for Better Health:

We assassinate microbes with hand soap, mouthwash and bathroom cleaners. But some scientists say ... all this killing may actually cause diseases like eczema, irritable bowel syndrome and even diabetes.

"Probiotics have resulted in complete elimination of eczema in 80 percent of the people we've treated," says Dr. Joseph E. Pizzorno Jr., a practicing physician and former member of the White House Commission on Complementary and Alternative Medicine Policy. Pizzorno says he's used probiotics to treat irritable bowel disease, acne and even premenstrual syndrome.

"After the Second World War, when our lifestyles changed dramatically, allergies increased. Autoimmune diseases like diabetes and inflammatory bowel disease are increasing," says Kaarina Kukkonen, a University of Helsinki allergy expert.

Microbial exposures early in life, scientists believe, cause mild inflammation that calibrates the body's responses to other pathogens and contaminants later in life. Without exposure as infants, researchers say, people can end up with unbalanced immune systems.

"Many of the most difficult problems in medicine today are chronic inflammatory diseases," says Blaser. "These include rheumatoid arthritis, lupus, atherosclerosis, eczema and multiple sclerosis. One possibility is that they're autoimmune or genetic diseases. The other possibility is that they are physiological responses to changes in microbiota."

2007/05/01

Microsoft's Silverlight

Microsoft has announced details of their competitor to Flash -- and to JavaScript, and to ... It's called Silverlight.

To me the most interesting thing about it is that it allows developers to build browser-side web apps using Python and Ruby instead of JavaScript.

Silverlight apps can use a subset of the .NET framework. Embedded video can run at HD revolutions up to 1280x720.

It all looks pretty interesting. It'd be more interesting if it provided a 3D API; but so far I see no evidence of that.

2007/04/27

Sun eyes a JavaScript alternative to AJAX

Sun eyes a JavaScript alternative to AJAX:

"

(InfoWorld) - Sun Microsystems is working on Web application development technology that presents an alternative to AJAX (Asynchronous JavaScript and XML), a Sun official said on Thursday.



The company's Project Flair is an open-source project now in development... A version of Flair for developers to experiment with is eyed for release later this year.


Small and simple, Flair presents a 'great vehicle for experimenting with [what] I guess what you would call, sort of, collaborative object development, that kind of thing,' said Ingalls.


'AJAX sort of deals with all of the old way of doing things. It makes it simpler ... but underneath it’s still all this junky HTML, Document Object Model, CSS, all that stuff, where 30 years ago, we knew how to do that stuff cleanly with a dynamic programming language and a simple graphics model,' Ingalls said.


'Flair takes us back to that simple model and adds the collaboration [and] Web access to it,' he said.




Anybody have links to more details on Project Flair?

2007/04/23

American's imprisonment in Kazakhstan sends chilling message - International Herald Tribune

American's imprisonment in Kazakhstan sends chilling message - International Herald Tribune:

"Despite all the Western donor money and American-financed projects aimed at reforming the judiciaries here," said Michael Hall, an analyst in Bishkek, Kyrgyzstan, with the International Crisis Group ... "this is all part of a bigger Central Asian trend to make their judicial systems subordinate to their presidents."

"The result is a significant retreat in America's ability to project its public and business interests in the region," he said.

"Plus, the U.S. has suffered a massive loss of credibility when it comes to talking about the rule of law and independent judiciaries in the wake of the abuses we've been hearing about in places like Guantánamo." (emphasis added)


The last paragraph is a sideline to the main story. But it shows again that it's in the best interests of the United States to treat its prisoners humanely. Any abuse we lay on our prisoners (call them what you will) can be used as a justification for the mistreatment of U.S. citizens.

Duck and Cover: Ancient Mass Extinctions Caused by Cosmic Radiation

Ancient Mass Extinctions Caused by Cosmic Radiation, Scientists Say:

"Cosmic rays produced at the edge of our galaxy have devastated life on Earth every 62 million years, researchers say."


Not all mass extinctions are explained by this theory. For example, the KT boundary event probably has another cause.

But what an interesting idea: our galaxy is moving "flat-faced", like a pie in a pie fight, relative to surrounding material. A shock wave is generated where galactic matter comes into contact with the surrounding hot gases, and cosmic radiation is generated at that same point.

Periodically on its 225-million-year galactic orbit, our solar system rises up out of the galactic plane, closer to the shock wave, where it is exposed to more of the incoming cosmic radiation than normal.

Researchers aren't sure about the consequences of the increased radiation. Greater ozone depletion may allow more of the radiation to reach the earth's surface and into its oceans. Other effects may include changes in cloud cover, etc.

One possibility is that organisms receive harmful doses of radiation from high-energy particles known as muons, which are produced by cosmic rays colliding with Earth's atmosphere.

"Cosmic rays themselves are not really that dangerous," said Medvedev. "They create [charged particles] that propagate down through the atmosphere—especially muons that can go below the sea level."

Russia's former president Yeltsin dies: Kremlin | Reuters

Russia's former president Yeltsin dies: Kremlin | Reuters:

Many Russians initially viewed Yeltsin as a hero for dismantling Communist rule. His finest hour came when, in 1991, he clambered onto a tank and raised his fist in defiance of hardline coup plotters who wanted to turn back the clock.

...in 1989 he was elected to the new Soviet Congress of People's Deputies and in June 1991 he was elected president of Russia -- still within the Soviet Union -- in a landslide.

Two months later, he faced down tanks in the Moscow streets...


2007/04/18

Make your own Ghost Map

From Paul Kedrosky: Twitter for Hypochondriacs:

Who is sick? is a clever idea, and similar in many ways to my 'what's going around?' idea. It allows people with symptoms of something or another -- bloody stool! sniffles! cough! muscle ache! -- to add their location and symptoms to a map.

Why clever? Because it is the data-rich beginnings of grassroots epidemiology via capturing the kinds of conversations that usually only happen in doctors' offices. You, know, 'You have a cold. That's going around'.


Gee, it's like a modern, collaborative version of The Ghost Map.

2007/04/04

Why it's called "good" cholesterol

Technology Review: Imaging Cholesterol Buildup in the Heart: " Normally, HDL passes through arteries and attaches to low-density lipoprotein (LDL), or 'bad' cholesterol, carrying it out of arteries to the liver."

'Course that's not what the article is about. Researchers have found a way to attach markers to segments of unstable arterial plaque, using altered HDL. As a result, they can better see where unstable plaque has built up in a patient and can better identify problems which increase the risk of heart attack.

2007/04/02

Light Therapy Spares the Scalpel and the Chemo -

Light Therapy Spares the Scalpel and the Chemo -


Imagine you could treat cancer by taking a pill, then directing a laser light toward the location of the tumor. The growth would dissolve with no chemotherapy, and no harm to healthy tissue.

It might sound futuristic, but a select number of cancer patients already benefit from the method, called photodynamic therapy. An upgrade for the procedure could save thousands more cancer patients from the horrors of chemotherapy.

Although chemotherapy has improved over the past decade, the treatment still damages healthy tissue and causes other unpleasant side effects like nausea and a weakened immune system. The researchers hope their work will spare patients from chemo's ravages and even the surgery usually necessary to remove a tumor.

2007/03/27

TI demos its movie projector in a phone | CNET News.com

TI demos its movie projector in a phone | CNET News.com


At the CTIA Wireless 2007 show, TI is providing public demonstrations of its digital light processing (DLP) 'pico' projector, a tiny movie projector that can fit inside a cell phone.

TI showed off the components and a prototype at the Consumer Electronics Show earlier this year to a few reporters. Now the company is touting a working prototype in a phone. The phone is fake, but the projector works.


I expect someday this is what laptop displays will look like. Why waste physical space and weight, provided you can find or create a flat viewing surface?

2007/03/05

TextMate, Parallels, and Visual Web Developer 2005 Express Edition

I've been using TextMate for the past two years, and like it so well that I have a hard time adjusting to most other text editors. Even my old favorite, XEmacs, is now painful to use.

I recently started work on my first ASP.NET project. The customer wants the whole thing to be done with VB.NET -- another first for me.

Lots of bundles are available for TextMate, and among them is an "ASP vb.NET" bundle. Yippee! Since my Windows XP "machine" is a VM hosted under Parallels, I can develop my project in a shared folder. [Edit 2007/03/06] On the Mac side I can use the Finder's "Network" sidebar entry to connect to my VM and mount the shared folder. TextMate sees it just fine. I get to use all of the toys at once.

Almost... I think it's because of filename limitations in NTFS, but I can't check out a working copy of my subversion repository into such a shared folder -- not from the Mac side. Trying to do so fails when subversion tries to check out a file whose name contains more than one period (".").

The simplest solution seems to be to to install the excellent TortoiseSVN under XP, and to check out the working copy from Windows. In order to avoid entering my ssh password 400 times, I've also installed PuTTY and used it to generate a private/public key pair for use with the subversion server.

Parallels really makes for some head-twisting fun. Recently I attended a web meeting using GoToMeeting, running in a Parallels VM. Instead of scrambling madly to keep notes on paper, I recorded the whole thing as a QuickTime movie using iShowU, running natively on Mac OS X. Let's see, that's a screencast recorded on a Mac, of a web conference running in a Win XP virtual machine hosted on the Mac.

2007/03/01

Mars Melt Hints at Solar, Not Human, Cause for Warming, Scientist Says

Mars Melt Hints at Solar, Not Human, Cause for Warming, Scientist Says: "Simultaneous warming on Earth and Mars suggests that our planet's recent climate changes have a natural—and not a human-induced—cause, according to one scientist's controversial theory."

"Man-made greenhouse warming has made a small contribution to the warming seen on Earth in recent years, but it cannot compete with the increase in solar irradiance," Abdussamatov said.


Abdussamatov is not alone in his beliefs. Last fall a group of German researchers also concluded that the sun was the primary cause of the historically recent increases in global mean temperature. [insert URL here]

Humans have a significant effect on this planet. Pick a satellite image, any image, and it's obvious that we've been here :) And of course we could soil our environment so badly that we die out.

Still, the hand-wringing over climate change often sounds like an oblique claim to importance. Dominion over the animals, created in God's image, etc. It's an anthropocentric world-view that even atheists can embrace. So reminders of the relative importance of the sun are good for our humility.

Unfortunately, the article notes several reasons why Abdussamatov's claims are met with skepticism. Mars has much bigger orbital wobbles than Earth, so it endures bigger climate swings. Greenhouse gases are important to our climate; without them life probably wouldn't have flourished here. Etc.

Abdussamatov does offer a way to test his claims, but it will take some time:
"The solar irradiance began to drop in the 1990s, and a minimum will be reached by approximately 2040," Abdussamatov said. "It will cause a steep cooling of the climate on Earth in 15 to 20 years."

N. Korea vows to denuclearize in talks - Yahoo! News

N. Korea vows to denuclearize in talks - Yahoo! News: "SEOUL, South Korea - North Korea's No. 2 leader pledged his country's commitment Thursday to giving up its nuclear program amid intensifying diplomacy aimed at implementing Pyongyang's pledge to disarm."

Based on seismic readings, North Korea's nuclear test last fall might have been a dud. Could this be one reason (coming as a distant second to the prospect of mass starvation) for the North's commitment to disarmament?

2007/02/28

Spotlight, LaunchServices and backup volumes

When I select a file in the Finder and right click to "Open With ->", the system pauses, my backup hard drive spins up, and I get a menu showing 5 or 6 duplicate entries for, say, VLC.app.

My backup volume is often online, so it's visible to LaunchServices and Spotlight, et al. Maybe this is the root cause of my problem. But I need to leave the backup volume online because it shares a hard drive with other volumes that I need.

What to do? Is this a problem with Spotlight? With LaunchServices? Regardless of Finder misbehavior, I don't want Spotlight indexing my backup drive; it's just a mirror of my boot volume. Time for some googling.

Spotlight Indexing



From ~stevenf: Disabling Spotlight for a Volume: To see if indexing is on for a volume:
$ sudo mdutil -s /Volumes/Backup


To get rid of the index for a volume and ensure that it is not re-indexed in future:
$ sudo mdutil -i off -E /Volumes/Backup


I've just performed these steps and will see if it works following my next backup.

I'm using SuperDuper to do periodic, full backups. Their forum says that SD will honor Spotlight indexing preferences for a target volume:
As of v2.0, when used with Tiger 10.4.3 or later... just add the volume to the Privacy tab of the Spotlight preference pane. We'll automatically ensure that that state is maintained, and all should work fine.


Of course I can't figure out how to add the volume to the Spotlight preference pane. I've tried dragging it in, but it doesn't show up in the list. Hence the above shell commands.

LaunchServices Caching



Since LaunchServices is already caching redundant references to my backed-up apps, with apparent disregard for duplicate (Unix) pathnames. So I also need to clear its cache. I've used these steps:

$ cd /Library/Caches
$ sudo rm com.apple.LaunchServices-*.plist


I've also restarted my system, since I didn't know whether it would suffice to log out and back in, or to simply kill launchd from within Activity Monitor.

Just now everything is looking good.

2007/02/26

A Breath of Fresh Air: To Fight TB, Open a Window: Scientific American

A Breath of Fresh Air: To Fight TB, Open a Window: Scientific American: "Escombe says the riskiest areas of hospitals are waiting rooms and other places where people congregate before being diagnosed. In a prior study, he and co-workers found that 30 percent of emergency department staff in a Lima hospital became infected with TB during a year."

Installing mod_python for Python 2.5 on Mac OS X

Django wants to be served from behind Apache, using mod_python. I want to use Python 2.5, but the MacPorts/DarwinPorts mod_python port wants to use Python 2.4.

I downloaded mod_python 3.3.1 from the mod_python downloads page and was able to install in a few easy steps:

$ ./configure --with-apxs=/opt/local/apache2/bin/apxs
$ make
$ sudo make install
$ sudo vi /opt/local/apache2/conf/httpd.conf
# Add this line
LoadModule python_module /opt/local/apache2/modules/mod_python.so


Then restart the web server.

All of the warnings in the mod_python README about Mac OS X 10.2.x and Python and libtool and static libraries appear not to matter for OS X 10.4.

Testing w. Django



To test the installation I set up a virtual host pointing to my Django app, following the instructions in the Django docs.

The hardest part was realizing I needed a virtual host (the IP address for which I hardwired into my /etc/hosts file). That was the easiest way to let my app continue to use its absolute URL paths; learning how to adapt to different installation "mount points" looked a bit harder.

The next hardest part was putting the subversion workspace for my project where the web server user (www) had permission to traverse to it.

Integrating MacPorts Apache 2 with System Preferences

Just returned from PyCon 2007, and wanted to try out a few of the new web frameworks tools I'd seen. To get started I needed to be running my own installation of Apache, instead of the system default installation. The latter does not AFAIK include sources, and that makes it difficult to add things like mod_fastcgi.

Install Apache 2


I used the MacPorts/DarwinPorts version of Apache 2:
$ sudo port install mod_fastcgi


Configure /etc/hostconfig


Following hints from elsewhere on the web, I tried to ensure Apache 2 would start at system boot by adding this line to /etc/hostconfig. (Haven't tested this yet.)
WEBSERVER=-NO-

APACHE2=-YES-



Fake Out System Preferences


To tell System Preferences Sharing->Personal Web Sharing to start Apache 2 rather than the system default Apache 1.3:
$ cd /usr/sbin
$ sudo mv apachectl apachectl-1.3
$ sudo ln -s /opt/local/apache2/bin/apachectl apachectl
$ pushd /opt/local/apache2/conf
$ sudo cp httpd.conf.sample httpd.conf
$ sudo vi httpd.conf
# Add this line somewhere near the DocumentRoot directive
PidFile "/private/var/run/httpd.pid"


Move Static Content and CGIs


I made sure System Preferences was able to start the new web server, and then double-checked that I actually was getting content from my new document root :) Then it was time to move static content from /Library/WebServer/DocumentRoot to /opt/local/apache2/htdocs, and cgi-bin executables from /Library/WebServer/CGI-Executables to /opt/local/apache2/cgi-bin.

Copy CGI-Bin Configuration Directives


Finally I had to copy the configuration section for my Trac projects to /opt/local/apache2/conf/httpd.conf.

All done.

Update



Oops, not quite. I want the log files to be under /var/log/httpd, where Console.app expects to find them. So CustomLog and ErrorLog need to be fixed up in all of the *.config files under /opt/local/apache2/conf/.

2007/02/04

New Scientist: Vaccine zaps allergy in record time

Vaccine zaps allergy in record time - health - 04 February 2007 - New Scientist

I've often wondered why an effective treatment for an allergy is to expose the sufferer to more of the allergen. According to the article (emph. added):

Existing vaccines for allergies involve three to five years of regular injections with increasing amounts of allergen... All the while the immune response slowly changes from a predominance of T-helper 2 (TH2) cells, immune cells responsible for triggering allergic reactions, to T-helper 1 (TH1) cells, which stimulate the production of protective antibodies.


So the trick is to make sure the vaccine contains only a small dose of the allergen -- so as not to kill the subject? And yet, as the article says,
Because nothing is directing allergens to the right place in immune cells, it takes a lot of allergen to generate a response.


The new vaccine is structured to deliver the allergens/antigens to the right places.
"[Components in the new vaccine] lower the dose needed to induce a T-cell response by a factor of about 100," says Reto Crameri of SAIF, lead author of the study.

2007/02/02

What made the 1918 flu contagious?

Pandemic flu may be only two mutations away - health - 01 February 2007 - New Scientist Space

What a virus needs to spread, the CDC team concluded, is an ability to bind 2,6 sugars, whether or not it needs this to replicate... One clue, they speculate, is that ferrets with non-contagious viruses... do not sneeze. Contagious ferrets do.

“The cells with 2,3-sialic acid receptors have been associated with the bronchial mucins,” Tumpey told New Scientist. This viscous secretion might inhibit these viruses, and prevent the irritation that causes sneezing, which “may contribute to the spread of influenza, at least in ferrets”.

...the CDC results suggest finding out what mutations make H5N1 bind to 2,6-sialic, as those could make it contagious.

2007/01/14

Multi-touch

One of the most interesting traits of the upcoming Apple phone is its multi-touch user interface. I'd never heard of multi-touch until about a year ago, when Jeff Han's NYU website made the blog rounds.

This evening I finally tripped across the first public demonstration of NYU's multi-touch interface, from last February's TED conference. It's a fascinating presentation, especially when Mr. Han begins musing on data visualization applications. (And it's pretty cool when the audience "gets" it.) He makes it easy to imagine new ways of interacting with molecular depictions and n-space grid projections.

The NYU website carries a new teaser:

Yes, we saw the keynote too! We have some very, very exciting updates coming soon- stay tuned!

Fun times.

2007/01/04

27B Stroke 6

27B Stroke 6:

"When President Bush signed a long overdue postal reform bill on December 20, 2006, he added a few footnotes, including one that exempted the government from needing to get a court order to open mail when there was a 'need to conduct searches in exigent circumstances, such as to protect human life and safety against hazardous materials, and the need for physical searches specifically authorized by law for foreign intelligence collection.'

That led to this AP story, which said that the move 'might have opened the way for the government to open mail without a warrant.' I think clearer language would be that the move clarifies that the government believes it can open mail without a warrant.


These buggers are nibbling away at our freedoms. I wonder if mine will be the generation which finally lets them have it all.

Trivial, but related: Bobi, Aigerim and I tried to visit our parents during the holidays. We made it to Denver. Our luggage got all the way to Lincoln. When it returned, the gift wrap on the presents in my checked bags was torn. Re-wrapping the gifts to send by mail, I found they'd been opened and re-sealed with cheerful "TSA" tape.

All for our safety and security.

2006/12/30

Global Voices Online » Blog Archive » Kazakhstan: where are we going to be in 15 years?

Global Voices Online » Blog Archive » Kazakhstan: where are we going to be in 15 years?.>

Interesting synopsis of the recent past of Kazakhstan, with several guesses as to the future.

Leila Tanayeva:

15 years ago we were different: we had huge lines to the shops that had nothing to sell, we experienced electricity black-outs, lack of heating, state monopoly on everything and huge inflation.

15 years have changed us: we now have polite salespeople in Gucci stores, we go to corporate parties with our colleagues from multinationals, and we travel around the world (that is when we are asked about Borat’s film!).


When Bobi and I were in Karaganda, our translator Olga explained to us that many of the signs of commerce we saw -- a business in practically every building, cell phones everywhere, fresh bananas from Ecuador in every shop, supermarkets reminiscent of the Åhlens in Linköping -- had not existed even seven years ago.

She remembered her first cell phone and its volatile signal strength. "Sitting in the back of my classroom I could get a signal, moving away from a window I could not." (Sounds like every cell phone I've ever had...)

She laughingly remembered the sudden appearance of oranges. They didn't have much else, she said, but they all carried oranges because they could.

For a few days in September (and, I hear, again in the spring), parts of Karaganda still have electricity black-outs. And the whole city has no water during that same period, while the city engineers switch the hot water on. But these are planned outages, probably not what Leila referred to.

Adam Kesher:
...those in the middle were waiting for democracy and money, poor were waiting for money and democracy, and [those having] oil-riches - for money, without democracy...


That's a noteworthy detail for those engaged in rebuilding countries: when you lack food, shelter, clothing and democracy, you may be least interested in the last of these. Let's eat, then let's talk about voting rights.

I guess we could stand to remember that democracy is a luxury here, too, one easily lost through neglect.

2006/12/22

Where news stories go to die

Where news stories go to die:


By Marc Hedlund


The Homeland Security Department admitted Friday it violated the Privacy Act two years ago by obtaining more commercial data about U.S. airline passengers than it had announced it would...


Even so, in a report Friday on the testing of TSA's Secure Flight domestic air passenger screening program, the Homeland Security department's privacy office acknowledged TSA didn't comply with the law. But the privacy office still couldn't bring itself to use the word 'violate.'


There's no better way to try and bury [this story] than to release it on the slowest news weekend of the year.



They must really not want you to know about it. I want the opposite, so I'll post this again in the New Year.




Go get 'em, Marc.

2006/12/16

The Mummies of Xinjiang and the Amazons

Too busy to yammer at length -- getting ready for Christmas.

From Discover Magazine, 1994: The Mummies of Xinjiang, comes another reference to the Golden Warrior:


...also, in 1970 in Kazakhstan, just over China's western border, the grave of a man from around the same period yielded a two-foot-tall conical hat studded with magnificent gold-leaf decorations. The Subashi woman's formidable headgear, then, might be an ethnic badge or a symbol of prestige and influence.


This week the local PBS HD station aired "Secrets of the Dead: Amazon Warrior Women", about archaeological investigations related to the legend of the Amazons. It focused on the work of Drs. Jeannine Davis-Kimball and Leonid Yablonsky, and showed that there could be something to Herodotus's claims that the Amazons married into tribes on the steppes.

At the conclusion of the story Davis-Kimball and her colleagues analyzed the mtDNA of Meiramgul Khoja, a nine-year-old Kazakh nomad living in western Mongolia. They found a direct link to a 2500-year-old warrior priestess whose body was buried beside the Ilek River near the Russia-Kazakhstan border.

The show left a few questions. For example, how did the German forensics experts determine that their reconstruction of the warrior princess should have dark hair? The decision must have had some rational basis, because it was enough to make Davis-Kimball question her efforts to find a light-haired woman among the Kazakh nomads.

Questions aside it was an interesting episode. Makes me want to go a-Googling in several directions at once -- nomads, steppes, the Circassians, less-relevant topics like Bukar Zhirau...

2006/11/28

Copying Syntax-Highlighted Text from TextMate

TextMate has great syntax highlighting skills. Sometimes I'd like to copy code snippets from TextMate to VoodooPad, and I'd like to bring along the text highlighting. A simple copy-and-paste from the TextMate edit window doesn't do the job -- after all, it's a text editor.

Fortunately it is possible to copy with syntax highlighting. The procedure is pretty simple, if a bit obscure.


  1. Select the text of interest in TextMate.
  2. Select Bundles->Experimental->View Document as HTML
  3. A new "View Document as HTML" window should appear.
  4. Select the text in the window and copy it to the clipboard (Command-C).
  5. Switch to Voodoopad and paste (Command-V).

What About MarsEdit?


With a little more work you can paste syntax-highlighted snippets into MarsEdit.

Start out as above. Once the "View Document as HTML" window appears, select View->View Source. Another new window should appear which contains raw HTML.

Select it all (Command-A), copy it (Command-C), switch to your MarsEdit window and paste (Command-V). But first you'll need to re-work the content a bit, since it includes a <style> section which applies to your entire post.

Be sure to collapse the entire style section onto a single line, lest Blogger should insert a bunch of <br/> tags.


Here's an existence proof:



def geoMean(x, y):
"""Get the geometric mean of x and y."""
return math.sqrt(abs(x * y))



2006/11/26

Changing Mac OS X File Icons

I thought that, if you wanted to set the icon for a non-application file in OS X, you had to go through a convoluted process that involved copying the icon from another document. But it turns out you can just compose your icon with your favorite graphics tools, then copy and paste it into place.

For example, I wanted to change the icon on a QuickTime movie file. Here's what I had to do:


  1. Draw the icon graphics in OmniGraffle.

  2. Select the icon graphics.

  3. Edit->Copy (Command-C).

  4. Switch to the Finder.

  5. Select the QuickTime movie file.

  6. File->Get Info (Command-I).

  7. Select the document icon in the top left of the info window.


  8. Paste in the new imagery (Command-V).



Sweet!

2006/11/21

Lonely Planet finally discovers Kazakhstan

When we were preparing for Bobi's first adoption trip to Karaganda, we were surprised at the dearth of travel information for Kazakhstan. Even Lonely Planet seemed to know nothing of the world's ninth largest country.

Thanks in part to Sacha Cohen they're finally catching up.
Lonely Planet | On the Road.

2006/11/12

Midterms

Many of my friends are downright gleeful about the outcome of the mid-term elections. Some are registered Democrats who vote a straight party line (how can thinking people do that?), so of course they're happy. But even those of independent persuasion act as if they've steered our country onto a new course. I'm betting we've just jumped out of a Ford and into a Chevy, and have resumed driving down the same road.

Lemme try to persuade myself otherwise.

Good leaders can emerge from the two-party system. Harry Truman was a devoted Democrat who came to national politics by way of the Missouri political machine. Ironically, he was a student of world history who revered democracy. By most accounts he did good things for our country and for the world.

The two parties can effect change. In 1994 the Republicans took control of the House of Representatives. They had made a list of specific things they'd accomplish in the bargain. They delivered on one promise which most people could agree was good: they balanced the Federal budget.

(Granted, the budget didn't stay in balance long enough to make a dent in the national debt, and we're still going to be in a world of hurt when the baby boomers retire. But as a frustrated member of the Concord Coalition I was encouraged.)

It is still possible to choose representatives, not brands. From Doc Searls:

"Some of the best evidence of voter independence comes from the Lieberman election in Connecticut. Forget how you feel about the candidate. Look at what the voters did. They elected an independent candidate who had lost the primary of the party that 'won' the national race for seats in Congress. Something independent was happening there. It was bigger, and deeper, than partisanship. As Dave puts it, we've never had so much power."

Hm. Feeling a little better... Still, I'm going to set my expectations low. If this congress can weaken the Military Commissions Act of 2006 I'll call the midterms a success.

2006/11/10

Welcome to Mountain Standard Time

For her first 11 days in New Mexico little Aigerim had a really hard time getting to sleep. If somebody was awake and in the room with her she would squirm and play through the middle of the night, just as if it were mid-day. (Which, of course, it was, in Kazakhstan.) And if she were put in her crib? She would howl like a wounded beast. Didn't matter whether the lights were on or not. Of course she'd sleep soundly during the day.

This week we tried something different. I'd come over every morning at 8 to bring hot coffee to Mom and warm formula to Aigerim. Bobi would sneak in a quick shower while Aigerim topped off her belly. Throughout the day Bobi's mantra was, "Keep the baby awake," (except for one short nap).

It worked. Aigerim has slept through the night for four nights in a row. And she has been getting sleepy earlier and earlier. Last night she was lights-out by 8:30, which puts her almost on her Malutka schedule.

It helps enormously that she's bonding so well with Bobi. Before, unless she was totally exhausted, she would start crying the instant she touched the crib. Now she knows everything is okay. Mom is there for her, to sing lullabies and rock her to sleep, and again to greet her with hugs and kisses (and a bottle) in the morning.

The baby loves hanging out with us in the living room in the evenings, playing and grunting and making little babbling sounds. She gets so happy at our noises that she has to stand up, big tongue-lolling smile, and bounce vigorously for a few seconds. We know she's getting sleepy when her head suddenly plops down on the back of the couch, or on Mom or me. A few rounds of bouncing and plopping and she's ready to snooze.

It's pretty wonderful to see her happy again, just like the baby we met in Kazakhstan.

2006/11/09

Kazakhstan: Rules of the Road

Bobi and I live in Santa Fe, where many drivers seem to be either oblivious to their surroundings or just plain incompetent. But after a few weeks in Karaganda we realized how dull Santa Fe's driving is. Here are some rules of the road for Kazakhstan, as deduced from the back seat of an Audi.

Rules

Seat belts look stupid. Do not wear them.[1]

Horns are communications devices, not just blame throwers. A short "toot toot" means "I'm behind you / just to the left of you," or (when addressing a pedestrian) "I've just arrived to drive you somewhere". A short but full honk means "I don't care if there's oncoming traffic. Turn already." A long blast means "Thank you for stalling your vehicle on the road. Even though you cannot move, get out of my way!"

All vehicles have the right of way over pedestrians. Always.

A pedestrian within a cross-walk, if she or he will impede your motion, is a fair target for honking. If you can possibly squeeze through in front of the pedestrian, e.g. while turning right through a cross-walk, do so. Use short horn toots to further intimidate the pedestrian.

Almaty Amendment: If a pedestrian is within a cross-walk which has no dedicated traffic light, stomp on the accelerator and see if you can tap his or her kneecaps with your bumper.

If a pedestrian is walking away from you in an apartment courtyard, and if she or he veers within five feet of your intended lane of travel, honk at him or her.

Painted lane markers are for making the road pretty. Put the car any place that will give you the biggest advantage. If another driver might interfere with your plans, honk at him or her.

If you are at a red light but can see that the light may turn green within the next minute, start creeping into the intersection. If the light will turn green within the next 15 seconds, get a move on.[2]

Other Observations

Some cross-walks are displaced about 30 feet from the nearest intersection, and are equipped with their own traffic lights. This can be a blessing for pedestrians, as it means they need to expect danger from only two main directions.

There are lots of collisions on multi-lane freeways. We saw five or six accidents on the stretch of Gogol which runs past the Afghan war memorial. I'm not sure if they all involved left turns or not.

The preceding may imply that Karaganda roads are full of reckless drivers. But the situation is more complex. For example our driver, Vladimir, obeyed most of the rules noted above. But he also shifted gears much more smoothly than I ever will. And no matter how abrupt his initial braking needed to be in order to avoid a collision, he always modulated the brake pressure so that we came to a stop with no forward/backward bobbing of the head. In short, he was aggressive and good.



[1] Actually, I admire this "rule". Despite my exaggeration, seat belts are a personal choice in Kazakhstan.

I remember when seat belt laws were passed in Ohio, by then-governor Richard Celeste (D). He spoke at my university shortly afterwards and took questions from the audience. When asked why he had chipped away yet another personal freedom, the Governor explained that he had passed the weakest law possible. ("You can't be pulled over for not wearing a seatbelt, but you can be cited for not wearing one if you are pulled over for another reason.") And he explained that, if he had not passed some form of seat belt law, the Reagan administration would have denied highway funds to the state of Ohio.

[2] This is almost the exact opposite of the rule in Santa Fe. There, if the light has turned red any time within the past 15 seconds you should just keep going, la lala lala.

2006/11/08

Firefox 2.0 and display:inline-block

If you want to use <span> markup to define CSS-styled buttons with background gradients, and if you want to control the heights of those buttons, and if you are using Firefox 2.0, you have to jump through some non-standard hoops.

Firefox 2.0 doesn't support display:inline-block. If you have the Web Developer extension installed, it will report "Error in parsing value for property 'display'. Declaration dropped." And instead of getting a button with the right height for your background image, you'll get something silly looking, like this:



(I know, the colors look silly too. But that's not important right now.)

Yahoo! search turned up some background information, and a workaround for those who want to make links (<a href="...">) look like buttons:

NCZOnline - Pain with inline-block

Basically, you need to do this in your CSS:


.BtnClass {
display: inline-block; /* Firefox 2.0 ignores this */
display: -moz-inline-stack; /* Firefox picks this up */
}

The comments say that this bug has been logged in Bugzilla, and there's hope it will be fixed in Firefox 3.0.

Works for me with Firefox 2.0 and Safari 2.0.4, both on Mac OS X 10.4.8. Almost:



I'd like the span's text to be centered vertically on a background image.

Here's the cleanest solution so far. Suppose the background image is 24 pixels high and the font size is 14 pixels. Then, doing the vertical centering manually, the y offset is (24 - 14)/2 = 5px. So pad the top of the span by 5 pixels, and set its height to the total height minus the padding.

.BtnClass {
...
background-image: url(some_image.png); /* 24 pixels high */
font-size: 14px;
height: 19px;
padding-top: 5px;
}

In other words, add vertical padding to push the text down from the top of the span, then subtract that padding from the overall span height; apparently the final height of the span is height + padding-top + padding-bottom.

This works reasonably well for both Firefox and Safari.

2006/11/05

Fevers Help the Immune System

(Pardon the "duh" headline.)

Helpful fevers come in from the cold - health - 05 November 2006 - New Scientist

I found this article interesting mainly because I like to let my fevers run -- "bake out the infection". Works for me, but then I've never had a really high, convulsion-inducing fever.

Anyway, interesting tidbits from the article:

It has been found that fevers help the body’s immune system identify an infection and raise an army of white blood cells (lymphocytes) against it.

...[Researchers] artificially created a fever-like state in a group of mice... This had the effect of doubling the number of lymphocytes visiting lymph nodes...

Lymphocytes arriving at the nodes are screened for "killer efficiency" using fragments of potentially infectious material. Lymphocytes that respond to the fragments are found, are then selectively multiplied, and then swarm into the bloodstream to seek out and destroy the invader.


Apparently the extra heat of a fever activates high endothelial venule cells ("gatekeeper" cells, as the article calls them) in lymph nodes. They produce extra surface proteins that capture passing lymphocytes and draw them into the lymph nodes.

Evans says that although it fell out of fashion with the development of modern medicine, the idea of treating disease with heat has a long history: "Hippocrates used to heat patients with cancer," she says. And a century ago the physician William Coley discovered a cocktail of bacteria, dubbed "Coley's toxins", which appeared to combat cancer by producing a fever.

2006/11/04

Six Things Americans Should Know About Kazakhstan

From The Roberts Report on Central Asia and Kazakhstan comes a mini-lesson for geography class:


  1. Kazakhstan is a major oil producer and is assisted by U.S.-based companies in producing 1.5 million barrels of oil a day, with ambitions to raise this production to as much as 3.5 million barrels a day by 2015

  2. In its fifteen years of independence, Kazakhstan has not held one election that European observers could reasonably call “free and fair”

  3. Since 2000, Kazakhstan’s economy has grown at an average of 9% a year, and the U.S. trade volume with the country has doubled since 2004

  4. Kazakhstan continues to arrest opposition figures for political reasons, and two of its most vocal opposition politicians were found dead within the last twelve months under suspect circumstances

  5. Kazakhstan has a majority Muslim population with pro-western orientation, and its well-financed and sophisticated banking sector has the potential to be a critical foreign investor in such fragile states as Afghanistan, Kyrgyzstan, and Georgia

  6. The Kazakhstan government regularly violates the rights to free speech and assembly by strictly controlling its media sector and by continually harassing and curtailing the activities of opposition political parties.

2006/10/30

Why quarantine is preferred?

New strain of H5N1 bird flu emerges in China


...those vaccine-induced antibodies do not recognise the Fujian virus, although they do attack the virus strains that Fujian has now replaced.
This means the Fujian strain has a selective advantage in vaccinated birds. "This novel variant may have become dominant because it was not as easily affected as other strains by the current avian vaccine," says Guan. That may also be why H5N1 infection in Chinese poultry has surged, rather than decreased, despite increased poultry vaccination.

Worryingly, the antibodies being used to develop human vaccines for H5N1 ... do not recognise the Fujian strain. This means the current experimental pandemic vaccine would not work against any pandemic virus that emerged equipped with Fujian surface proteins.


In the face of mutating pathogens it's easy to see why monitoring and quarantine are favored weapons against epidemics.

Firefox Vs. Acrobat

Firefox Vs. Acrobat - macosx.com

I just switched to Firefox 2.0 as my default browser under Mac OS X. When a friend emailed a link to a PDF document, I clicked it as usual.

Out of the box Firefox, unlike Safari, cannot view PDFs inline. That's okay, I really just want it to open it in Preview.

Alas, that's not an option. Firefox gives me the choice of saving to disk or of opening with Adobe Acrobat.

Gah.

I searched through the files in my Firefox profile directory. There were no direct references to Acrobat.

According to macosx.com the fault lies outside of Firefox. The thread suggests using Finder Info to make Preview.app the default viewer for all PDF documents. The suggestion did not work for one of the thread participants, and it doesn't work for me, either. Preview.app is already set as my default for all PDF documents.

A find|grep through ~/Library/Preferences turned up one promising hit:
./com.apple.internetconfig.plist

Unfortunately that's a binary property list file and even property list editor can't display its content in a human-intelligible way.

Solution

I closed Firefox, moved ~/Library/Preferences/com.apple.internetconfig.plist out of the way, and followed my friend's link again. This time Firefox let me choose between saving to disk and opening with Preview.app.

Interestingly, Firefox did not create a new copy of the plist file for me.

Better Solution

A less radical solution also works: when Firefox asks how you want to handle the PDF, tell it to save to disk. Also select the checkbox labeled "Do this automatically for files of this type from now on."



After downloading, open Firefox Preferences, switch to the Content pane, and click the "Manage..." button at bottom right.



The list should now contain an entry for PDF. Select it, edit, and change to open with a different application than the default.

2006/10/27

2006/10/24

A Bit of Fry and Laurie

It's fun to track permutations of British actors through stage and screen. The casts of the "Harry Potter" series, "Gosford Park", "Love, Actually", "Tristram Shandy", and so on, are all interwoven. And now another pair for the mix: Stephen Fry and Hugh Laurie.

A few months ago Bobi and I watched "Tristram Shandy: A Cock and Bull Story". It was funny, non-linear, convoluted, recursive in a way that not many movies are. Shades of Douglas Adams.

Stephen Fry appeared in the film in a small role, that of Parson Yorick. He had a much more prominent role in the Special Features section of the DVD, wherein he visited the house in which Laurence Sterne wrote the book on which the movie was based, and discussed the author's life and bizarre afterlife with (I think) the caretaker of the house.

Wikipedia summarizes Sterne's unquiet quietus:

...Sterne's body was stolen shortly after it was interred and sold to the anatomists. [I thought they said "resurrectionists" in the DVD, but never mind.] It was recognised by somebody who knew him and discreetly reinterred. When the churchyard of St. George's was redeveloped in the 1960s, his skull was disinterred (in a manner befitting somebody who chose for himself the nickname of "Yorick"), partly identified by the fact that it was the only skull of the five in Sterne's grave that bore evidence of having been anatomised, and transferred to Coxwold Churchyard in 1969. The story of the reinterment of Sterne's skull in Coxwold is alluded to in Malcolm Bradbury's novel To The Hermitage.

Fry played Parson Yorick in the film. Sterne used the nickname "Yorick". Fry and host discuss this during the tour, linking the nickname to Sterne's humorous taunting of death, which swirled around him as he wrote the book. They note the irony that, in 1969, only the skull and femurs were retrieved: these constituents of the Jolly Roger were believed by some (the Knights Templar?) to be the minimum set of earthly remains necessary for resurrection.

But that's not what this post is about.

Stephen Fry looked familiar. IMDB showed that he'd done the Black Adder series, so maybe that's where I'd seen him before. He was also credited as the narrator of the British audiotape recordings of the Harry Potter series. So Fry extends the permutations of British actors beyond stage and screen to audio books.

I checked Netflix to see if he'd made any other movies that I recognized. No joy. But Netflix did carry a television sketch-comedy series, "A Bit of Fry and Laurie", from the late 1980s, featuring Stephen Fry and Hugh Laurie.

I've just rented it. It wasn't great. Most of the sketches consisted of two Britishmen standing or sitting, having long-winded conversations. They were almost, but not quite, as dull as this post.

Some bits did make me laugh out loud. For example Hugh Laurie's piano ballad, "Mystery," proved that a seated, long-winded monologue can be hilarious when accompanied by music.

My favorite sketch was introduced by Stephen Fry, playing the host for a public access education series. What would you call it, "University TV" or something like that. But, rather than introducing a segment on Elementary Bookkeeping, Mr. Fry pleasantly announced that he was presenting bloopers culled from the education series archives.

Yep, a blooper reel from public access television. From the early 1970s. Flash to Hugh Laurie in polyester and shaggy hair, screwing up a chalkboard presentation on the path traced by a point on a rolling wheel.

But that's not what this post is about.

Hugh Laurie looked familiar. IMDB showed that he'd done the Black Adder series...

Finally I recognized him from "House", a television drama. Laurie plays the gruff lead character, who speaks in a low, gravelly, American-accented voice. Not at all funny. Not at all British. Now that's a bit different.

What the hell is this post about?

2006/10/22

Democracy Inaction, continued

Via Dave Winer: Olbermann on The beginning of the end of America.

Does this sound overblown? Maybe it is. But it bugs me.

The USA I love would treat all of its prisoners according to the Geneva Conventions. It would not pass acts which make it possible to abuse its own citizens.

Abraham Lincoln suspended the writ of habeas corpus during the Civil War. To some, that's a good precedent for suspending it now. But the U.S. Constitution says it can be suspended only in special circumstances.

"The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it."

-- Article One, section nine, U.S. Constitution


These circumstances held when Lincoln made his suspension. It's not at all clear that they hold now.

The current suspension is supposed to apply to non-citizens. But as Olbermann notes, that does not prevent its suspension for citizens, "by mistake."

"Oops, sorry! Your unfavorable article made us think you were an enemy combatant. We arrested you and beat you up by mistake. Please don't make a fuss about it; we wouldn't want to make the same mistake again."

[2006/10/24: Okay, that's specious. Trying to obscure abuse of power through intimidation is pretty common, not some unique consequence of the Military Commissions Act of 2006.]

"You Have the Body"

"The writ of habeas corpus is the fundamental instrument for safeguarding individual freedom against arbitrary and lawless state action."

-- Harris v. Nelson, 394 U.S. 286, 290-91 (1969)




Habeas corpus makes it difficult to arrest people without cause. Here is one possible consequence of its suspension:

...'What was he arrested for?'... Most people, crazed by fear, asked this question just to give themselves a little hope; if others were arrested for some reason, then they wouldn't be arrested, because they hadn't done anything wrong...

This was why we had outlawed the question 'What was he arrested for?'

'What for?' Akhmatova would cry indignantly... 'What do you mean what for? It's time you understood that people are arrested for nothing!'

-- "Hope Against Hope" via "Gulag: A History"



That Could Never Happen Here

I don't believe our government could abuse this power for very long. It's hard to imagine that they could pull it off on a large scale. People would notice. Congress would investigate. Abusers would be punished.

But why give them the chance? They just might exceed our imaginations.

The U.S. has held citizens, without charge, for years at a time. It has prevented them from meeting with their lawyers. It has prevented them from hearing the evidence against them.

It has done these things only rarely. I would prefer that it never be allowed to do them at all.



Footnote

The story of Kurt Gödel's interview for U.S. citizenship used to be funnier.

...the judge continued, "Anyhow, it was under an evil dictatorship ... but fortunately, that's not possible in America." With the magic word dictatorship out of the bag, Gödel was not to be denied, crying out, "On the contrary, I know how that can happen. And I can prove it!"

2006/10/18

Google Earth tour of Karaganda

We've posted lots of blog entries and photos of places we visited on our trip to Karaganda. Wouldn't it be cool if you could take a virtual tour of the town and see where the pictures were taken?

Okay, probably not, unless you're a geek like Bobi and me. In which case you probably have Google Earth installed on your computer. In which case, here's a KMZ file to guide you around the town. Have fun!

Kazakhstan Trip.kmz (2006/10/18)

[2007/12/17 The file has moved -- Mitch]

Democracy Inaction

How do we curb the executive branch of our federal government? Or, at least, the Secret Service?

Seriously, how?

I just returned from Karaganda, Kazakhstan, once part of the gulag archipelago. Maybe that's why the Military Commissions Act of 2006 is unsettling. Ostensibly it applies to unlawful combatants, who (I think) have not been accorded protection by the Geneva Convention. However (I think) the act as approved could also be applied to any U.S. citizen.

It seems implausible that this sort of thing could lie in our future. But it's up to us to jealously guard against it.

There is hope that the Military Commissions Act will be challenged in the courts. I believe it should be challenged, if only to clarify the conditions under which it could be used to detain (and torture -- er, interrogate harshly) U.S. citizens.


Legal groups, such as the Center for Constitutional Rights, are already preparing to challenge the constitutionality of the law in court, as Democracy Now! noted in an interview with the Center’s president, Michael Ratner, and with Senator Patrick Leahy, who was very critical of the bill’s implication.

I wonder how my congressmen voted... GovTrack knows.
Here's the record for the House of Representatives, and for the Senate.

Representative Udall: nay
Senator Domenici: aye
Senator Bingaman: nay

Arlen Specter explained why he ultimately voted in favor.

Judiciary Committee Chairman Arlen Specter (R-Pa.) voted for the bill after telling reporters earlier that he would oppose it because it is "patently unconstitutional on its face." He cited its denial of the habeas corpus right to military detainees. In an interview last night, Specter said he decided to back the bill because it has several good items, "and the court will clean it up" by striking the habeas corpus provisions.

I hope he's right.

2006/10/13

Music and Movies from Kazakhstan

When Vladimir drove us around Karaganda he always had the radio on, tuned to the news or to Russkom Radio. Since returning to the states I've been trying to track down some of what we heard.

YouTube has been pretty helpful. I haven't actually found many of the songs I've sought, except for chart-topping crap like Romantika. (Funny: when this played in the car I thought it was an advertisement.) But YouTube has uncovered some interesting Kazakh music videos.

Some of the videos celebrate the country and its past. A few of these are quite moving, especially for someone whose girlfriend is adopting a Kazakh girl.

Musicola
The search has also turned up a Kazakh group named Musicola. Hidden among the dance music on their site is a song called Arman Zholdar (road of dreams?) which is full of unusual textures. In it Karina Abdulina, the singer of the group, uses her voice more as a musical instrument than as a carrier of lyrics.

The Nomad
Thanks to YouTube and IMDB I even found out about a movie which was playing in Karaganda while we were there, a romanticized tale of how the country came to be: The Nomad. It was produced by the Weinstein brothers and stars Jason Scott Lee. Small world...

2006/10/11

Saiga antelope

Saiga antelope - Saiga tatarica - ARKive

When we were in Karaganda Bobi and I visited the regional museum. Inside we found several interesting exhibits, on subjects ranging from the Karaganda Gulag[1] to the Golden Warrior [2] to -- well, we couldn't figure out what this thing was.



It looked kind of like a cross between a reindeer and a moose -- or maybe a reindeer and Zoidberg.

After a couple of days of sporadic googling we learned it was a steppe antelope.

[1] The web has some indirect references, e.g. Welcome to Ukraine:

Karaganda is the centre of Kazakhstan’s coal production, but in the soviet times it was the hub of Gulag concentration camps.


[2] See also Talgar Mountain Peak:
In 1969 - 1970 while the archaeological excavations in [Issyk] hill a grave of the so-called "Golden man" was found. It was a mummy of the young warrior. All his clothes was decorated with gold. Nowadays the image of the "Golden man" is one of the symbols of Kazakhstan.

Industrial Design

The Department of Style - TiVo Series3

Bobi has a Samsung VCR/DVD player, now several years old. She likes to watch TV with the lights off. So we sometimes have trouble changing channels, on account of we're holding the remote backwards. Which is why the above blog entry caught my eye.

I like the new remote. It has more texture on it, so it is easier to find the buttons without looking[...] There is asymmetry in the textures, which solves the problem with the old remote where you can pick the thing up backwards and rewind instead of commercial skip.

Thoughtful design is so impressive.

2006/10/08

OmniGraffle 4 and Subversion

Subversion doesn't like OmniGraffle documents: "invalid control character ... in path".

Fortunately many others have already encountered this problem and published a workaround. Here's a nice summary.

I use OmniGraffle, not OmniGraffle Pro. The workaround looks good from here.

Writing takes energy

So many notes on paper from the Kazakhstan trip... and no energy to transcribe them. It's a good thing nobody reads this stuff, else I might feel guilty.

2006/09/19

19 September

Infrastructure

Today we have no water, as promised. I think we also have no heat. The building heating is provided by radiators.

At the baby house there's no heat and no electricity. We can't even take baby Aigerim to the play room, let alone outside, without bundling her up in three layers of clothing and a bonnet.

Bobi's a Mom!

She still has a cold. She's very docile when we come to see her, but she smiles big time and makes cooing noises at both of us. When I reach out to touch her hand she wraps it around one of my fingers, pulls it into her mouth and starts gnawing. Teething time.

At the end of the morning we see Olga standing out in the cold, waiting for the last of the drivers to appear. Everybody is here except Vladimir, our driver. "If he doesn't show up in two minutes, he's fired," she says. She's smiling but I think she's serious.

I can't resist asking how things went for Bobi. "Oh yes, she passed," says Olga. And, later, to Bobi, "By the way did anybody tell you, your court date has been moved to Friday morning at 9 am?" This sounds like good news, and when Bobi asks who managed this feat, Olga takes a little bow. But Bobi isn't entirely happy -- she's afraid an earlier court date would cut short the 21-day bonding period, and that the court might deny the adoption on that ground. Olga seems unconcerned.

[2006/10/08] Olga knew what she was doing. The judge was heading out of town on vacation, so it was good to move up the court date. What's more, as we learned from Kristin and Nancy, the bonding period is actually 15 days, not 21 days.

Weather

The temperature has taken a nose-dive this week. When we got here it was too hot for long-sleeve shirts. Now it's too cold for the fleece I brought. Yesterday afternoon we had sleet. At lunch time we go back to Tsum, and I pick up a Puma (name brands everywhere) skull cap.

The Absahl mall has no heat today. Tsum has heat, and running water. Their toilets are working. I'm surprised they don't have more business.

Getting Fed

We've said that the locals are very tolerant of our poor Russian. The one exception is the lady behind the counter at the Express Bar in Tsum. She's actually pretty tolerant, but as I order she's always looking at me with a bemused expression and asking me to repeat everything. And then she gets the order half wrong. Today it takes three tries to get two cups of tea, one with milk and one without. And, although I'm able to order two pukreehm (meat and potatoes in a sort of pizza-bread wedge) without having to point to them, she does repeat my order to demonstrate the correct pronunciation. It's as if to say, "Oh, you mean puh-kreyEM, it's lucky for you I was here because nobody else would have been able to make sense of your gibberish." A big part of spoken communications is conveyed by rolling the eyes :)

In the afternoon Olga suggests that we may want to see if we can change our tickets, to get an earlier return to the states. The 15-day waiting period starts as soon as the court appearance is complete, so everything could be accelerated from this point. It might be good to leave for the states a few days early, to finish preparations.

Celebrating

Tonight Bobi suggested we go to Line Brew for dinner. The name of the restaurant is in English, so they probably have comfort food on a menu we can read.

[2006/10/08] If you're ever in Karaganda, Line Brew's address is Boulevard Mira 24 (Бульвар Мира 24 - I think it means "Peace Boulevard", "Mira" as in Mir). And if you're in Almaty you can find a Line Brew at 187 Furmanov Street. Tel. 007 3272 507985.

Good call, Bobi! There's an air vent cranking down masses of hot air on our heads, and the menus are indeed in English (and Russian). The separate beer menu lists maybe a dozen Belgian brews, complete with summaries of their flavors (hoppy, fruity, etc.) and alcohol levels. The food menu, unlike the one at Johnny Walker Pub, doesn't include any re-interpretations of standard American fare (e.g. "juicy fat burger"); so, with apologies to Douglas Adams, there's little chance of getting something almost, but not quite, completely unlike what you ordered.

Of course there is still an opportunity for misinterpretation. I order beef with mixed vegetables and get just that, grilled bell peppers and onion greens over nicely grilled, slightly spicy beef. But Bobi orders the meat fondue with some uncertainty of what she's getting: it turns out to be a thick black pot with hot oil, into which our server sets skewered cuts of beef.

Neither of us is willing to try the Alabama vegetable salad. I can't even remember all of the ingredients, but I think it involved home fries and mayonnaise.

Bobi's not a big fan of sweet desserts, but my pancreas and I love them. We order a pie of sorts, a wedge of chocolate ice cream over alternating layers of sweet waffle and frozen meringue. Had to have something to go along with two snifters of Hennessey brandy.

It was a great meal, and a good way to celebrate today's news.

2006/09/15

Blogging Tools

I've been with Bobi in Kazakhstan since the first of the month. She's adopting a baby, and I'm here to help :) You can find the full story at The Den Hartog Stork.

Up to now I've been keeping my notes on paper, and it looks like a hopeless task to get them all posted. There's just too much stuff! Besides, Bobi has things well covered in her blog.


Instead I'll just start keeping notes online from today. Or rather, from tonight. It's about 4:30 am just now, and I'm awake because this receding cold has given me a dry cough.


We're both using Blogger. It's free and easy, and it lets you include images in your posts with some control over the layout. But, watching Bobi compose a post, it seems a lot of time can be lost trying to control the flow of text around inline images. The only reliable technique seems to be to insert a bunch of blank lines and to hope that your content pane remains at a fixed width.

The point is that page layout can be pretty distracting when you're using Blogger. This is one reason I'd rather be using something like iWeb. If I could have brought the Powerbook on this trip (or if I'd sprung for a MacBook with Parallels) this would be a non-issue; we'd be producing pages with the layout we wanted -- and with whole swaths of text rendered as copy-unfriendly PNG images :)

In general it's a pain for me to be Mac-less. Never mind controlling how images are arranged in a post, how do I crop my poorly composed images for display in a blog post? With the Mac it's Command-Control-Shift-4 (or something like that -- it's burned into muscle memory) and a sweep of the mouse. With Windows it's probably something similar, but my ignorance makes for a lot of frustration. (Or maybe I should start downloading little utilities for Windows, e.g. MWSnap? Anyone have any recommendations? Anyone?)

There's still a big opportunity for somebody to produce a cross-platform blogging tool which makes it easy to control page layout and which renders content as plain old HTML.

The Stamp Seller

Today we had to ask Olga where to buy envelopes for mailing letters. We thought we could buy at the post office but couldn't remember what we'd seen there. She looked surprised and said simply "Kazpost," confirming our guess.

So at lunchtime, when Vladimir asked where to ("to home?" "doe dohm?") we asked for Kazpost. His reply was a question which we didn't understand, but which seemed to mean "which one?" Uh...

No matter. After a few seconds of confusion he reached for his cell phone and called Olga. Then he dropped us off at the only post office we knew about, the one on the main street (Bukar Chirau) near our apartment.

I went to the Valyuta at the back of the post office and exchanged some dollars for tenge. Then we headed for the stamp stall. Along with stamps it had a variety of envelopes.

Bobi asked "Amerike?" The man behind the counter had the chubby but well-groomed appearance of a Bavarian clock maker, and a quiet, gentle demeanor to match. He pointed to the Avion envelopes and began explaining that "A" on the stamps meant "150 Tenge". Like so many others here he didn't mind that our Russian skills were almost non-existent.

Bobi moved over to the stamp display case, said "Poshawlsta (Please)," and began pointing. For the next ten or fifteen minutes the old clockmaker showed us his wares with great patience and not a little pride. He would use one- or two-word phrases to convey something about the images on the stamps and, somehow, we were able to figure out what he was saying. During most of the exhibition another customer stood patiently behind us, waiting for her turn.

This way of doing business -- turning out all of the drawers to find everything that might match the customer's request -- seems pretty common here. We've seen it in the baby store ("Mickey House"), where a woman unwrapped a huge assortment of little shirts for Bobi. And we've seen it in a school supply stall where we tried to find stationery without any lines. First Bobi pointed to a notebook of graph paper, and we tried the phrase "nye lin-ya". The lady reached under the desk and brought out horizontally-lined notebook paper. Again we tried the phrase, with different emphasis: "NYE lin-ya." She brought out some blank paper. "Da! Spasiba." We'd found what we wanted and thought we were done. But she began rummaging through the display cases and shelves, bringing out four or five different kinds of blank-paper pads.

As we neared the end of the stamp exhibition, our helper inquired shyly what we were doing in Karaganda. "Rabotaiyou?" I know that word: he wants to know if we're working here! "Turist," answered Bobi.

Eventually we finished, and the clockmaker pulled out a set of stamp-handling tweezers. Absorbed in his task, he delicately gathered up Bobi's selection, pausing occasionally to count out the amounts and add them on a desk calculator.

Once everything was totalled Bobi paid and said thank you. Then the clockmaker looked up toward me, one of the few times he had made eye contact with either of us during the entire exchange, and shook my hand with a big smile.

This seemed odd; almost the entire business exchange had been between Bobi and the old man. I'd stood to the side making occasional comments to her and calling out words in English when I thought I understood something he had said.

There must be an etiquette in male/female interaction here which I don't yet understand. The old man wasn't being chauvinist; he was just happy to have helped us. (He was quite unlike the guy at City Market for whom Bobi had held the door a day or two earlier. That man had smiled, made an "O-ho" noise, bowed a little, and walked through the door saying something that included the words "man", "woman", "Russia" and "Amerike".)

This exchange with the stamp-seller left us feeling especially warm and fuzzy. The feeling lasted until we got to the front door, where we realized we'd forgotten to buy stamps for the postcards.