9 ms·
This is appalling: Toyota had more than 10,000 global variables. “And in practice, five, ten, okay, fine. 10,000, no, we're done. It is not safe,
by hliyan 11y ago
This is appalling:
Toyota had more than 10,000 global variables.
“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.
and:
Toyota’s failure to check the source code of its second CPU,
supplied by Denso —even as executives assured Congress and
NHTSA that the cause of UA couldn’t be in the engine software
and:
He was critical of Toyota watchdog supervisor – software to
detect the death of a task -- design. He testified that Toyota’s
watchdog supervisor “is incapable of ever detecting the death
of a major task. That's its whole job. It doesn't do it.
Instead, Toyota designed it to monitor CPU overload, and,
Barr testified: “it doesn't even do that right.
and:
Barr also testified that Toyota’s software threw away error codes
from the operating system, ignoring codes identifying a problem with
a task.
When the news first broke a few years ago, given Toyota's reputation for quality and process, I thought this was an American industry lead witch-hunt of a Japanese competitor. But if this testimony is correct, what Toyota engineers have done is unforgivable.
- elmin 11y agoI wouldn't be so quick to blame the engineers. They might be working within a managerial structure which doesn't give them the latitude they need to do their jobs. Yes engineers have a duty, but in software it's often hard to know exactly what the impact of cruft will be, and often all you can do is quit.
- icelancer 11y agoBlow the whistle? Contact regulatory agencies?
- hliyan 11y agoI agree, but I also believe that as an engineer I have an duty to refuse to build something under conditions that, once built, would cause harm to others. Or at least to relay my concerns to management in writing before proceeding. And sometimes, quitting is the ethical thing to do.
- ionforce 11y agoBut what if you have a life. And dependents. And bills to pay. As much as I would like to agree with you, people have different value systems. And money talks. So quitting isn't always an option, even though it is the most ethical. Can't pay the bills with ethics.
- serf 11y ago> So quitting isn't always an option, even though it is the most ethical. If you think quitting a dangerous project (to be replaced by another dime-a-dozen engineer by a large corporation which employs thousands) is the ethically correct choice, your moral compass is broken. We're talking about a device sold in the millions of units that is capable of dealing great bodily and structural harm to us and our world around us. Whistle blowing (preferably before real world harm) is the only ethical choice for someone that is made aware of such a situation.
- hliyan 11y agoThen you probably should not be taking on work that human lives depend on. Placing my bills over someone else's bills is a perfectly human reaction. But placing my bills over someone else's life -- a typical human should not feel this way.
- nitrogen 11y agoThis is a systemic problem though, not a problem with the ethics of the engineers. Systems that incentivize bad behavior are to blame.
- InclinedPlane 11y agoUnless you're living without luxuries then you are prioritizing your access to luxuries over the lives of others. That's unconscionable, even if you word it as "bills to pay and mouths to feed". If you're working as an engineer for Toyota's firmware it's unlikely that you won't be able to find sufficiently well paying work to keep the kids in clothes and food and keep a roof over your head.
- 11y ago
- e40 11y agoAnd, at large Japanese companies, people are shuffled around every two years. I had heard this and didn't believe it until I saw it. A distributor of my company would replace people with novices once the previous person had just gotten really good at the job. If Toyota is doing this, it would explain a lot.
- shard972 11y ago> When the news first broke a few years ago, given Toyota's reputation for quality and process, I thought this was an American industry lead witch-hunt of a Japanese competitor. You. You were one of the many people I had no clue where they came from. When I first saw the reports they seemed legitimate and Toyota seemed to be hiding something but so many people just didn't believe it and the news just sort of went under the radar.
- hliyan 11y agoThere's no need to be emotional. Some people jumped to biased conclusions. Others based it on NASA's software review (which we have now found to be flawed). See the report: http://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRUBBED.pdf http://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRUB...
- song 11y agoAfter having lived and worked in Japan, this doesn't surprise me. Software engineering education is really weak there, managers who became managers because of their seniority tend to impose their own antiquated decisions and do not listen to best practices. The other problem is that status wise, it's considered lower level to be a software engineer than to be a mechanical or electrical engineer, so the smartest kids do not study computer science (this might have changed since).
- ild 11y ago> it's considered lower level to be a software engineer than to be a mechanical or electrical engineer, so the smartest kids do not study computer science (this might have changed since). Which is very interesting, because in US it is completely opposite (and frankly it is not good either). Is it because US deindustrialized itself last 40 years?
- thrownaway2424 11y agoDid you mean "Deindustrialization or deindustrialisation is a process of social and economic change caused by the removal or reduction of industrial capacity or activity in a country or region, especially heavy industry or manufacturing industry." ? That doesn't sound applicable to the USA, which currently produces more goods than ever before, and more than any other nation except China.
- peterfirefly 11y agoIt does so with far fewer people than before, though. In that sense, there has been a "deindustrialization".
- ild 11y agoI am talking about industry as share of GDP. Check the numbers: http://en.wikipedia.org/wiki/Economy_of_the_United_States_by_sector http://en.wikipedia.org/wiki/Economy_of_the_United_States_by.... Manufacturing kept going down.
- 11y ago
- Niten 11y ago> When the news first broke a few years ago, given Toyota's reputation for quality and process, I thought this was an American industry lead witch-hunt of a Japanese competitor. But if this testimony is correct, what Toyota engineers have done is unforgivable. These two possibilities aren't mutually exclusive. Software engineering practices aside, was it ever demonstrated that unintended acceleration could actually arise from the behavior of this software?
- Schwolop 11y agoYes, another part of Barr's testimony was a series of proof-of-concept demonstrations on the ECU to demonstrate the ability to kill tasks, leaving the hardware those tasks were controlling in unintended states.
- bsder 11y ago> was it ever demonstrated that unintended acceleration could actually arise from the behavior of this software? No, but the software engineering practices were so bad that it was a moot point.
- tremon 11y ago>was it ever demonstrated that unintended acceleration could actually arise from the behavior of this software? That's entirely the wrong question to ask. The correct question is "has the system design been proven to make it impossible for unintended acceleration to occur?"
- superuser2 11y agoToyota has a reputation for mechanical engineering quality and process which it probably still deserves. Software engineering is apparently the opposite.
- engi_nerd 11y ago> “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,” At an old job, my boss asked me to take a look at a business critical application to see if it could be improved upon. It had some deficiencies that were really hampering things. I got the source from a coworker (this is when I worked on rockets, so none of us were or are professional software people, but even my dumb engineer self knows this is not how it should be). I opened up the folder. Lots and lots of files with little apparent structure. Ah, there was a file called "MAIN". I opened it. Visual Basic 6. Over 29,000 lines for global variable declarations alone. The actual program logic heavily used a commercial library designed to (shudder) make VB6 development more like making macros in spreadsheets. The original programmer then implemented the main program logic in this hellish abomination. The logic took up another 50,000 lines or so. I told the boss that it would be easier to write a new program from scratch then attempt to understand it. Has anyone seen a program with more globals than this?
- r00fus 11y agoSounds like you need to submit this to DailyWTF...
- deleted 11y ago[deleted]
- scrollaway 11y agoNowhere near as many, but I had to deal with this very recently and this little WSJ gem showed up: https://github.com/ewfelten/Tracking-Report-Card/blob/master/alexa_us500_041412_mozmill.js https://github.com/ewfelten/Tracking-Report-Card/blob/master... I'll let the code speak for itself.
- nl 11y agoThat looks like autogenerated code. That's a different beast altogether.
- 11y ago
- coupdejarnac 11y agoThe last company I worked for outsourced a large firmware project to Denso based on their relationship with Toyota. Turns out they spent 18 months writing unmaintainable code that barely worked, and the codebase had to be totally scrapped with product version 2.0. The code was chock full of cut and past, globals, and hacked mutexes- they did not even use the mutexes built into the RTOS. Perhaps Denso stuck their B-team on the project, who knows.
- _pmf_ 11y agoIn C, there may be static variables with infinite lifetime which are locally scoped (module scope or function scope). This is done to reduce stack usage; it does not mean that these 10000 variables can be accessed from everywhere else. But I don't want to ruin the "hurr-durr, stupid C programmers" party that the rockstar full-stack webdevs here like to celebrate. Obviously, they know more about embedded software development than people who have worked in this field for several years.
- leoedin 11y agoThe criticism of global variable count comes straight from Phillip Koopman, "a Carnegie Mellon University professor in computer engineering, a safety critical embedded systems specialist, authored a textbook, Better Embedded System Software". So this isn't a web developer providing criticism, but someone with extensive experience in embedded software development. Perhaps reading the article linked before jumping to conclusions might be useful!
- zb 11y agoLocally-scoped (i.e. static) variables are, by definition, not global variables. The article is pretty clear that the 10,0000 figure refers to truly global variables, and I would hope that the original expert witness has not misled us by referring to static variables as 'global'. (Of course, without being able to see the source, there's no way to make our own judgement.) Sadly, you would be surprised at the number of embedded systems that store and pass around their state using global variables, despite the obvious stupidity of that approach. (For the record, I am not a web dev and I did indeed spend several years working in the field of embedded development.)
- novaleaf 11y agoI was a victim of this. Thankfully only minor damage resulted. I owned a Toyota minivan in Thailand and was in stop-and-go traffic, when suddenly the engine started revving up. I slammed on the brake and the engine downshifted to first to compensate, so I ended up bumping the car in front of me. After the bump (total stop?) the engine recovered it's sanity I guess, because the revving stopped at that point. Naysayers will point out that the engine wouldn't rev up if I'm putting on the brake. That seems to be part of the symptoms of this bug. Oh, and I didn't accidentally push the accelerator instead of the brake, otherwise I wouldn't have just "bumped" the car in front. Edit: I took the vehicle into the dealership and they said "user error".... whatever, no consumer protection in Thailand anyway, so I just moved on.