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))