Hacker Newsnew | past | comments | ask | show | jobs | submit | somebodyother's commentslogin

Ah, I love this stuff. Tim Roughgarten's work on selfish routing was my bible through an undergrad research project, it's succinct and packed with excellent proofs. https://mitpress.mit.edu/books/selfish-routing-and-price-ana...


Also, it implies a couple of engineers could slip through arbitrary code to be executed under selective conditions. That's terrifying.


But also probably true, regardless of this specific situation.


From what I know of the car industry, coding standards are very low. I don't think any car companies would look good if their code was audited by professional software engineers in other fields.


Then you don't know the motor industry very much as it has very strict coding standards like ISO 26262, the code has to be audited internally and by certified 3rd parties with every release to meet the development cycle requirements of the standards.

http://www.ldra.com/en/software-quality-test-tools/group/by-...

The industry also has specific coding standard for every language that is used in embedded systems like MISRA-C https://en.wikipedia.org/wiki/MISRA_C

Today every thing you do with your car from using breaks to deploying air-bags is done through the computer, there's no way in hell that the motor industry would be releasing poor code "intentionally" because it would cost them billions in liabilities.


And you're not familiar with what happened when a 3rd party (Michael Barr) was allowed to FINALLY look inside Toyota's engine code and determine the cause of the "Unintended Acceleration" problem:

"Barr checked the [Toyota] source code against MISRA’s 2004 edition and found 81,514 violations."

http://www.safetyresearch.net/blog/articles/toyota-unintende...


The model year 2005 Camry in question from the trial would have been made available in 2004, and the electronic throttle control system was designed prior to 2004 (IIRC, the ETC design was carried forward from the previous model). How does it makes sense to apply MISRA-C:2004 in this case, especially when the Toyota ETC in question was admittedly not designed under MISRA-C:2004 nor prior MISRA-C revisions?

It is inaccurate to claim Michael Barr determined the cause of Toyota's unintended acceleration: he proposed a possible failure mode that was persuasive to a lay jury. His proposed failure mode didn't leave a DTC, so there's no way to actually know if his proposed failure mode actually happened in this case (or in any other).


Barr always struck me as something of a charlatan trying to bamboozle a jury.


I remember when this was posted on HN before, what I always wondered about is the discrepancy between the violations that NASA found and Barr.

NASA found 7000 and change Barr found over 81,000, I'm not sure whats the size of the code that was reviewed but that's allot, even if you count the fact that half of them might be silly like naming convention violations that still leaves quite an odd number for actual violations especially when considering that the code for an embedded system can't be that huge.

And the 10,000 global variables thing, well 10,000 sounds like a huge number but there wasn't any mention if they were a) necessary, b) implemented correctly, and c) out of how many variables in total? if the code they've tested has say 1 million variables then well.... And how they described global variables is also weird, they claimed that every software within the system can access them to me this sounds that your stereo or the rain sensor for the wipers can override data for the breaks, but that might be true only if everything is running within a single application.

If the breaks run as an independent application well then only every function within the break software (depending on the language and how global variables are implemented) could potentially access those variables.

To me pretty much that entire explanation seem to be constructed to sound worse than what it is, which is why I think that expert witnesses should only be allowed to be appointed and called by the court it self (as in by the judge so they and the jury could understand the technical details better) and not by either the defense or the prosecution.


> there wasn't any mention if they were a) necessary,

They were not. It is never necessary to have 10,000 global variables. If you have 10,000 global variables you are systematically Doing It Wrong. (That's not to say it's uncommon. From my experience I strongly suspect that it's a very common practice.) As one of the witnesses put it, quite correctly IMO:

"And in practice, five, ten, okay, fine. 10,000, no, we're done. It is not safe, and I don't need to see all 10,000 global variables to know that that is a problem,” Koopman testified.

Trying to justify this is like trying to justify not having a bug tracker. Which, BTW, they didn't.

> b) implemented correctly,

There's no way to check 10,000 global variables to see if they're implemented correctly, and that's the entire point.

> and c) out of how many variables in total?

That is completely irrelevant.

> they claimed that every software within the system can access them to me this sounds that your stereo or the rain sensor for the wipers can override data for the breaks,

This was the ECU, it only controls the engine, not the radio or the wipers. It has tasks for stuff like monitoring the engine and wheel speeds, the accelerator and brake pedal positions and controlling the fuel injection. And all of those tasks were only an extra header file and a typo away from stomping on one of the 10,000 global variables belonging to another task, but that isn't even the issue. The issue is that there is no way to trace the flow of data in the system because it's completely unstructured.

> but that might be true only if everything is running within a single application.

Welcome to the world of embedded RTOSs, where everything is running within a single application. It's not a PC. "Applications" aren't a thing. There's certainly no memory protection.


    > Welcome to the world of embedded RTOSs, where
    > everything is running within a single application.
    > There's certainly no memory protection.
