Saturday, January 4, 2014

Self-driving cars: can you trust the software?


Recently, there's been a lot of media coverage over self-driving (or autonomous) cars. DARPA has funded several challenges, open to all comers, for developing autonomous vehicles. A Stanford University team won the 2005 Grand Challenge, and a Carnegie-Mellon team won the 2007 Urban Challenge.We all know that Google has been developing and using self-driving cars for a while; see this Wikipedia entry for more details. In a recent keynote presentation  - "Google's Self Driving Cars: The Technology, Capabilities, & Challenges" - at the 2013 Embedded Linux Conference, Andrew Chatham claims that they've driven over 400,000 miles. Not a tremendous amount, certainly, but rather enough to have gained a lot of experience and press coverage. 

Now we're told: "Fully self-driving cars expected by 2030"; at least that's what is claimed at this point. And the article goes on to state that a few automobile manufacturers expect to have some of that capability as early as 2025. Sounds pretty terrific: reduce accidents, help the environment, let visually-impaired people drive again: it's a long and exciting list of benefits.

All this is done through hardware and (lots) of software... very complicated stuff. And the software engineers associated with this effort are smart, earnest, hard-working, and well-meaning folks. 

Sounds great... right?

Well... maybe not? We've also heard a great deal about software failures recently. The Affordable Care Act website was late and extremely buggy (I don't have to give you a link for this -- it's all over the web) and is only the latest and most visible example. There are many more. Just Google "recent software failures" and you'll be treated to a cornucopia of problems, like the first entry in Highest profile software failures of 2012 which describes a software trading bug which "cost a trading firm $440 Million in 45 minutes". The list of such failures is seemingly endless. On a more personal note, I'm sure many of you have experienced software problems with your everyday applications, or tried to upgrade a program only to introduce new problems.

We in the software industry have gotten much better at delivering good software at the same time as we're delivering way more complicated applications than were dreamed possible in the not too distant past. Whoddathunk you could pack that much functionality in a smartphone? The original Bomar four-function calculator was bigger and heavier than today's iPhone or Android phone. But that certainly doesn't mean we've got it all figured out, as all those high-profile (as well as multitudinous small) failures suggest. Robert Martin (a leading light in the software industry, fondly known as 'Uncle Bob') has an excellent article about the problems in the software industry

There's also a social question associated with self-driving cars, as expounded in "Why Google's Driverless Car is Evil" by Brad Berman. He also raises the question of security: can we make cars safe from being attacked and taken over for nefarious ends? We certainly haven't done a great job with personal computers.

The question is: what do we have to do -- what can we do -- to improve our software development capabilities so that all those self-driving cars don't wind up driving over a cliff?