Sunday, June 29, 2008


Here are three species of Oenothera. Left to right, we see a yellow O. missouriensis, a white O. pallida, and a pink O. speciosa.

Oenothera generates so many dramatic variants, so frequently (for interesting reasons) that Hugo DeVries coined the word "mutation" when working with it.

We now know that these aren't mutations in the current sense of that word; it was the right idea for the wrong reason.

Better Error Reporting in Shell Scripts

In the spirit of Perl Best Practices, here's improved error-reporting functions for shell scripts:
warn() { printf "$* at line %s file %s\n" $(caller) 1>&2 ; }
die() { warn $*; exit -1;}

Friday, June 27, 2008

Blog Photos in Picasa

I just discovered that all pictures I upload into a blog post are automatically tossed into a Picasa album.

I see them all if, for example, I'm in Gmail and click on the link to "Photos," in the list of services along the top.

This is quite clever of Google, I think.

Searches in Firefox 3

It's now easier to do keyword searches for search engines.

Search, above everything else, was what I remember noticing when I first switched to Firefox. What a good idea! I search a lot, from my browser.

I added a couple, and then discovered it's easier to add search engines than it used to be, so I added the Weather channel, with a keyword, too.

Thursday, June 26, 2008

The CPAN is a Mixed Blessing

The Comprehensive Perl Archive Network (CPAN) was the first serious package manager I ever saw. It seems to have stagnated.

When I first saw it, it seemed miraculous. If you asked it for something, not only did it get what you want and install it, it also got everything the package you'd asked for depended on! Amazing.

Yesterday, I got a Debian package, for one of my Ubuntu boxes, that had some Perl stuff. I'd already gotten pieces of it (maybe all of it) from the CPAN, at some forgotten point in the past. The versions clashed.

Ah! No problem. The new version's right. I'll just remove the CPAN version.

Oops! There is no CPAN "uninstall." My choices now are to update via the CPAN in addition to everything else, or to un-install my box and start over.


Wednesday, June 25, 2008

Perlcritic Whines at Me

I spent the evening playing with perlcritic, which criticizes my code based on the rules in Damian Conway's Perl Best Practices.

Every violation points to a page number, which turns out to be very useful.

Warnings come in levels: --gentle, --stern, --harsh, --cruel, and --brutal. It took me all evening to get a (very) simple Perl program to pass "brutal," but I did learn a lot.

Tuesday, June 24, 2008

New (to me) Desktop Tricks

Sometimes, just knowing a new desktop trick makes my day.

I offer three I learned in the last 24 hours:
  • F11, in Firefox, gives "full-screen mode." When you need the decoration, move your mouse up to the top of the screen and it reappears so you can use it. If you want to come out of full-screen mode, press F11 again.
  • A new set of updates appeared for Compiz Fusion, which made me go look at the options (System -> Preferences -> Advanced Desktop Effects Setting). Turn on 3-D menus, then you spin the cube.
  • Also, I like setting the cube to be transparent during rotation. ( set ... -> Desktop Cube -> Transparent Cube->Opacity During Rotation to 0)
Okay, time to reboot my box with a new kernel.

Monday, June 23, 2008

I can Write MathML, I just Can't Use It.

I want an equation-writing tool that will let me write equations in posts and email. I'm making progress, but still don't have something that's as easy as I want.

I found OpenOffice Math (oomath) will let me do stand-alone equation generation, and gives me the option to save the result as MathML. If I name the output file "whatever.xhtml" it displays just fine as a web page, in Firefox.

It won't, however, let me cut-and-paste into email or into blogger posts.

Friday, June 20, 2008

Execute Permissions on Directories

Tom Schneider, who does cool stuff at the NIH, just passed me this question:
> Ok I used chmod a+X regulon. Didn't know that directories had to be
> executable, that's kinda odd.

I agree, it is odd. It would be interesting to know why that is the case.

I'll cc this to Jeff Haemer, my friend who may know.
Sho 'nuff.

It doesn't make sense to "execute" a directory, so Unix used the extra bit for something else: searchability. Watch:
$ mkdir /tmp/foo
$ echo Molecular machines > /tmp/foo/toms
$ chmod -r /tmp/foo
$ ls -l /tmp/foo
ls: cannot open directory /tmp/foo: Permission denied
$ chmod +r-x /tmp/foo
$ ls -l /tmp/foo
ls: cannot access /tmp/foo/toms: Permission denied
total 0
-????????? ? ? ? ?
? toms

Thursday, June 19, 2008

Seeing Digital Diffs with Firefox Downloads

Well, it's nice that Firefox set a new world record -- out of the gate they got 4% of the browser share -- but, to be fair, anything would have been a new Guiness world record. It's a category that never existed before.

This, however, is an interesting graph. Who'd have thought Lithuania would see three times as many downloads as Russia, and that Austria would be an also-ran?

Wednesday, June 18, 2008

Dead-Tree Lists

