6 ms·
According to this Stackoverflow answer the aircraft is mostly C/C++, no wonder they're having so many issues: https://stackoverflow.com/questions/9827176/what-
by Someone1234 11y ago
According to this Stackoverflow answer the aircraft is mostly C/C++, no wonder they're having so many issues:
https://stackoverflow.com/questions/9827176/what-is-the-predominant-programming-language-used-for-the-f35-lightning-ii-aircr https://stackoverflow.com/questions/9827176/what-is-the-pred...
I'm not sure there is anything I'd build with such insecure languages in 2016, let alone an aircraft or flight system.
- blackguardx 11y agoDo you know what an embedded system is?
- mikestew 11y agoWell, if we're going to be patronizing, do you know that languages other than C/C++ can be used with embedded systems?
- blackguardx 11y agoI was genuinely curious. You can use any language you want for an embedded system as long as it has enough resources to run the runtime environment or the interpreter. In many (most?) cases, it isn't worth the overhead to do that. There isn't just one CPU in this aircraft. There are probably dozens or hundreds. Not all of them can be powerful without undesirable tradeoffs.
- mikestew 11y agoI was genuinely curious. That being the case, I wish I wasn't too late to edit my comment to be a tad less snarky. That said, I understand a bit of the trade-offs involved (though far from an expert). I think there's room for discussion somewhere in the middle. The parent took one extreme ("you had it coming using C/C++"), and at first reading your comment stated the opposite ("C/C++ is just what you use on embedded"). Knowing very little on the subject at hand (embedded avionics SW), I'd still argue that maybe there at least be a discussion around using something like Ada for critical systems? (Yeah, I know what a big hit Ada is with embedded folk, at least the ones I hang around.)
- adrianN 11y agoYou'd be surprised how much safety critical software is written in C and C++.
- slavik81 11y agoGiven how well the other parts of the project are going, I think it was likely to be a disaster regardless. Based on various news reports I've read about its delays and cost overruns, the F-35 seems to be defined by difficult and frequently changing requirements given to sprawling teams who cannot communicate well with each other due to the massive complexity and number of people involved.
- tclmeelmo 11y agoIt's important to recognize that they're using C/C++ and the associated ecosystem of static checkers, validated compilers, coding standards, etc.
- Someone1234 11y agoIt is important to recognise that other languages have those too, and much simpler ones at that because of the core design of the language.
- tclmeelmo 11y agoYour original statement read to me as an assertion that it's obvious that this radar system defect (and others) exists because the system was developed using C/C++. I think it's a gross oversimplification to state that the avionics software is developed in C/C++: the avionics software is using a subset of C and/or C++, along with support tools, system engineering models, code reviews, V&V, etc. As I see it, there isn't that much difference on this sort of project if one were to use Ada or Java instead of C or C++: the support tools may be somewhat simpler, but the overwhelming majority of the SDLC activity remains unchanged. I'm not clear what causes this radar system defect, I didn't see it described in the source article, but a defect in design (for example) would seem likely to occur regardless of the programming language selected. Also, I'm curious to hear what your proposed alternative would be and why?
- roymurdock 11y agoInterested to hear which language(s) you would suggest for building real time, deterministic embedded systems.
- gaius 11y agoAda. It's what it's for.
- roymurdock 11y agoInteresting...I'm looking at 2015 embedded developer survey data for respondents in the aerospace & defense industry (n=90) Question: Languages used to develop software in previous project (multiple answer) Ada = 28.9%, C = 48.9% Question: Languages used to develop software in current project Ada = 12.2%, C = 53.3%
- adrianN 11y agoPopularity doesn't really reflect suitability though. Often C/C++ is chosen because it's a lot easier to source talent.
- gaius 11y agoPenny wise, pound foolish.
- Jtsummers 11y agoThis (and a ditto to gaius). My first real job out of college the company was doing work for Boeing. They were given a choice between Ada and C for their work. They chose C. I later asked why we didn't use Ada (I was working as a tester, most of our issues outside timing would have been detected at compile time if we had properly exercised the type system in Ada - such as constraining values to certain ranges). The answer was, "C programmers are easier to find." Never mind the excessive amount of money spent on testing (time and personnel) and tooling (time learning it). Getting C programmers was easier, and often cheaper, so they went with that. Since then, in other jobs in the same general field (avionics or related), the answer has been the same at most offices.
- alayne 11y agoThat just sounds like personal bias.
- Someone1234 11y agoIt is technical bias based on technical fact. Am I or am I not correct in the technical claim that languages exist, like Ada, which decrease certain error classes and eliminate others entirely? Go ahead and actually support why C/C++ produces more verifiable and secure code than Ada?
- alayne 11y agoIt may be true that Ada reduces or removes some types of software engineering errors, but that is not the only goal when choosing a language. Why did the military move away from Ada if it's a silver bullet?
- Someone1234 11y ago> Why did the military move away from Ada if it's a silver bullet? The US military doesn't develop software. They also have very little choice over who does. The entire system is a convoluted mess of lowest bidders and inept contractors. So it is ultimately up to the lowest bidder what they want to develop in. There just isn't enough incentive to develop high quality, low in bugs, software for them.
- deleted 11y ago[deleted]
- jasonwatkinspdx 11y agoDeveloping avionics software is quite different from what almost everyone on this site does. Check out JPL's 10 rules to get a taste of how it works, then consider coding within a bureaucratic process where not a single character of the source or supporting documents changes without multiple approval and confirmation steps. It's a painful and expensive process, but it can work, as demonstrated by the handful of teams that have reached the ~1 bug per 1e6 opportunities defect rate _all_ using variations of the above (tho some of them use Ada). Let's check ourselves a bit and realize developing flight software is a different world from web services and mobile apps.
- Someone1234 11y agoSmug condescension aside you didn't actually say why using a less secure/quantifiable language is a benefit to avionics software? I read JPL's 10 rules, they're pretty common sense stuff that I'd hope any C/C++ project would take advantage of, but they too don't address the reason why C/C++ would be better than Ada for this specific use-case? Or functional for that matter? > Let's check ourselves a bit and realize developing flight software is a different world from web services and mobile apps. I agree, it is far more important in avionics to be provably correct and to eliminate as many bugs as possible. It is exactly BECAUSE these aren't web services or mobile apps that C/C++ shouldn't even be a candidate. You've made exactly zero arguments to support C/C++ here. Just acted smug and condescending to all of us lowly other developers. Do you yourself work in avionics?
- noselasd 11y agoI think you're assuming that the issues and bugs are simple language errors or the proverbial segfault - which in my experience is quite rare in high reliability software regardless of the language - issues tend to appear at a system or design level. I doesn't matter much what language you're using if the HUD blurs during high G forces, clocks run out of sync or you forgot to design a feature or designed the prioritization of events wrongly.