Email of the day on programming errors in autonomous vehicles
Now here's a thought from your friendly local software expert: Microsoft Windows has approximately 50 million lines of code and 1 defect per 2,000 lines of production code (as reported by Sogeti Labs). Industry production code is often reported to have 15-50 defects per 1,000 lines of code (Kloc). My head says Windows therefore has 25,000 defects. Not all defects can be tested out. Not all defects get "seen", because they are in rarely-executed code. Not all "seen" defects cause the blue screen of death, of course. But some do. ("The blue screen of death" is when a computer freezes up completely - on Windows machines, a blue screen is displayed with basic information intended to help an expert determine what went wrong.)
According to The Visual Capitalist, the autonomous control software in a self-driving car has about 100 million lines of code (and growing), so if a self-driving car has the same software quality as Windows, it should only have about 50,000 defects. Not all defects get "seen", because they are in rarely-executed code. Not all "seen" defects cause the blue screen of death, of course. But some do.
Oh, but but but the pointy-hair guy (the non software engineer) proclaims loudly, surely Tesla does a much better job of testing than Microsoft (with a LOT less engineers than Microsoft, maybe just to mention). And of course the other companies building similar software will also do a much better job of testing. Wow, maybe 10x better. So that self-driving car which will be hurtling you down the crowded freeway at 75 mph should only have 5,000 defects. (If you believe you can get 10x better testing results without spending a lot more than 10x the $, I have a really cool virtual bridge to sell you.) Not all defects get "seen", because they are in rarely-executed code. Not all "seen" defects cause the blue screen of death, of course. But some do...
Microsoft actually does a good job of testing. 10x better quality is really hard, and doing it with less resources, maybe not so doable. The space shuttle is the only large piece of production code that I know of where defect density was driven to near-zero - it cost many thousands of dollars per line to get that result, and the system was only 400,000 lines of code.
Hop in, let's let the car take us for a spin.
My view – Thank you for this account which highlights the enormity of the challenge in getting self- driving cars on the road. There appears to be a “you can’t make an omelette without breaking some eggs” attitude surrounding the sector right now. However, with the number of fatalities mounting from both Tesla’s semi-autonomous features and now Uber’s killing of a pedestrian the focus of attention is likely to be turned towards the safety of these products.
Google is probably alone among the companies pursuing the problem with the financial resources to complete the kind of proof reading required to iron out all the quirks of programming.
Back to top