5 ms·
Toyota is amazing for making reliable cars but writing truly shitty code. IIRC, a lawsuit a few years ago about Toyota's faulty brake system revealed that Toyot
by hintymad 3y ago
Toyota is amazing for making reliable cars but writing truly shitty code. IIRC, a lawsuit a few years ago about Toyota's faulty brake system revealed that Toyota engineers cramped tens of thousands of lines in a single file and the lines freely update hundreds of global variables. It's also interesting that Japanese companies follow ISO this and CMM that yet they develop slowly and produce shitty software services everywhere. On the other hand, they have amazing engineers who wrote amazing books about deep technical topics and optimize the hell out of esoteric mathematical software that is probably used by millions of people. Truly mysterious country
- okl 3y agoThis? From almost 20 years ago. https://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRUBBED.pdf https://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRU...
- rngname22 3y agoI think you could perhaps say that Japanese are extremely highly sensitive to https://en.wikipedia.org/wiki/Switching_barriers https://en.wikipedia.org/wiki/Switching_barriers in indusrial and administrative processes relative to other cultures. If something causes friction or pain, but switching away / updating to a new system would incur a high cost or retraining time or break institutional knowledge, there seems to be an extreme bias to adapting to the pain rather than suffering the switching cost temporarily to improve the situation. There does seem to be a benefit though of extreme adaptation that occurs when a process remains unchanged for a very, very long time and actors in the system can develop extreme levels of experience.
- alasdair_ 3y agoThe Japanese obsession with handwritten resumes and faxes come to mind.
- resolutebat 3y agoFor handwritten resumes, the pain is kind of the point: handwriting hundreds of copies, which must be perfect down to the last stroke, is how new grads demonstrate their diligence and commitment to future employers. (It's still an idiotic relic though.)
- bmitc 3y agoThis speaks to the idea that a lot of Japanese culture, especially business culture, is performative.
- actionfromafar 3y agoHardly unique, but I think it’s easy to be blind to one’s own cultural bias.
- bmitc 3y agoIt's not unique, but it is a special case.
- VectorLock 3y agoHaving posted open job reqs online in the past couple years and seen the absolute deluge of fraudulent resumes you get, I'd welcome this culture.
- pezezin 3y agoThings are changed though. I work for a Japanese company, and when I applied for my current job the whole process was fully online. The website was crap though, as most Japanese web services are, but that is another topic...
- mkii 3y agoIs it truly mysterious though? I find it interesting whenever HN has a strong fascination with all things related to "Japanese-ness". For example, there have been links to wikipedia pages of some Japanese term, and it will make front page with comments. I can't think of any other nation that has this kind of cultural representation on here. And yet, the myth of Japanese "uniqueness" is largely the product of Japanese national propaganda, serving many useful purposes for the state, for example increasing tourism and limiting permanent immigration. I find it quite fascinating in modern times this propaganda still lives on strongly throughout the world, as people say "things are so different in Japan."
- booleandilemma 3y agoIt's not just HN. You'd probably enjoy this meme: https://knowyourmeme.com/memes/thing-japan https://knowyourmeme.com/memes/thing-japan https://knowyourmeme.com/photos/2554429-thing-japan https://knowyourmeme.com/photos/2554429-thing-japan
- renewiltord 3y agoHaha, that's a funny meme. But the main picture sort of is different, no? In Tokyo, you'd wander through the streets and see all sorts of interesting things in that melange of billboards: model train stores, little book stores, an indoor hydroponics farm, a teppanyaki place. I've got nothing against truck stop off-ramps looking like they do (they provide great utility on road trips) but it's qualitatively different and I can see someone liking the former and not the latter.
- mkii 3y agoIt's kind of the same to me. There's videos on YouTube of Japanese tourist or exchange students in America, gawking and having fun over the most mundane American things.
- renewiltord 3y agoHuh, I suppose we're different. I wasn't born American, and both the truck stop stuff and the Japanese city are wondrous to me. But they're obviously different experiences because of how many novel things I can experience in a short amount of time.
- stefan_ 3y agoYes, a curious lawsuit that was, it seems the software bugs were discriminating against the elderly and the otherwise unaware. The darnedest thing. (Ironically you can look at say Bosch ECUs and will find much the same: thousands of global variables and lots of "odd" code, but that's because its generated from a dataflow language).
- wahern 3y agoAt the very least, NASA couldn't find any cause in software: https://www.transportation.gov/briefing-room/us-department-transportation-releases-results-nhtsa-nasa-study-unintended-acceleration https://www.transportation.gov/briefing-room/us-department-t...
- VectorLock 3y agoI thought floor mats were put up as the most likely cause of the Toyota "spontaneous acceleration" incident? Anecdotally my late model Camry has very thorough floor mat retention mechanisms.
- thsksbd 3y agoIs it bad though? One giant loop and conditional forward jumps is not that bad for control systems. I think Cormack had a take similar to that.
- starcraft2wol 3y ago> tens of thousands of lines in a single file and the lines freely update hundreds of global variables. It would be a mistake to conclude this means the software doesn’t work well.
- NikkiA 3y ago90% of embedded code is horrible global variable messes like that, it's truly horrifying if you value CS and SE sensibilities and get into embedded. Invariably you'll also be expected to interface to and utilitise someone else's code of that style, so you can't even try to make much of a positive impact from within.
- deleted 3y ago[deleted]
- andromeduck 3y agoDon't confuse static variables with global ones.
- stjohnswarts 3y agoMeh, I've worked on several embedded systems, majority of developers did not use globals and bad coding practices. They weren't massive class hierarchies like I'm sure a lot of HN people would desire. Mostly (if c++) single inheritance, basic usage of RAII, basic usage of smart pointers (if allowed to use STL, some roll your own). The C projects I worked on were a little more ramshackle but almost no one used global variables or data. Lots of good use of translation uses to separate areas of interest. Most people avoided pointers until needed. It's not as bad as HN likes to portray.
- GuB-42 3y ago> Toyota engineers cramped tens of thousands of lines in a single file and the lines freely update hundreds of global variables. While the "single file" part is not great, using all global variables in an embedded system can be a good thing. I've worked on a critical piece of software for aircraft that did this deliberately, for safety reasons. One of the most important criteria for that software is determinism, which means no dynamic allocation since it is hard to predict how the allocator would behave. The stack can also be very limited in size, so what remains are global variables. It also makes debugging easier. You know exactly which variable corresponds to which address in memory. And with a probe, you can know the full state of the program at any time. That's also how we tested "impossible" conditions (for coverage): by overwriting specific memory addresses. Many of the reasons why globals are bad didn't apply there. We had no concurrency, no resources to share with other processes, in fact, we didn't even have an OS at first, Nothing was dynamic, all arrays were of fixed size, including strings, which were array of characters padded with spaces to the appropriate length. Of course, we documented usage of these variables, proper up-to-date documentation was not an option as it was certified software. It was one of the most boring job I ever had, and it is probably for the best.
- thebruce87m 3y agoAs an embedded engineer I’ve never heard of this and it seems… unwise. Yes, we avoid dynamic memory allocation but using globals for everything? Assuming C: For inter-file access static variables with getters/setters achieves the same thing and makes it easier to split/test I’ve never went as far as not using local variables in functions but you could use static here too to avoid the possibility of two functions sharing the same variable.
- GuB-42 3y agoWe still had local variables, for internal calculations and the likes of course, but most of the interface was done through globals. (btw, it was indeed C) Perhaps what is missing is that the way we did testing was a bit unconventional. That is, we didn't have unit tests. Instead, we did it all through integration testing on the real hardware. And setting these globals was how we got coverage. We also had a particularly good traceability, so we knew exactly which tests to run after each code change and get our coverage back, which made up for the fact that we couldn't tests the functions independently. It was a rather successful project, we got audited a couple of times with only minor issues. It certainly made testing more difficult, but we in exchange, it was much closer to real life conditions. Note that it was a while ago, newer project use a more modern approach with a continuous integration platform, unit tests with an emulator, etc... We also use less C, instead using industry specific tools and certified code generators, multitasking RTOSes, etc... With C and ADA for the inner and legacy parts.
- giarc 3y agoI've been considering newer Toyota Tacoma's recently and their interiors are still stuck in 2010. I believe they are releasing a new redesign, but I still can't believe how outdated even 2022's are.
- stjohnswarts 3y agothat would be a plus for me. I find the huge center consoles annoying. Give me knobs and buttons any day for that tactile feedback.
- jeffrallen 3y agoNTSB says unintended acceleration was not electronic: https://www.transportation.gov/briefing-room/us-department-transportation-releases-results-nhtsa-nasa-study-unintended-acceleration https://www.transportation.gov/briefing-room/us-department-t...
- Shocka1 3y agoAs someone who wrote code for one of the bigger auto manufacturers that wasn't Toyota, but one of the most respected auto manufacturer's for quality... Everyone here would be buying 15+ year old cars if they got a peek at that codebase.