Hiking the Argentina Trail

June 24th, 2009

it’s hard to say anything really coherant about South Carolina governor Mark Sanford’s disappearance on the Appalachian Trail to Argentina, largely because the story is such an incoherant mess.

TPMmuckraker has a chronology of the events in this bizarre scandal, but this image from The Daily Show probably makes events just as clear as the chronology does.

Where in the world is Mark Sanford?

Where in the world is Mark Sanford?

The thing that is obvious in all of this, though, is that Sanford was trying to hide something.

What was he hiding?  Jjust your typical garden variety party-of-family-values unfaithfulness.  He was cheating on his wife.

Gov. Mark Sanford admitted today that his secret trip to Argentina over Father’s Day weekend was to visit a woman he is having an affair with.

[…]

“I have developed a relationship with what started as a dear dear friend from Argentina. It began very innocently as I expect many of these things do, just casual email back and forth,” Sanford said. “But here recently this last year developed into something much more.”

Did he, perhaps, get a hot tip from our attorney general on how to use Craigslist to meet exotic people?  Was Sanford trying to upstage John Ensign’s media coverage?  Or was he merely ensuring that the only political party who will get anywhere near him as a presidential nominee in 2012 will be the Libertarians?

Sanford’s going to need another press conference to answer these burning questions. 🙂

At any rate, we now know that the governor of South Carolina handles affairs of state about as well as he handles his other … affairs.

Fun with non-Newtonian fluids

June 19th, 2009

Terra Sig links to a neat demonstration of the properties of non-Newtonial fluids.  Or, more specifically, the properties of shear-thickening fluids – fluids whose viscosity increases when deformed.  Put simply, these are liquids that act more like solids when you try to change their shape too quickly.

The test fluid for the demonstration?  Silly Putty.  Fifty pounds of it.  Dropped off of a building.  Neat, eh?

I do have a suggestion for next year’s demonstration, though.  Drop the fifty pound silly putty block from the building into a large vat of corn starch in water.

Why corn starch and water?  Corn starch/water mixtures are also shear-thickening fluids.

Which shear-thickening fluid would reign supreme?  Tune in next time to find out!

Which shear-thickening fluid would reign supreme? Tune in next time to find out!

It’d be an Iron Chef of non-Newtonian fluids!

The Tablet and the Jackalope

June 18th, 2009

Yesterday, I did something that I’ve never done before – a mid-semester major distribution upgrade.  I have a Thinkpad X61 Tablet which I use for teaching, and that tablet runs Ubuntu Linux.  I’ve also set Patty up with a Thinkpad X41 tablet to replace her ancient Thinkpad X31

So how did it go?

Thinkpad X41 Tablet

Ubuntu has been broken by default on tablet PCs for some time.  By “broken”, I mean that after an installation, the tablet stylus doesn’t work.  If you know what you’re doing, it’s not too difficult to make it work, but it’s still a headache that shouldn’t exist.

With the latest Ubuntu (Jaunty Jackalope), the tablet pen functions without any additional configuration.  In fact, essentially all of the X41’s most important hardware is configured on installation.  But there are a few exceptions, and here they are!

Fingerprint reader

The fingerprint reader is not set up automatically.  Since I don’t use the reader, I didn’t feel that manually setting up the fingerprint reader was a deal-breaker.

Tablet keys

The tablet keys (underneath the display) are not configured by default.  This one is a bigger deal, since you’ll need those keys to use the tablet as, well, a tablet.  After is bit of googling, here’s the fix to get the X41 tablet keys going.

Essentially, make a script that contains this:


#!/bin/sh -e
setkeycodes 6e 109
setkeycodes 6d 104
setkeycodes 69 28
setkeycodes 6b 1
setkeycodes 68 130
setkeycodes 6c 131
setkeycodes 67 132

… and save it as (or add it to) /etc/rc.local

This script is executed every time you boot up.  It assigns the correct keycodes to the tablet keys.  (This is something you didn’t have to do in previous Ubuntu releases.)

Rotation

To use the tablet as intended, you probably want to rotate the display.  As with all previous incarnations of Ubuntu, this is not set up for you after the installation.  You’ll find various scripts on the internet for rotating the screen and stylus, but most of them won’t work on Ubuntu Jaunty Jackalope because of … the way the tablet pen is automatically configured.  So, the pen is now set up for you, but it’s set up in such a way as to make changing its behavior (which you’ll need to do to rotate the screen) more difficult.

Here’s a simple rotation script thta works with Ubuntu Jaunty Jackalope on the X41 tablet and X61 tablet, provided you have the 1024×768 screen.  If you have a larger screen, you’ll need to modify the script accordingly.  Save it as /usr/local/bin/rotation.sh


#!/bin/bash
orientation=`xrandr -q | grep -c 1024x768`
echo $orientation
if [ $orientation -eq 2 ]; then
/usr/bin/X11/xrandr --orientation right
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate 1
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Rotate 1
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" xyDefault
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" xyDefault
else
/usr/bin/X11/xrandr --orientation normal
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate 0
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Rotate 0
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" xyDefault
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" xyDefault
fi

Execute the script, and the screen and stylus will be rotated. Execute it again, and the screen and stylus will return to their normal orientation. This is good to assign to the “rotate” button underneath the screen, but you can execute the script from a terminal as well.

Thinkpad X61 Tablet

Setting up Ubuntu Jaunty Jackalope on the X61 tablet is fairly similar to setting it up on the X41 tablet.  As before, much of the important stuff is automatically set up by the installation.  However, the X61 tablet has a few more quirks than the X41 does.  Here they are!

Fingerprint reader

Same as the X41 tablet.

Tablet keys

By default, the directional keys, enter, and the escape button work as expected.  The other keys will require a similar script to the X41 9above).  I haven’t messed with figuring out the keycodes for the X61 tablet yet, though.

Rotation

Same as the X41 tablet.

Desktop effects

On the X41 tablet, these “just work”.  On the X61 tablet, they will “just work” when a certain set up updates is made official in Ubuntu Jaunty Jackalope.  But as of 6/17/09, you’ll need to enable the “proposed” repository (which contains the newest updates that haven’t gone through as much quality control as what you’d get through the normal update channel). 

Here’s how to enable the proposed repository.  You need the latest compiz and xserver-xorg-video-intel packages to get desktop effects working.

Or, you can wait until the compiz and xserver-xorg-video-intel updates become official.

Improving video performance

The X61 tablet (and the X41 tablet, too) have Intel video cards.  The Intel video driver for Linux is currently in the middle of a redesign.  That’s bad for laptop users, because it makes video performance in recent releases of Ubuntu quite horrible.  The X41 tablet is affected somewhat, but the X61 tablet suffers terribly from the reduced performance.

The real fix for the video problems won’t come until the next release of Ubuntu, but you’ll likely want to be able to use your computer properly before then.  Here’s what you need to do:  Follow this HOWTO from the Ubuntu forums.  I used the “optimal” procedure, and am getting better video performance without any crashes so far.

(This procedure will also work for the X41 tablet, but with a more modest performance gain.)

Changing the pen’s behavior

The X61’s stylus features an eraser tip, a side button, and a pen tip.  I wanted the side button to bring up context menus and the eraser to paste (when not being used by an application like xournal).  So, I made a little script to change the behavior of the buttons.


#!/bin/bash
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Button1 "button 1"
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Button2 "button 3"
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Button1 "button 2"

I saved this as /usr/local/bin/stylusbuttons.sh, which i have set to run when I log in. Now the stylus buttons work the way I want.

I’ve managed to get though a day of teaching wit hthe new install without incedent.  So far, so good!  Anything to add?  Improvements to the stuff above?  Configuration questions?  I’m all ears!

Easy as A-B-C

June 14th, 2009

I expect a recording contract to show up in the mail soon.

What do you think?

Building collapse in NC

