Wed Oct 24 7:28AM (2007)

SOLVED: Perl "Argument ... isn't numeric in subroutine entry" warning

Problem:

   Argument "2.121_08" isn't numeric in subroutine entry at /usr/lib/perl5/vendor_perl/5.8.8/MLDBM/Serializer/Data/Dumper.pm line 5


Solution: You probably have -w in your hashbang line:

    #!/usr/bin/perl -w


Get rid of it. Replace it with use warnings;

Posted by Ed | Permalink | Categories: Linux

Thu Oct 04 2:04PM (2007)

La Crosse WS-2316 on Linux: Success

For those of you Googling before buying: yes, it works!

I've wanted a weather station for years. When I saw the La Crosse WS-2316 in Costco this weekend for $90, I couldn't resist buying it. The good news is, it works perfectly fine on Linux (2.6.22). The WS-2316 includes a USB-to-serial dongle which lsusb reports as:

  Bus 004 Device 005: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO


The driver for that is ftdi_sio:

    Device Drivers -->
      USB Support  --->
        USB Serial Converter support --->
          USB FTDI Single Port Serial Driver (EXPERIMENTAL)


Here's a udev rule you might want:

   SUBSYSTEM=="tty", ATTRS{manufacturer}=="FTDI", SYMLINK="lacrosse", MODE="0666"


This creates a /dev/lacrosse symlink to the appropriate /dev/ttyUSBx. This is especially important if you have multiple USB-serial adapters. I put that in /etc/udev/rules.d/99-local.rules . That's for a Gentoo system; Debian and others may be different.

You can use Open2300 to talk to the station. Open2300 is clean, simple, elegant, well documented, and has a good API for writing your own tools. UPDATE: Oct 29: If you're a Perl person, try my new Device::LaCrosse::WS23xx

UPDATE: Oct 16: The honeymoon is over. I'm a little disappointed by the unit:

  • Occasional bad data. Between 1-3 times a day, one of the data values is garbage. For instance, outside temperature goes to 136 or -20, or pressure goes to 4 or 40. This could be the Open2300 software, or the unit, or even the USB-to-serial adapter. I don't know, but it's frustrating.
  • No Wind Averaging. Wind speed and direction are instantaneous values, whatever the sensor happens to be reading at the moment it is queried. If you log every 5 minutes, you don't get a sense of what's really going on. If you want to average, you need to hook up the wired connection (wireless only updates every 2 minutes), log wind speed/direction every 32 seconds, and make your own averages.
  • Barometer doesn't work well at high altitude. The minimum pressure it handles is 22.44 inHg, which is about 29.70 inHg relative at our elevation (7200 feet). In other words, we're right near its limit. In practice, readings around and below 29.80 seem flaky.
  • Poor display. The LCD display is poorly thought out. There's no way to see outside temperature and rainfall simultaneously, you need to push buttons until you get the desired reading. But time and date, which are pretty useless for those of us with clocks, are constantly displayed. In practice, I just fire up my web page instead of looking at the LCD.


You get what you pay for. At $90, this was still a good deal. More importantly, I can afford it while the $1,000 Davis remains a distant dream. I don't care that much about pressure or wind speed: what I care about is rain, and to a lesser degree temperature. So I hope the rain gauge works...

Posted by Ed | Permalink | Categories: Linux

Wed Aug 29 6:29PM (2007)

Quote of the Day

"In normal circumstances, people who turn their backs on reality are soon set straight by the mockery and criticism of those around them, which makes them aware they have lost credibility. In the Third Reich there were no such correctives, especially for those who belonged to the upper stratum. On the contrary, every self-deception was multiplied as in a hall of distorting mirrors, becoming a repeatedly confirmed picture of a fantastical dream world which no longer bore any relationship to the grim outside world"

-- Albert Speer, Inside the Third Reich: Memoirs, as quoted in Mistakes Were Made (but not by me)

Posted by Ed | Permalink

Sun Aug 19 3:16PM (2007)

A Thread of Grace

"A million deaths is a statistic", but every death -- and life -- has its tale. Mary Doria Russell weaves a dark but rich tapestry quietly filled with not one but countless threads of grace.

The setting is Northern Italy during the Second World War. Russell picks up the disrupted lives of Jewish refugees escaping persecution and of the people who shelter them. Keeping a tight focus on a small number of individuals illustrates the beauty of each life, each thread. Russell's quiet matter-of-fact voice suffuses each tragedy with a significance that no other tone could match, each character with an almost palpable nobility that makes the pages feel alive. Through these few lives and deaths we begin to get a small sense of the unimaginable horror of WWII, of war itself.

"A Thread of Grace" is often brutal--not gory, but its simple everyday narration is merciless. This is a book that will haunt me.

Posted by Ed | Permalink | Categories: Books

Sat Aug 04 5:13PM (2007)

Trima machines

The new Trima machines are a big success. The staff were so enthusiastic about them, and I can see why! I loved today's collection.

The machine has a large, friendly screen that can be angled toward the donor. Entering donor info is simple, as is deciding what to collect. Based on my previous platelet count, the ABQ office decided to draw two units of platelets and one RBC (just the red, not whole). So even though the new machines are much faster -- the first unit of platelets took only 50 minutes -- I still ended up spending a long time, and wasn't able to make the 10:15 Vinyasa class at Body.

