News for hackers. Stuff that matters.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by PeCaN on Wednesday April 27, 2016 @02:18PM (#11583060)
Does anyone know what it's written in?

Boeing writes (nearly) everything in Ada and as far as I know has never had any software problems of this scale. Most of it is in SPARK as well, a restricted subset of Ada that can be partially formally verified[1]. Frankly, not formally verifying mission-critical software where a failure can potentially threaten someone's life seems rather irresponsible.

1. Contrary to what seems popular opinion, regular Ada is not particularly strict (less so than Rust). SPARK is very, very strict about what you can compile, and if it compiles it follows the spec (which is usually easier to audit).

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by acomjean on Wednesday April 27, 2016 @02:29PM (#11583182)
Speaking as someone who left a company that did radar software development in ADA (and some C). We were a subcontractor of Boeing and wrote the software for them.

We didn't formally verify the code, its way too complex, but everything was reviewed and heavily tested. And tested again. Then integrated and tested...

Ada is pretty strict and if it compiles you usually had some confidence it was going to at least run ok.

The industry was moving to C/C++ because developers know it and promises of higher productivity.

I did kinda grow to like ada. It had its warts, but it was good. It reminds me a bit of GO with its packages.

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by PeCaN on Wednesday April 27, 2016 @03:24PM (#11583698)
> It reminds me a bit of GO with its packages.

Ada Tasks also bear some semblance to goroutines. (In the sense that they share memory by communicating instead of communicating by sharing memory.)

It's definitely a nice and well-designed language IMO—with a share of annoyances[1] and flaws—but overall deserving of more attention than it gets. Lately I've gotten comfortable enough with it that I have been making a habit of reaching for Ada for side-projects where I would formerly use C. (For example, I'm writing a toy X window manager in Ada at the moment—using XCB from Ada is a little ugly at times but definitely bearable.)

1. For example, why can't a record discriminant be a range bound? Answer: standards committee didn't think people would use it. Of course, this means if you have an array of discriminated size, you can't conveniently have a type for a position in it. e.g.

  type Thing_Stack (Max_Size : Positive) is record
    Elements : array (Positive range 1 .. Max_Size) of Thing;
    Top_Index : Positive range 0 .. Max_Size := 0;  -- 0 = Empty stack
  end record;
Fails to compile with "Discriminant cannot constrain scalar type". According to [2], this is because

> This restriction is left over from Ada 83 (RM83 3.7.1(6)). We considered removing this restriction in Ada 95, but ultimately decided that the implementation effort to support this modest extension would outweigh the (more?) modest benefits. Perhaps a short-sighted decision, in retrospect...

> As for why the original Ada 83 restriction existed, noone knows for sure, but it probably relates to the historical purpose of discriminants as only for controlling the "shape" of the record, rather than being seen (as in Ada 95) as more general type "parameters."

And apparently it got left in Ada 2012 also.

(For C people, this is basically:

  typedef struct {
    size_t max_size, top_index;
    thing elements[];
  } thing_stack;
but bounds-checked and without the annoyance of allocating flexible array members.)

2. http://computer-programming-forum.com/44-ada/82b646ab38d529a...

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by acomjean on Wednesday April 27, 2016 @04:57PM (#11584487)
Its been a while

I liked the records in ada. You could control the position and size of each field (which was really usefully for dealing with in binary messages) We had a ton of constrained types.

If I remember we has assert 'size on some of the records to make sure type changes didn't cause some records to become unexpected sized in case the types that made up the record changed.

variant records were fun, but when you start trying to do much (array of variant records?) it fell down.

The string handling left a little to be desired though..

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by lobster_johnson on Wednesday April 27, 2016 @05:30PM (#11584722)
> It reminds me a bit of GO with its packages.

Not that alien a comparison, since Ada and Go both descend from Niklaus Wirth's languages. Ada was directly based on Pascal, whereas Go (and its precursors) is strongly influenced by Modula and Oberon, themselves successors to Pascal. Aside from some superficial syntax differences, Go looks a lot like Modula and Oberon.

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by outworlder on Wednesday April 27, 2016 @02:37PM (#11583260)
> Does anyone know what it's written in?

The slightly sarcastic answer would be "C++, of course". There is even a code standars document that's floating around. (Edit) Link: http://www.stroustrup.com/JSF-AV-rules.pdf

That said, I don't really think the troubles come from the technology side of things.

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by engi_nerd on Wednesday April 27, 2016 @03:37PM (#11583802)
Well, to clarify, that's the coding standard for the Air Vehicle (in other words, the airplane itself). That does not apply to ALIS (although there's nothing stopping them from using those coding guidelines if they really wish, I guess). I have no idea what ALIS is written in.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by logicallee on Wednesday April 27, 2016 @02:43PM (#11583327)
I don't get why you state your response is slightly sarcastic. You mean "probably C++, even though it's not a suitable language"? Why not?
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by golergka on Wednesday April 27, 2016 @03:24PM (#11583693)
Because of all the subtle ways you can shoot yourself in the foot.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by jmnicolas on Wednesday April 27, 2016 @05:08PM (#11584580)
and take the whole leg ;-)
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by alephnil on Wednesday April 27, 2016 @02:59PM (#11583491)
Seems like most of it is written in C++, while some parts reused from F22 is in Ada 83. This was done "due to programmer availability" according to Wikipedia (links the article cite for that claim are dead).
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by kps on Wednesday April 27, 2016 @03:04PM (#11583535)
Learning Ada is easier than learning to write reliable software. If language experience is the barrier to ‘programmer availability’, then management is Doing It Wrong.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by alephnil on Wednesday April 27, 2016 @03:11PM (#11583595)
Indeed. I included that quote precisely because it shows such a lack of perspective. To get programmers with experience in safety critical real time programming is much harder than learning Ada, and training them to learn safety critical programming is much harder than learning any relevant programming language. But apparently the availability of C++ programmers was what they considered important.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by kevin_thibedeau on Wednesday April 27, 2016 @09:30PM (#11586009)
Defense contractors won't invest in training. The programmers they hired would be mostly contract workers themselves because the MIC is deathly afraid of having actual employees that could cut into profits. Hence why they've managed to step away from ADA because those skills aren't readily available in the contractor pool.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by tormeh on Wednesday April 27, 2016 @05:11PM (#11584604)
You know, I think they need a language with a lower entry point, to make it easier to onboard developers. PHP should do the job nicely.

Please nobody tell them.

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by kps on Wednesday April 27, 2016 @05:59PM (#11584921)
Sounds reasonable. An F-35 is built to ‘move fast and break things’.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by wrong_variable on Wednesday April 27, 2016 @11:45PM (#11586450)
Someone should email the bosses the agile manifesto.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by gozur88 on Thursday April 28, 2016 @04:36AM (#11587281)
It's not that people can't learn another language. The problem is nobody wants to be the guy looking for a job at a startup with ten years of Ada on his resume.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by willtim on Wednesday April 27, 2016 @03:13PM (#11583618)
100% agree.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by Jtsummers on Wednesday April 27, 2016 @02:29PM (#11583179)
C and C++ for the vast majority. Some Ada. Some Fortran, but probably only in physical modules (LRUs) that are being reused (COTS or GOTS) from other projects.

http://www.militaryaerospace.com/articles/2013/10/software-c... -- but a Google search reveals much the same from any article I can find, and just reiterates what I've read in past articles on F-35 software.

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by xtrxtg on Wednesday April 27, 2016 @03:07PM (#11583560)
The article seems to confuse ALIS with software that runs on the aircraft. ALIS is a web-based portal used by logistics and maintenance personnel to manage the logistics and maintenance for the F-35.

As the article states: “ALIS is the ground-based computer system meant to diagnose mechanical problems, order and track replacement parts, and guide maintenance crews through repairs. It also allows pilots to plan missions and later review their performance.”

Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by Jtsummers on Wednesday April 27, 2016 @03:08PM (#11583578)
Yeah, you're right. My comment is less appropriate as an answer to the question of ALIS's language.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by topkekz on Wednesday April 27, 2016 @02:45PM (#11583354)
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by bitwize on Wednesday April 27, 2016 @03:10PM (#11583587)
I would assume C++, since an oft-quoted set of C++ standards is linked to the JSF project.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by btbuildem on Wednesday April 27, 2016 @03:55PM (#11583962)
Javascript, by the sound of it..
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by PeCaN on Wednesday April 27, 2016 @04:27PM (#11584236)
At least the F-35 is web scale.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by fsck--off on Wednesday April 27, 2016 @02:25PM (#11583141)
I think C++ but I'm not certain about that.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by supercoder on Wednesday April 27, 2016 @09:32PM (#11586014)
Hopefully a modern JavaScript framework like Reduox, Isometa, or JSJ Query.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by nathancahill on Wednesday April 27, 2016 @02:21PM (#11583076)
Faulty car software threaten someone's life. Faulty fighter jet software threatens a lot more than that.
Re:The F-35’s Software Is So Buggy It Might Ground the Whole... by mbrameld on Wednesday April 27, 2016 @02:45PM (#11583349)
You're not wrong, you just missed the point.