Friday, February 26, 2010

More fishy Toyota horror stories

It seems the Toyota hysteria has spread to Australia:


A former recreational rally car driver says she experienced sudden unintended acceleration on four occasions while driving her 2008 Toyota Corolla Ascent in north Queensland.

Kuranda resident Mary Von Keyserlingk, 72, has come forward as the US congress investigates Toyota over safety defects linked to as many as 30 deaths.

Ms Von Keyserlingk said her latest scare was a "horror show", with her car speeding to more than 160 kilometres per hour.

"All of a sudden the noise was nearly deafening," she said.

"The heart was pounding and I thought, 'if this goes on any longer I'm going to die [from] a heart attack if nothing else'."


Wow. Scary. And this is a rally car driver. She must know what she's doing, right?


Ms Von Keyserlingk said she decided to turn the car off but she then lost control of the steering wheel.


Hm, odd, why would an experienced driver turn off the car instead of shifting into neutral?


"[Because] power-steering operates on computers ...


Um, no. The reason you lose your power steering when you turn the car off is not because the steering depends on computers, but because it depends on hydraulic pressure supplied by a pump that is driven by the engine. No power from the engine, no pressure, and hence no power steering. It's called power steering for a reason.

But here's the real kicker:


A spritely septuagenarian, Ms Von Keyserlingk still works full time and says she has always driven a manual car.


This car had a manual transmission! (Automatic transmissions are much less common outside the U.S. than in.) There is absolutely no way that a car with a manual transmission can accelerate out of control without either operator error or a serious mechanical failure that would show up on subsequent inspection. This car has a clutch and a manual linkage between the shift lever and the gearbox. You can physically disengage the engine from the drive train by either engaging the clutch or shifting the car into neutral. Now, it is possible for clutch linkages to fail (I've actually had it happen to me). It is even theoretically possible for a manual transmission linkage to fail, though I've never heard of such a thing happening. But it is not possible for both of these things to fail at the exact same time that you have a runaway throttle and leave absolutely no evidence behind. If a mechanical linkage breaks, it stays broken until you fix it.

[UPDATE:] The same article has this story:


Mudgeeraba resident Giulia Greenall says she had a similar experience in her 2007 automatic Toyota Corolla Ascent on three occasions.

On the third and worst occasion she says she was merging with traffic when "the car just started accelerating like mad".

Ms Greenall says tapping the brake pedal or accelerator failed to bring the vehicle under control, although it had worked on previous occasions.

"You could feel underneath your foot that the accelerator could move up and down, but when it got to a certain point there was this hell of a loud vibrating noise coming out of it and you had no control over that," she said.

"It was droning out this noise and vibration, you could feel it under foot. I thought, 'oh we're in trouble' so I pumped the brakes."

Ms Greenall says she travelled for up to 400 metres under full brake and full hand brake before she turned the car off and nursed it to the side of the road.

She estimates she was doing 80 kilometres an hour under full brake.


Again, this begs credulity. This is not a Camry, this is a Corolla. It has a 130 horsepower engine. It take more than nine seconds to get from zero to sixty under full throttle with the brakes off. This car can barely sustain 80 kph (50MPH) going uphill, let alone with the brakes on.

---

It's important to note that I'm not saying that there are no problems with Toyota cars. There may well be, I don't know. What I am saying is that many of the stories that are coming out sound fishy, and at least a few of them are flat-out physically impossible. Even that is not so disturbing -- people make shit up all the time. What bothers me is that all of this testimony is apparently being accepted uncritically without even the most basic reality checks being applied.

(Speaking of basic reality checks, think about this: Greenhall reports traveling for "up to 400 meters" before turning the car off. Doesn't that sound a little odd? 400 meters is awfully precise. And why hedge with "up to" instead of "about"? For that matter, why a distance? It seems to me that the natural way to recount an incident like that is in terms of time: "I was out of control for a minute or so." Distances are very hard to estimate even under non-stressful circumstances. Again, I do not doubt that something out of the ordinary happened, but "up to 400 meters" has all the earmarks of a concocted embellishment.)

Thursday, February 25, 2010

Xoogler for rent

Ever since I was a geeky kid lusting after a 48k Apple ][+ I've dreamed of moving to the Silicon Valley and making it big there. That dream came most-of-the-way true when I spent my year at Google, but even then I was commuting from LA so even though I've experienced the Silicon Valley dream, I've never really lived there (except for two six-month co-op stints when I was in college, but that doesn't really count either).

Looks like that's about to change. A few weeks ago we found a house that we really like, and today we learned that the last major obstacle to our buying it has been removed. So while this is not yet a done deal, it appears that Nancy and I are moving to Redwood City, and I'm going to be looking for a new gig. So if anyone reading this knows of any startups in the Valley that could use an ex-Googler/rocket-scientist drop me a line. I'm available.

I'll see your crocoduck and raise you...

... a crocodillo!

Unlike the crocoduck and the ever elusive jackalope, the crocodillo is (or at least was) a real creature. Take that, creationists!

Wednesday, February 24, 2010

Poor dog

Sometimes I think the entire world is going completely nuts.


We're at Wag Style, a doggie day spa on the side street of a trendy Tokyo neighborhood. I've brought Ruby here to test out a canine hyperbaric oxygen chamber .... The technology is the same as that rumored to be used by athletes ranging from Lance Armstrong to Michael Vick — it sends concentrated amounts of oxygen to problem areas in higher atmospheric pressure, supposedly expediting the recovery process.

Tears trump facts

Yesterday's Congressional testimony about the Toyota runaway acceleration problems featured a tearful Rhonda Smith testifying under oath about how she "lost all control of the acceleration of" a Lexus ES350 sedan in October of 2006. (Lexus is, of course, Toyota's luxury nameplate.) Here's a transcript (made by me so there might be the odd mistake):