The procedure itself was much better than the old Haemonetics. The cycle is 2 minutes draw, 30 seconds return, compared to 10/5 (or thereabouts) on the old machines. There's also no increased pressure on the cuff, and no need to stop squeezing. And no need to count cycles: the Trima's display shows the time left, as well as quantity of platelets/plasma/RBC collected. (Yes, I can look at the bags, but I don't have a feel for how full they need to be). Rocio's only complaint? "I don't have enough to do."

The new machines are on tour this month, on a trial basis for the mobile units. I hope they work out well: I really liked my experience today, and three units for the cost (time) of one certainly seems worthwhile.

Posted by Ed | Permalink

Sat Aug 04 4:54PM (2007)

Over Easy Cafe

Today's NYT crossword utterly humiliated me. UBS had their new Trima machines set up -- and they are wonderful indeed -- but instead of a quicker draw I got to do a double platelet and single red cell donation. 83 minutes, not counting the stick and takedown, and most of that was spent staring in frustration at a barely filled in grid. Byron Walden, I concede. You have bested me.

Afterward, I was consoled by a Grande Handheld breakfast burrito -- chorizo green -- at Over Easy Cafe right next to UBS. This place really knows how to make a good burrito: crisp cubed browns, not soggy shredded potatoes. Tasty eggs, tender and fluffy and voluminous. Excellent chorizo. The chile was weak today, but we all have our off days (the chile last month was perfect). Second Breakfast at Over Easy has become something to look forward to on the first Saturday of each month.

Posted by Ed | Permalink | Categories: Food

Tue Jul 31 11:02AM (2007)

Was It Fun?

Over at Marginal Revolution, Tyler Cowen offered a personalized podcast to anyone preordering his new book Discover your Inner Economist. I preordered one simply because I like his writing and his personality, and because I expect to learn from it. I didn't actually have a question, but this sentence from his offer nagged at me:

        I believe this will be fun for me.  


...so at the last minute I sent him my question: "Was it?" I was curious because we humans are so often lousy at predicting what we will or will not enjoy.

Tyler has just replied, in more depth and with more feeling than I expected. He even liked my question. Listen for yourself to see if he did indeed have fun. Then go buy your own copy.

His reply satisfied me. I look forward to receiving his book and to his continued postings.

Posted by Ed | Permalink

Thu Jul 26 9:18PM (2007)

Sweet Swan, continued

Robin Williams answered my question even before her lecture, even before I asked it, as she signed my book: Yes, she has eagerly searched for counterevidence, for anything that will refute her claim of Sidney's authorship. Yet all she finds is more evidence in favor -- including new facts learned after the printing of her book.

What do her detractors say? Not the close-minded emotiotards who get apoplectic at the suggestion that Shakspere / Oxford / Marlowe / Flintstone isn't The One True Author. What is the best argument against Sidney? And on the flip side, what next from Williams? This is the most promising idea of all the ones I've seen: it's parsimonious, elegant, and feels right. I'm so curious to see what the next few years will bring.

Posted by Ed | Permalink | Categories: Books

Wed Jul 25 3:08PM (2007)

Sweet Swan of Avon

The first part of the Shakespeare Authorship question--did the man from Stratford-upon-Avon write the works bearing the name William Shakespeare?--has pretty much been settled: No. Few people seriously claim that he did.

The second part--who did?--is a doozy. For years I've been intrigued by the Oxford hypothesis, but bothered by the contortions required to believe it.

In Sweet Swan of Avon: Did a Woman Write Shakespeare?, Robin P. Williams makes the case for Mary Sidney, sister of Philip Sidney. And what a case it is! Williams's research is thorough, her argument convincing. The chapter on Sources includes a 16-page table documenting striking connections between Sidney and many works known to have been sources for the plays. Williams includes a beautiful chronology, and the events fit Sidney's life in a way they don't for the other candidates.

Williams speculates, but doesn't require suspension of disbelief. Her argument works, and feels right in a way that others don't. Williams will be speaking at the Library on Thursday, and I'm eager to see her presentation.

Posted by Ed | Permalink | Categories: Books

Thu Jul 12 2:33PM (2007)

Exquisite Timing

I was pretty sure this was a no-nuts recipe, but there it was on the baking sheet as I took out today's second batch of shortbread: a lone hex nut with a sheared-off piece of bolt inside it.

"If the recipe didn't call for nuts", I reasoned, "I wouldn't have put in nuts". Besides, I usually prefer pecans. So where did this nut come from and why didn't I notice it on the baking sheet when I put it into the oven? I resolved not to rest until I had figured out this fiendish puzzle--or until I got tired, whichever came first.

Have you solved the mystery, dear reader? You might, once I give you one final clue: I need to spend most of tomorrow and Saturday baking a wedding cake, so this would be a most inauspicious time for the oven to break. Yep, it's the oven. There are two bolts holding the back panel in place, and both sheared off.

Fortunately, the oven still works: I have 8 dishes of creme brulee in there right now. And even more fortunately, Mike at Miele was able to find the parts and thinks I can replace them myself. They're sending me the parts at no charge, even though the oven is well past warranty. That's a huge savings over a service call.

Posted by Ed | Permalink | Categories: Food