I've been keeping to-do lists in RememberTheMilk, and recommend it.
But lately, I seem to have shifted to pen and paper. I don't know what that's about, but yesterday I went to the supply room and got a bound notebook to do it in. I don't really like the feel of the paper, but I'll try that for a while.

Tuesday, June 17, 2008

On the Other Hand ... Google Docs Does PDF

On the other hand, Google Docs now does PDF, too. Still, just read, but let's see if they beat Open Office to letting me write it. :-)

Yesterday, I got email with an attached .odt document. Gmail asked whether I wanted to look at it as a Google document. I said "Yes," and it came up fine. Another recipient asked for a copy in Word format "so people could read it."

I saved it in "Word format" -- Word 6, Word 95, and Word 97 -- and sent him all three. The first two were only 6 times the size of the .odt document. The third was ten times the size.

Saturday, June 14, 2008

Gears Back in Firefox 3

Gears seems to be working in Firefox 3, finally.

It was said that Firefox 3 was going to create its own "Google-Gears-like" stuff, whatever that means. That's nice. I want Gears now, and it was irksome that it stopped working in Firefox 3.

It's back, and I'm glad. It looks like Gears could turn into a bigger deal than I'd imagined, and I thought it was a big deal.

PDF in OpenOffice

You can now edit PDFs in OpenOffice.

Adobe's been noxiously reluctant to give us a PDF writer for Linux. Perhaps this'll fix it. Unfortunately, the extension needed for this requires PDF3.0, and I'm still at 2.4.

Thursday, June 12, 2008

Little, Scratch Spreadsheets

I want to do some experiments to time my access to CVSDude. Google Spreadsheets gives me a good place to stash the data.

Access speed for CVSDude has been very slow, in bursts. Is it our internet access, or is it CVSDude? I want to do a bunch of experiments, both at home and at work. Not earth-shaking data, but it's nice to have a place to stash them while I'm doing the work.

Google Docs lets me pop them into one spreadsheet, either place. Nice.

Wednesday, June 11, 2008

Sharing Equations

Well, now I know one way to cut-and-paste equations into Blogger and Gmail.

  1. Create the equations in Open Office, as "Formula Objects" (Insert->Object->Formula and go from there.)
  2. Send the to myself as email attachments.
  3. Open the attachments as Google Documents. The formulae show up as images.
  4. Cut-and-paste the image of the formula from the Google Doc to Blogger or Gmail.
Here's an example:

There are undoubtedly ways to simplify this process, but it's a start.

Tuesday, June 10, 2008

Is There an Easy Way to Put Equations in Posts?

I've spent yesterday evening figuring out how to create equations on my computer.

Lyx, which is supposed to be easy, just crashed. OpenOffice is a little more clumsy, but useable.

Having done it, I now can't figure out how to cut-and-paste from them into things like email or this post. I can attach documents or take screenshots, but that's pretty clunky.

Some forms are, however, clunkier than others. A simple equation that takes 10K in .odt (OpenOffice) format is 104K in Windows-97 format: a factor of 10 explosion.

If you're reading, and know how I can get equations into gmail or blogger posts, speak up.

Monday, June 9, 2008

Computer Algebra Bleg

Anyone reading have any experience with symbolic algebra packages on Ubuntu? I'm not seeing much posted out there -- a bunch of launchpad entries and one recommendation of maxima and wxmaxima.

I want something that makes it dirt-easy to type in equations and get symbolic answers: I type in something like this

x**2 - 2*s*x + s**2 = 0

and I get back

x = s

I do want, however, to be able to do systems of equations.

[Bumped, to get some other posts in the correct order. Besides, this didn't get any replies anyway. :-) ]

Bumblees: Installing the Nest

To finish up, here's K installing the "nest" next to the house. (This second post's because Blogger wouldn't let me put all of them in one post.)

All this just completed yesterday evening.

She says there's no guarantee it'll work, but she's done it successfully before.

Bumblebees: Making the Nest

Here are pix my friend Joyce demanded I take. I only got my thumb in two of them. :-)

You'll see K taking stuffing from an old mattress in our garage, lining a flower pot, putting a little honey into it, adding the queen bumblebee she caught (which she'd stuck in the fridge, and is still alive), and putting backing on it.

Thursday, June 5, 2008

3-D Printers

This article, on self-replicating machines, echoes a conversation I had when I worked at a printer company.

On a tour of the NCAR shop, arranged by an old pal, and fine fiddler, Charlie Martin, I saw a 3-D printer they were using to prototype parts.

I went back to work the next day, and said, "We ought to be building these."

I explained that, if nothing else, once we got good at them, we could have the printers print us copies of themselves.

Someone I was explaining this to, I think Louis Krupp, said this was short-sighted. We should, instead, have them print customers.

Wednesday, June 4, 2008

Goosh: the Google Shell

I've been on vacation off and on for weeks. Fun, but time to get back in the saddle. Here's a cute site I wish I'd done, Goosh, the Google shell.

Several comments about it at Lifehacker are interesting and useful.