On that thursday, October the 12th 2006, I was driving from my home in Sevierville and upon entering the interstate I accelerated with everyone else into the flow of traffic. At this time I lost all control of the acceleration of the vehicle. The car goes into passing gear and the cruise light comes on. I put the car into all available gears including neutral, but then I put it in reverse and it remains in reverse as the cars speeds to over 100 miles per hour down the interstate. I placed both feet on the brake after I firmly engaged the emergency brake and nothing slows the car. I prayed for God to help me. I called my husband on the bluetooth phone system. I knew [breaks down into tears]... I'm sorry... I knew he could not help me but I wanted to hear his voice one more time. After six miles, God intervened as the car came very slowly to a stop. I pulled it to the left median. With the car stopped and both feet still on the brake the motor still revved up and down. At 35 miles an hour it would not shut off. Finally at 33 miles per hour I was able to turn the engine off.


I'm sorry, but I don't believe her. It is certainly plausible that the cruise control kicked in uncommanded. It is even possible that the interlock that would normally have disengaged the cruise control as soon as she touched the brake failed. It is even possible that the brakes failed to slow the car below 100 MPH (although this begins to really stretch the limits of my credulity). But it is not possible that she "put the car into every available gear" including neutral and reverse, and that that failed to slow the vehicle. For that to have happened, the transmission would have had to first fail in a way that transmissions never do, and then somehow magically fix itself so that subsequent inspection of the vehicle would reveal no problem. That is simply not possible.

There are a number of other aspects to her story that I find highly questionable. We are supposed to believe that she's speeding down the interstate at over 100 miles per hour in traffic and yet she somehow still has the presence of mind to call her husband on the phone. I suppose that's possible, but it means that she wasn't focused 100% on trying to figure out a way to stop. Finally, at the end of her story, she flat-out contradicts herself when she says that first she was able to stop the car (with the engine still revving "up and down"). But then she says that the car was still going 35 miles an hour, and that at 33 miles an hour she was "able to turn the engine off." So which is it? Was she stopped, or going 33 miles an hour down the left median?

There are other troubling questions as well. She says that at 33 miles an hour she was "able to turn the engine off" but she made no mention of trying to turn it off before, only of stepping on the brake and shifting gears. And doesn't "33 miles an hour" seem suspiciously precise, particularly after making a point of saying that the car would not shut off at 35?

It doesn't add up.

I do believe that the car accelerated out of control. But the rest of her story sounds like cover to me. I don't know what happened after the incident started, but I'm pretty sure that whatever it was, it isn't what she testified to.

There are a lot of other weird things associated with this whole Toyota kerfuffle. Steve Wozniak's report of trouble with his Prius turned out to be at best overblown and at worst a publicity stunt. And it is also mighty odd that, as far as I can tell, not a single incident of unintended acceleration has been reported outside of the United States.

I'll go out on a limb and predict that when all the dust settles this will turn out to be a replay of the Audi incident.

Finally, the Wall Street Journal (which content should of course nowadays be taken with a big chunk of sodium chloride) reports that Rhonda Smith sold her Lexus after her incident, and that the new owners have driven it for 27,000 trouble-free miles.

Teach the controversy!

The idea that the earth is round is only a theory after all.

Hm, some of the flat-earth arguments actually make interesting reading. I don't think exposing kids to this stuff as an exercise in critical thinking would be an altogether bad idea.

Tuesday, February 23, 2010

I wonder who will be taking care of whatshisname?

Bristol Palin is starting a new career as an actress.


Bristol Palin, whose unplanned pregnancy became a national news story that engulfed her mother’s vice presidential campaign in 2008, is bringing her experience as a teen mom to bear on the small screen. ABC Family announced Tuesday that Bristol, the oldest daughter of former Alaska Gov. Sarah Palin, will play herself on an episode of “The Secret Life of the American Teenager,” a drama about a teenager who becomes pregnant.


I think it's telling that the name of Bristol's baby doesn't appear in the story. I wonder, too, if we'll be hearing much noise from the Right about Bristol not staying home to take care of her kid. I'm not holding my breath.

Monday, February 22, 2010

New and improved lexicons. Now 50% lexier!

Lexicons are a coding project I've been working on off and on for the last few years. Lexicons are lexically scoped global environments for Common Lisp. They are intended to be a replacement for (or an adjunct to) packages, which I've always found to be at best annoying and confusing to newcomers, and at worst fundamentally broken.

The main difference between this version of lexicons and previous versions is that lexicons are now seamlessly integrated with packages. Every lexicon now has a corresponding package with the same name, and lexicons store their bindings in symbols interned in those packages. So there is a straightforward mapping of lexical bindings to symbols.

The upshot of this is that you can now easily "lexify" a CL package make it accessible via a lexicon "wrapper." For example:


? (require :lexicons)
...
? (in-package :lexicons)
#<Package "LEXICONS">
? (defun foo () (scan "(a)*b" "xaaabd"))


Note that SCAN is not yet defined. Normally, this is what would happen next:


;Compiler warnings :
; In FOO: Undefined function SCAN
FOO


You would now have to go through the following steps:

1. Load the library with the SCAN function
2. Unintern the SCAN symbol in the current package
3. Import the SCAN symbol from the library
4. Recompile FOO

But watch this trick:


;Compiler warnings :
; In FOO: Deferring lexical binding of SCAN
FOO
? (require :cl-ppcre)
...
:CL-PPCRE
NIL
? (lexify-package :cl-ppcre)
#<Lexicon CL-PPCRE>
? (use-lexicon :cl-ppcre)
(#<Lexicon CL-PPCRE>)
? (foo)
Resolving binding of SCAN
1
5
#(3)
#(4)


Note that not only did you not have to futz around with uninterning any symbols, but you didn't even have to recompile FOO for it to do the Right Thing. Also, if we call FOO again:


? (foo)
1
5
#(3)
#(4)


notice that the deferred binding is only resolved once.

This version of lexicons aims to be a fully functional replacement for all applications of packages except for a few really esoteric symbolic computation applications. It provides lexical versions of function definitions, global variables, classes, class slots, methods, and macros, including fully hygienic macros using a technique invented by Pascal Costanza. (Actually, I came up with it independently, but Pascal greatly expanded on the basic idea.) It even provides dynamic bindings for lexical variables, so you don't need earmuffs any more:


? (ldefvar x 1)
1
? (defun dynamic-binding-demo () x)
DYNAMIC-BINDING-DEMO
? (let ((x 2)) (list x (dynamic-binding-demo)))
(2 1)
? (dlet ((x 3)) (list x (dynamic-binding-demo)))
(3 3)
?


This version only works on Clozure Common Lisp because it relies on some compiler hacks to intercept the compilation of undefined functions and global variables. But to make up for that, it is integrated into the CCL IDE so that arglist-on-space does the Right Thing for both lexified and standard CL functions.

I'm still working on documentation, but I thought I'd go ahead put this out there in case anyone wanted a sneak preview. Comments, bug reports, and other feedback are of course welcome. The code is here. The paper I wrote about lexicons a while back (which is now somewhat out of date) is here. You will also need this utility file.

Also on my todo list is getting all my public code into a git repository. Yes, I'm embarrassed that I haven't done this yet.

Friday, February 19, 2010

My love-hate relationship with Apple Computer

I finally got fed up with having to change the batteries in my wireless keyboard all the time so I broke down and bought a new wired keyboard for my Mac. This is my first experience with the new-style keyboards, and I have to say I'm in love. It's the smoothest typing experience I've ever had, and I've been hunting and pecking for a long time. (My first Apple was an Apple II Plus.) I decided to write the blog post mainly so I would have an excuse to do some more typing before I went to bed.

And I absolutely love OS X. Not just because it looks great, not just because it's unix under the hood, but because Cocoa is just a really well designed framework, and Objective C is a hell of a lot less painful to program in than C++. And of course, there's CCL.

But I absolutely hate Apple's heavy-handed approach to iPhone apps. Randomly pulling previously approved apps is more evil than anything Microsoft has ever done, and that is saying something. And not just because they can arbitrarily deprive a hard working coder of their livelihood, but because they seem to be determined to turn the app store into some kind of puritanical Disneyland.

I hate censorship. It's un-American. And I hate Apple for engaging in it.

But oh, I do love my new keyboard.

Thursday, February 18, 2010

So am I supposed to be afraid or not?

The NY Times (among others) reports:


A man crashed a small plane Thursday morning into a seven-story office building in Austin, Tex., that houses offices of the Internal Revenue Service, the authorities said. The pilot was killed. Two people were hospitalized, and one person was still unaccounted for Thursday afternoon.


However...


... federal officials emphasized that they did not consider the case to be a terrorist attack.


Eh? Why not?


Officials said the crash was being investigated as a crime.


Huh? I thought terrorism was a crime.

All the data seem to be consistent with the following theory: if a Muslim does it, it's terrorism. If a Tea Bagger does it, it's "merely" a crime.

[UPDATE: Apparently he wasn't a Tea Bagger, he was just crazy.]

Tuesday, February 16, 2010

It gets better

Or worse depending on how you look at it:


"More trouble looms for the IPCC. The body may need to revise statements made in its Fourth Assessment Report on hurricanes and global warming. A statistical analysis of the raw data shows that the claims that global hurricane activity has increased cannot be supported."

Friday, February 12, 2010

Got git?

One of the reasons I haven't been blogging much lately is that I've been studying Git because it seems to be what all the cool kids are using nowadays. It is taking me a while to wrap my brain around it, but I think it will prove to be well worth the effort. There's a lot of material out there and I don't have a whole lot to add to it, but there are couple of key ideas that I wish someone had told me from the get-go. So here they are for the benefit of anyone who wants to follow me down this rabbit hole.

1. Figuring out revision control systems and deciding which one to use for your own work seems to be a rite of passage for all programmers. Arguably the most crucial task of any non-trivial RCS is doing a three-way merge. Three-way merge is a bit of a misnomer. When you do a three-way merge you are really still merging only two files. But you are doing it with the aid of a third file, which is the "common ancestor" of the two files that you are merging, that is, it's the common file that two divergent lines of development started with before any changes were made. Figuring out which revision to use as the common ancestor for a merge is one of the most complex tasks that an RCS has to do, particularly if the files being merged are the products of previous merges. There are lots of different approaches. This is one of the key features that distinguishes one RCS from another.

2. In order to find common ancestors, most RCS systems explicitly store metadata about the history of a file. In other words, in the RCS database/repository there will be information along the lines of, "The original version of file foo.c was... it was then changed to..." This is the reason that you generally have to use separate commands to inform the RCS when files are created, renamed, and deleted.

3. Most RCS systems store file histories as sequences of changes rather than complete snapshots in order to save space.

4. Git is unique among RCS systems in that it does store complete snapshots and not changes, and it does not store explicit metadata about file histories. Git avoids becoming horribly inefficient by using a content-based storage system so that you don't store multiple copies of the same file. Also, Git finds common ancestors for merging using a heuristic algorithm rather than explicit metadata. This has a number of important consequences.

First, Git is useful for more than just revision control. It can be used as a back-end storage system for a wide variety of applications.

Second, in a "normal" RCS, which stores file histories as a sequence of deltas, these sequences form a chain of dependencies. This makes the repository very sensitive to data corruption; if you lose a delta, all of the downstream snapshots become corrupt. It also makes it difficult or impossible to make retroactive changes to the commit history. But Git stores every commit as a complete snapshot, so there is no chain of dependencies. If part of the repository becomes corrupt, that corruption doesn't "spread downstream" the way it does in a delta-based RCS. Furthermore, the content-based storage system that makes all this efficient uses SHA-1 based hashes as keys. This means that if the SHA-1 hash of an object is correct that guarantees that the underlying data object is not corrupt. So not only is Git able to contain repository corruption when it happens, it is able to detect it when it happens as well. And, as a corollary, it can also tell when corruption has been successfully repaired.

Third, there is no distinction between a commit and a branch except for a little bit of bookkeeping. This means that creating a new branch is no more expensive than creating a new commit. In most RCS systems creating a new branch is a relatively expensive operation. But in Git it's cheap, so creating new branches can become an ordinary part of day-to-day workflow.

5. The underlying machinery of Git (which is called the "plumbing") is pretty simple and easy to understand. By way of contrast, the UI layer that is built on top of the plumbing (which is called the "porcelain") is horrifically complex. It's that complexity combined with the unorthodox nature of Git's design that makes it intimidating for many people. I would recommend learning the plumbing first and then tackle the porcelain. (Here's another handy reference.) I would leave the actual manual for last. It's a good reference once you know what you're doing, but I found it a less than optimal way of climbing the learning curve.

Finally, the Git community is very helpful and supportive. So if you've been thinking about taking the Git plunge, I recommend it. It takes a little getting used to, but once you understand it it's very powerful. Besides, it's better than anything else. :-)

I need a sanity check

Last night I was engaged in an email exchange with a person whose views I generally respect. The following exchange ensued, starting me my responding to a point that he had made:


Me: You're confusing two different things ...

Him: No, I'm not confused at all. See, this is why I say that once you start disagreeing it's a waste of time to try to communicate with you. Or at least too upsetting for me to want to engage in. You rapidly veer into putdowns and insults. "You're confused" is an insult. "I have the following different way of looking at it" is a constructive disagreement. See the difference?

Me: I didn't say you were [confused]. "Confusing two different things" and "being confused" are not the same thing.

Him: Stopped reading after this. End of discussion. Thanks for what information you did provide while it lasted. Unfortunate to be reminded of my problems with you. Oh well.


This really bothered me. (I lost sleep over it in fact.) So I need a sanity check. Is it really an insult to say to someone, "You're confusing two different things..."? Or is this person being overly sensitive?

Friday, February 05, 2010

Ron prognosticates: The Supreme Court will uphold human gene patents

It has been a while since I put on my prophet's hat, but this seemed like a good opportunity. The ACLU is suing to stop the patenting of human genes on the grounds that human genes are natural phenomena, which cannot be patented. From a legal point of view the case seems like a slam-dunk to me, and I predict that the district court will rule that way. I then predict that the Supreme Court will overturn that ruling on a 5-4 vote (possibly 6-3 if Justice Bryer retires before then and Obama is snookered into replacing him with a neocon sleeper).

Can you tell that I have gotten a tad cynical about the Supreme Court?

Wednesday, February 03, 2010

Required reading

Just finished reading Karen Armstrong's A Short History of Myth. Totally awesome book. Definitely on my Required Reading list. In fact, I'd say it's a contender for the Most-Important-Book-No-One-Has-Read prize.

A few choice excerpts (and keep in mind, this is written by a woman who considers herself a Catholic):


Mythical thinking ... ha[s] helped people to face the prospect of extinction and nothingness, and to come through it with a degree of acceptance. Without this [mythical] discipline it has been difficult for many to avoid despair. The twentieth century presented us with one nihilistic icon after another, and many of the extravagant hopes of modernity and the Enlightenment were shown to be false...

[Rationalism] has in many ways transformed our lives for the better, but this has not been an unmitigated triumph. Our demythologized world is very comfortable for many of us who are fortunate enough to live in first-world countries, but it is not the earthly paradise predicted by Bacon and Locke. When we contemplate the dark epiphanies of the twentieth century, we see that modern anxiety is not simply the result of self-indulgeny neurosis. We are facing something unprecedented. Other societies saw death as a transformation to other modes of being. They did not nurture simplistic and vulgar ideas of an afterlife [like having seventy-two virgins in heaven - ed] but devised rites and myths to help people face the unspeakable. In no other culture would anybody settle down to a rite of passage or an initiation with the horror unresolved. But this is what we have to do in the absence of a viable mythology [emphasis added]...

We must disabuse ourselves of the nineteenth-century fallacy that myth ... represents an inferior mode of thought. We cannot ... return to a pre-modern sensibility. But we can acquire a more educated attitude to mythology. We are myth-making creatures... we need myths that help us realize the importance of compassion, which is not always regarded as sufficiently productive or efficient in our pragmatic, rational world. We need myths that help us ... to see beyond our immediate requirements, and enable us to experience a transcendent value that challenges our solipsistic selfishness. We need myths that help us to venerate the earth as sacred ... instead of merely using it as a 'resource'. This is crucial because unless there is some kind of spiritual revolution that is able to keep abreast of our technological genius, we will not save our planet.


It's only 149 short pages. Buy it. Read it.