June 9th, 2009

Working with chemicals in an industrial setting can be dangerous.  Take this example from North Carolina today, where 20 were hospitalized after an explosion and building collapse:

GARNER, N.C. (AP) — Three people were missing and 20 taken to hospitals after an explosion at a Slim Jim meat products plant in North Carolina, officials said Tuesday.

[…]

“There is a toxic cloud on and about the plant,” Williams said.

[…]

The site produces Slim Jim products. Williams said several people reported hearing an explosion before the building partially collapsed.

The toxic cloud is probably ammonia – very nasty to breathe.  (The article mentions an ammonia leak not yet being contained.)

In true Internet fashion, there’s already a video of the cause of the explosion and collapse.  I’ve embedded it below.

(I do realize that  I’m going to Hell for this post. But I can’t help it; this was the first thing that came to mind when seeing the AP article about the collapse.)

If this doesn’t show up on TLC, I’ll be shocked

June 1st, 2009

If this doesn’t show up on TLC in the near future, I will be shocked:

Nadya Suleman, who gave birth to octuplets in January, will star in a reality television series about her family, a TV executive said.

[…]

The “quasi-reality TV series” would be “an arrangement whereby several events in the children’s lives would be filmed in a documentary series,”

Anyone remember when TLC was “The Learning Channel”, not “The Lame Channel”?

And in case anyone wonders what “Octomom”‘s motivations are, the linked article supplies some insight:

Suleman has sought to trademark her media nickname — Octomom — for a TV show and a line of diapers.

The cat’s from Barcelona

May 28th, 2009

While I wait for tomorrow’s test to finish copying, I thought I’d share a sign posted on the bulletin board   Need an anatomy and physics book?

Used 210/211 anatomy and physicology with cat manuel.  Very good condition.  I only used it two weeks las semester.

Used 210/211 anatomy and physicology with cat manuel. Very good condition. I only used it two weeks las semester.

A real bargain, since it includes a cat from Barcelona!

My excavator!

May 22nd, 2009

The road between Cate’s daycare and our house has been under construction for some time, since a new bridge over the highway is being built.  So Cate sees a lot of earth movers, bulldozers, and so forth – and has become quite fascinated with them.  She comments every day on the “tractors” and how much she likes them.

She also likes my computer.  And if I let her use my Ebay account, I’m sure that she would probably do this:

A New Zealand couple nearly found themselves in a financial hole when their three-year-old daughter bought an earthdigger in an internet auction.

The child, Pipi Quinlan, was trying out her online skills while her parents were asleep in bed.

As Cate would say:  “I want one tractor!  For me!”

New unemployment data is out

May 22nd, 2009

April unemployment data has been released, and South Carolina again ranks third in the nation in unemployment at 11.5%.  Only Michigan (12.9%) and Oregon (12.0%) fared more poorly than we.

The State notes that our seasonally adjusted unemployment is a new record for South Carolina – highest since recording started in 1976.

When does this become a “depression” rather than a “recession”?

The comments on that The State link above are interesting.

Comments from The State's article

Comments from The State's article

Right away we have a couple of folks blaming Obama for South Carolina’s economic woes, while at the same time our Governor is adamant about refusing any help from the Obama administration.  He’s so adamant about this that he’s filed a lawsuit about it.

Perhaps someone can educate me.  How is our state government’s refusal to accept help from the Obama administration Obama’s fault?

(Crossposted to Indigo Journal diary…)

Nice way of putting it

May 21st, 2009

The Morning News has an interesting way of describing what we need to do to get our rates of teen pregnancy under control:

South Carolina spends $3.8 million on teen pregnancy prevention. Much of it has gone to programs focused only on abstinence. Though abstinence is part of the solution, it must be combined with reality-based sex education.

Emphasis mine.  Abstinence-only sex ed versus “reality-based” sex ed is a nice way of putting it.  It at least admits what our real problem is … abstinence-only sex ed isn’t actually sex ed at all.  It wastes resources without getting us much in return.