5 ms·
The article finishes with the rather vague and somewhat terrifying assertion that: "It is estimated that the Airbus A380, comparable in complexity to the Dream
by ocfnash 8y ago
The article finishes with the rather vague and somewhat terrifying assertion that:
"It is estimated that the Airbus A380, comparable in complexity to the Dreamliner, has more than 100 million lines of code."
- moreira 8y agoThe thing is, do they just count all the lines of code in all the libraries they use, as well as the OS (all of it compiled from source, I would guess)? I imagine they do, since that's the only reasonable way that 100 million lines of code could be reached.
- sbradford26 8y agoSo on a project like this, you do not use many standard libraries. It is usually explicitly stated that you can't use anything from the std c library and such. Also source lines of code are usually calculated as lines of code that need to be verified. So if a line of code is in the software, it needs to have a test that covers that line of code.
- moreira 8y agoThen that really does raise some questions as to what 100 million lines are for. What operations exactly does an airplane need to execute that require that much code?
- lnsru 8y agoThink about it as a 1000 independent sometimes redundant embedded systems. 10000 lines of code you can write alone in 2 years for middle complexity project. It’s not single data bank application.
- bronco21016 8y agoIn addition to every component that has some kind of data bus you also have the fly by wire system which includes all of Airbus’ ‘laws’ for the different flight envelopes. You also have modern navigation gear and the displays and interfaces that come with that. Just look at the cockpit and realize everything in there is software and it becomes clearer.
- NikolaeVarius 8y agoEverything? Modern avionics is insanely complex. This isn't something you throw 1-year self taught JS devs on. When I worked on next-gen turbofans, we had multiple dozen engineers working on managing the requirements of the software, much less the software itself. You have the main avionics software managing the flight itself, the engine software managing fuel consumption, and the 3x safety factor required to be certified.
- TeMPOraL 8y ago"Everything" isn't telling much. I'd love to, out of curiosity, browse through a codebase of an avionics system. Is anything like this publicly available?
- sbradford26 8y agoMost likely there is not much that you can look at but this overview of the space shuttle can give you a lot of insight into how software and hardware are designed for flight critical applications. I believe this was posted a while ago here. https://spaceflight.nasa.gov/shuttle/reference/shutref/orbiter/avionics/ https://spaceflight.nasa.gov/shuttle/reference/shutref/orbit... One take away is that software and hardware are nearly impossible to separate in a flight critical application. Also one note, the space shuttle was incredibly complex for its day. So I would say the complexity of the space shuttle would give you a decent idea of what commercial aviation does now.
- TeMPOraL 8y agoI definitely missed this if it was posted here. Thanks! I was kind of hoping that some legacy avionics system somewhere would have sources available on-line, but I guess companies writing this code don't open-source projects just because they get old.
- Dylan16807 8y ago> Also one note, the space shuttle was incredibly complex for its day. So I would say the complexity of the space shuttle would give you a decent idea of what commercial aviation does now. And yet it has less than a million lines of code.
- sbradford26 8y agoSo this lines of code estimate are spread across all the systems on the aircraft. One reason for all of the lines is that everything is done in C. Then really the more exact reason is that every command on an aircraft is monitored. You have complex control laws to control a surface and then probably 4 or 5 different monitors that make sure the surface isn't oscillating or the actuators are not fighting each other and all kinds of stuff. It is because the mentality that not only do you design something to not go wrong, you monitor for failures when it does and handles them accordingly. Finally you have maintenance where an technician can run a test to determine any issue on the aircraft. So there has to be tests and monitors built into the software to determine root cause of an issue down to a single box/actuator/sensor/or wiring problem.
- chooseaname 8y agoAds.
- gruez 8y ago>It is usually explicitly stated that you can't use anything from the std c library and such Why?
- ams6110 8y agoI don't work in this field, but my understanding is that code for critical systems like avionics isn't permitted to (among other things) allocate/free memory dynamically. That probably nixes a lot of functions in the standard library.
- AnimalMuppet 8y agoThose libraries aren't man-rated - they aren't code that you can literally stake peoples' lives on.
- yason 8y agoIt would bring in whatever crap the standard libraries from the compiler or the system happen to have. And those libraries aren't written with the mindset of "when this code runs on an A380". Even most non-certified projects will grow their own standard library once they get past a certain size, and this is merely for convenience, consistency, and features.
- mehrdadn 8y agoWhy wouldn't they count everything? Does a line of code stop being a line of code if it's written by someone other than you?
- stochastic_monk 8y agoIn an extreme example, including lines of code in Linux source code would be misleading.
- sbradford26 8y agoWell in this you get into a circular argument, because if you did include Linux then you would need to verify every line of code that is being used. Which is why you would never use linux and why it wouldn't be included. *This is in reference to DAL A software. DAL D might be able to run linux.
- LanceH 8y agoBut if you want to write a sensational "100 million lines of code" then you count the code that's running the in flight entertainment system (and others) which doesn't have the same safety constraints.
- sbradford26 8y agoThe code would most like still be counted but that software would probably be either DAL D or DAL E. Here is a the wiki for the standard that software has to meet for commercial aircraft. It explain the DAL (Design Assurance Level) levels and what goes into them. https://en.wikipedia.org/wiki/DO-178C https://en.wikipedia.org/wiki/DO-178C
- Retric 8y agoIf an airline crashed because of a Linux bug, that still counts.
- logfromblammo 8y agoInteresting that they have so many, when we frequently compare the use of lines of code as a software metric to kilograms of aluminum in an aircraft.