Generally, I agree, even though there have been quite a few chips already that have a primitive "Memory Protection Unit" that typically only distinguishes two processor states and you'd be able to protect the working data of e.g. the scheduler and your watchdog from the rest of the code running on your system. Which is much better than nothing!

But in the end the important consequence is: Having everything in one address space encourages people to violate the concepts that memory protection between tasks on your PC typically enforces, e.g. tasks reading from, and writing to other tasks' data structures without proper synchronization; instead of using proper IPC mechanisms like queues. Which is probably what these 10'000 global variables were used for.


And this would be why Toyota engineers _forgot which direction their stack was growing in_ and shit all over MISRA-C (see https://news.ycombinator.com/item?id=10355200)?


I've worked at a couple different companies that made safety critical software, and I have to agree with joezedeco.

Dav3xor's Law -- Code Quality is Inversely Proportional to Risk.


And 2 of my friends worked for BetterPlace (RIP) and it took years for Nissan to accept the code which had to be rewritten to comply and certified by an external 3rd party. And that code wasn't even "mission critical" in terms of road safety.

Anecdotal evidence is anecdotal.


Any theories why? Maybe because these big systems are outsourced to multiple low-ball vendors and their stitched together?


I have seen both very good code and very bad code. Standards are in place for making it good but it really depends the most on who's implementing it and the SW team culture.


The code might even have been outsourced. I'm not trying to disparage outsourced developers, I know what I might do if the user story was something like "Needs to pass emissions when attached to test system."


"As an emissions test, I want to pass the car."


In that case it would probably be "The system shall pass all emissions tests"


Under all conditions? Under normal conditions? Low-temperature? High-temperature? At 10,000 feet? Only when attached to the test harness?


Actually the usual form for this kind of requirement would be "The system shall comply with <emission regulation>".


It shouldn't matter. Another test process should have caught incorrect code. The car should be tested to the specs and the specs should reflect the regulations.


If that's the case, the execs are even more at fault for not having proper controls in place to prevent rogue employees from jeopardizing the entire company.


Welcome to real life.


And, supposing this is true, would you actually be surprised by this? This is a car company, not a CI and code-review obsessed software company in Silicon Valley.


> This is a car company, not a CI and code-review obsessed software company in Silicon Valley.

I read that as:

> This is a company whose products are high-velocity 1500kg chunks of steel zooming around in public, not a company that sells an intangible virtual good/service

---

Yes, I know software is historically poor with car companies, but we should still expect better. Let's not just lower our standards because of cynicism :-)


I found products made by car companies to be in general more reliable than those made by software companies (either in Silicon Valley or not). I trust my life to my car (software included) every day. I wouldn't do that with any software of my smartphone, not even the OS.


Doesn't it blow your mind that there are no "standards of engineering" or whatever for software? There's no licensure body for software engineers who build software running your car, and therefore no accountability on a personal level.

When an engineer builds a bridge, she has to personally sign off on the bridge, saying it's safe, and is risking not only her professional career, but I think she can also be jailed and held criminally liable if the bridge kills people due to negligence.

It blows my mind, at least, that no such thing exists for software.



None of those are what I described, though.


> Doesn't it blow your mind that there are no "standards of engineering" or whatever for software?

ISO, IEC, etc.

> There's no licensure body for software engineers who build software running your car, and therefore no accountability on a personal level.

MISRA, SCSC, etc.


Combine my individual sentences, as I did, and try again.



The big problem with all those standards, frankly, is that you've gotta pay money to actually evaluate them.

There aren't any guarantees that they'll be useful, that they'll match the modern development processes in your language, that they'll fit your problem domain, etc.

Those standards are there primarily to make the publisher a buck--not to represent the codified wisdom of up-to-date practitioners in a field.

Until we've got a truly open-source standard for people to code against, we should stop wringing our hands about these things.


Not sure whether software is the domain that standards should be applied to. Software is just a tool.

If you use software to build a bridge, bridge standards should apply. If you use software to build a car, car standards should apply.

If you use software to build a fart app, fart app standards should apply. (Which frankly, don't have to be very high.)


If you could have perfectly safe software, without requiring individual engineers to be licensed, would that be acceptable to you?

I'm not asking if you think such a thing would be possible or not - I'm asking if you would accept an alternate means of getting what I think we both want.


A company I worked for had a permit to practice and required engineering sign-off for each release.


And a German one and from experience dealing with German companies software isn't regarded I the same light as what they would consider "proper engineering"


Someone else posted this higher up:

Then you don't know the motor industry very much as it has very strict coding standards like ISO 26262, the code has to be audited internally and by certified 3rd parties with every release to meet the development cycle requirements of the standards. http://www.ldra.com/en/software-quality-test-tools/group/by-.... The industry also has specific coding standard for every language that is used in embedded systems like MISRA-C https://en.wikipedia.org/wiki/MISRA_C



I wonder what the NTSB thinks about this. This is a clear safety issue.


US vehicle safety is governed by NHTSA, and they are already using this to push for further regulatory power.

http://www.detroitnews.com/story/business/autos/foreign/2015...


Remember the Toyota code, or at least the review, that was leaked a while back? I don't find it surprising at all that it would be possible to sneak through some stuff that no one knows what it does. And in that kind of environment, people generally don't mess with stuff they don't know what it does, cause they don't know what it'll break.


Aside from some veiled (but still unacceptable) misogyny, I don't see anything objectionable in the default subs. The ratio of homophobic, racist, and antisemitic remarks seems in the ballpark of any southern high school.

Is this something to still actively fight and change? Yes. But you yourself pointed out that reddit isn't making the content, nor are they encouraging it. What if the solution is MORE connected free speech, not less? The more representative a user base reddit gets, the less bigoted they'll be. I'm more worried about secretive and niche networks of extremists.


Completely agreed, but "southern" is pretty unfair there... I know from personal experience Northern/Western counterparts are just as bad. Young people in general have a large capacity to be cruel regardless of geographic distribution.


Are we saying that a "southern high school" is an environment to which no civilized human being should be subjected? b^)


> almost certainly they will reach the max number of complainants and end up only paying each person the minimum.

it's like some kind of crazy realized game theory problem.


Oh man, this is really impressive. I'm usually incredulous of applied NLP but this seems to have fantastic possibilities so close to implementation, it just needs a hip little web app wrapper. I hear gradients are in.


Also true for pretty much every other term I've seen mainstream journalists 'learn'... hack, app, cloud, algorithm...


We've spent generations filling our every waking moment with more forced broadcast stimuli, I don't blame 'millennials' for wanting to put up a minimum filter and default to their own bubble of controlled media. Why should we talk if you don't have something more interesting to say than my phone?


There are things of value to be learned even in media that doesn't immediately grab and hold your attention. Sometimes learning things requires focus. In fact, probably most things worth learning don't jump out and grab you, but require some effort to keep your attention on them.

If you always optimize your attention towards whatever is most immediately compelling, you'll wake up one day and find out you don't really know anything.


Why can't the immediately compelling be something that you have been focusing on for years?


You don't know whether or not I have something more interesting to say if you're dividing your attention between me and your phone.

As the article says, it takes more than 30 second to divine whether or not a conversation is going to go somewhere interesting, and if you stop paying attention at the drop of a hat, it never has a chance.


> it takes more than 30 second to divine whether or not a conversation is going to go somewhere interesting

I think that's an older-generation thing. If you go 30 seconds without getting to the point, of course people will think that you don't have one.


And must all conversation have a point that is deliberated at the origin? A lot of the most useful and salient conversations I've had with friends, colleagues, and mentors in my life have been ideation, thinking out loud, stepping through an experience or an impression... there wasn't a clear point, until two hours later, when there suddenly was. Or, there was a point, one thought, and it changed course during the conversation.

I don't know where I'd be without those conversations.


> Why should we talk if you don't have something more interesting to say than my phone?

I don't think that valuing relationships by how useful they are to you "right at this moment" is a very good way to go about life.


Well, but maybe on the other side of the phone there is another person, relationship with whom I value more? It's not like smartphones are all (or even mostly) about status updates.


Then excuse yourself and handle your business in private.


That's what I'd do if you weren't interrupting and pressing me for face-to-face conversation. Also, it's you who invaded my space, so why don't you go somewhere else?

The point is - in my opinion, it's equally rude to pull out a smartphone in the middle of a face-to-face conversation, as is to approach someone "fiddling with their phone" and expect undivided attention.


Exactly this. Some people seem to think that using smartphone means doing something irrelevant, less important than talking to a person. But you know what? On the other side of that phone there usually is a person.

One of the rudest behavior I encounter is people suddenly coming to you and interrupting in the middle of your IM conversation, demanding undivided attention and refusing to accept that you're in the middle of a conversation. IM is not e-mail, it's often as time-sensitive as voice, and quite often that IM conversation is much more important than whatever the interrupter came with.


Because relationships matter and your phone won't care for you when you are sick.


Or help you move your couch and belongings to a new place.


Or help you move a body.


Out of all other examples this is probably the only one that makes sense - and only because talking about murder over Internet is very poor OPSEC.


Wouldn't surprise me to learn there's an app for that, too, though it might be an unofficial .apk.


There's an app for that.


The person I'm messaging will.



Actually, you can look find cases of this already. Complete neighborhood-wide monitoring of every car down to the license plate, and every individual's basic outline are captured by surveillance planes.

https://www.aclu.org/blog/free-future/mysterious-planes-over...


This. Nobody who could conceivably make an account is just waiting to hear about this hot new thing called microblogging.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: