News for hackers. Stuff that matters.
Re:Learning Ada by jcadam on Thursday March 28, 2019 @08:21AM (#19511441)
I learned Ada because I took a new job back in 2008 (at Boeing, doing spacecraft modeling and simulation) and discovered on my first day that I would be using Ada. Naturally, I was expected to just pick it up on my own (Not complaining, that's pretty much how it goes these days).

My mother (who found it amusing I was going to be coding Ada in 2008) gave me her old Ada books from the 80s (her employer at the time sent her to an actual course to learn the new DoD mandated language, back in the days when employers invested in their people), which I still have. I ended up programming in Ada up until 2012, when I managed to get a job using Java.

The language itself I rather liked (better than Java, for sure). It's the only language I've ever used that tended to produce programs that worked correctly on their first run (getting them to compile was the difficult part). The aerospace industry OTOH, I don't miss.

Re:Learning Ada by coldtea on Thursday March 28, 2019 @11:17AM (#19513009)
>My mother (who found it amusing I was going to be coding Ada in 2008) gave me her old Ada books from the 80s (her employer at the time sent her to an actual course to learn the new DoD mandated language, back in the days when employers invested in their people), which I still have.

The fact that most employees don't invest in their people today, is egregious.

The fact that an employer like Boeing lets their developers "just pick it up on their own" doubly so.

And probably explains some of their quality issues.

Re:Learning Ada by 4thaccount on Thursday March 28, 2019 @12:48PM (#19513989)
This quote from the parent comment made me sad because it is true. With that being said, why is this so? Is it because the internet learning makes it possible to not need training classes to learn a language like you once did? Would the poster's mother prefer a week long off site course led by instructor or going through learnadacore.com (or whatever) at her own pace?
Re:Learning Ada by Jtsummers on Thursday March 28, 2019 @01:31PM (#19514480)
Companies used to invest in their workers, there was an assumption (reasonably accurate for many employers and employees) that people would remain with a company for decades. It was to their benefit to train and improve the employees (NB: Layoffs and other things still happened, not claiming this was a golden age, just different).

At some point (1980s and 1990s in particular) things like retirement benefits started disappearing, replaced by 401k contributions and the like. Employees started moving more between companies so that long-term investment in employees became a problem. If I'm an employer and I spend 3 years getting you the equivalent of a graduate degree in software engineering (training on best practices, training in languages and design, attending conferences) and then you move, I have nothing to show for my effort.

You could add clauses requiring people to work for some period of time after receiving specific kind of training (like if you pay them for a degree) or requiring them to reimburse you if they leave early. But you can't do that for everything.

So companies have assumed that employees are mercenaries, and employees have become mercenaries. In the end, we still work 40+ hour weeks, but get worse compensation and companies refuse to invest in us.

Re:Learning Ada by tomcam on Friday March 29, 2019 @10:38AM (#19522044)
All true, but omits the change in the litigation climate here in the States. Dealing with pernicious, baseless lawsuits taught me never to hire employees again.
Re:Learning Ada by jcadam on Thursday March 28, 2019 @01:49PM (#19514704)
Training on your own time after hours vs being paid to attend training during your regular work hours? I know which one I'd choose.
Re:Learning Ada by 4thaccount on Thursday March 28, 2019 @09:30PM (#19518381)
I meant online training AT Work lol.
Re:Learning Ada by ernst_klim on Friday March 29, 2019 @05:04AM (#19520113)
>The fact that most employees don't invest in their people today, is egregious.

They don't because the supply of workforce highly surpasses the demand, so it's easier to find another worker. In the domains, where it's not the case (mission critical software) things are different in general.

Re:Learning Ada by bibyte on Thursday March 28, 2019 @09:25AM (#19511916)
> It's the only language I've ever used that tended to produce programs that worked correctly on their first run

From my experience that is generally true with languages that have strong static type systems (like Haskell and Rust).

Re:Learning Ada by kazinator on Thursday March 28, 2019 @07:11PM (#19517561)
The trick is to produce programs that also run correctly on their second and third run, and multiple other runs where the user is someone other than the creator with different ideas for the inputs.

There isn't anything special about the first run, other than emotionally.

Also, if we define "run" as everything that happens when you feed that source program to the machine, then your first run actually bombed with compile errors.

You can't sit there pretending that the compile errors are the only mistakes you made, such that your first compile-error-free run that made it all the way to program startup and through to successful termination is also bug-free.

If you were that good, you wouldn't be making trivial errors flagged by a compiler.

Re:Learning Ada by eeZah7Ux on Friday March 29, 2019 @06:07AM (#19520332)
Scientific research on the source of bugs shows that type-related bugs are a minority.
Re:Learning Ada by OneWingedShark on Friday March 29, 2019 @05:34PM (#19525875)
Well, there's a bit of a problem in how you're qualifying things. For example, certain things that aren't obviously handled by the type-system might be.

One example would be loops and off-by-one errors. For the case of For-loops on arrays Ada's solution arguably does so via the type-system; in Ada arrays "know" their own length, start- and stop-index and these are query-able via attributes.

So, given Function Sum( Input : Integer_Array ) return Long_Long_Integer you could for-loop on the parameter, querying the 'Range attribute -- yielding a possible implementation of:

Function Sum( Input : Integer_Array ) return Long_Long_Integer is Begin Return Result : Long_Long_Integer := 0 do For Index in Input'Range loop Sum:= Sum + Long_Long_Integer( Input(Index) ); End Loop; end return; End Sum;

And the entire problem is avoided via the type-system.

Re:Learning Ada by kqr on Sunday March 31, 2019 @12:23PM (#19536390)
That is a reflection on which language you use. I prefer a language where a large majority of bugs are type-related. How about you?
Re:Learning Ada by syrrim on Thursday March 28, 2019 @12:34PM (#19513827)
From my experience it's true in python (ie not a static type system). Removing the distinction between compiling and running makes this point even stronger.
Re:Learning Ada by 59nadir on Thursday March 28, 2019 @01:03PM (#19514161)
This is not at all my experience, neither with my own code or code other people produce. Unless the problem is extremely trivial the solution is very unlikely to work without a few test runs. The bigger point in all of this is that statically typed languages at least have some kind of check mark they can put on your code to say "Yeah, at least the types make sense".

They also encourage designing with types in order to enforce business logic, which is something you don't get in any of the dynamic languages.

Re:Learning Ada by randomsearch on Friday March 29, 2019 @09:21AM (#19521389)
Agreed. Have written a lot of code in Ada and Python, I have taught both of them. The fact that Ada code often works first time is something almost every student notices at some point. I have far more experience in Python, and I don’t think I’ve ever made non-trivial code work the first time.
Re:Learning Ada by j88439h84 on Thursday March 28, 2019 @06:02PM (#19517074)
In python this can be true, if you invest in the various protections like pylint, mypy, and full test coverage.

Python doesn't force you to do those things if you dont need the reliability for a prototype or one-off code.

But if you want to make a reliable system, even convert your prototype into a reliable system, you can.

Re:Learning Ada by ainar-g on Thursday March 28, 2019 @10:14AM (#19512374)

  The aerospace industry OTOH, I don't miss.
At least three people ITT have said something similar to this. Can you elaborate about what is so bad about working as a software developer in the aerospace industry? Or would that require breaking all sorts of NDAs?
Re:Learning Ada by jcadam on Thursday March 28, 2019 @10:49AM (#19512702)
It's mind-numbing "code-to-spec" work. You aren't involved in the design or architecture (that is done several levels above you by "System Engineers"), you are given a highly detailed spec (sometimes so detailed it amounts to pseudo-code) that really doesn't allow any room for creative problem solving. The last aerospace job I had basically consisted of translating matlab script written by the scientists into Ada code (and God forbid you find a problem with one of the formulas a self-important PhD came up with).

You are treated as an interchangeable cog.

Most people who work outside the industry hear "I wrote a simulation model for a spacecraft attitude determination & control system" and think I was doing some really cool, challenging stuff. But as a software engineer, you really don't get to use your brain.

Re:Learning Ada by 52-6F-62 on Thursday March 28, 2019 @11:00AM (#19512814)
That reminds me of my dad's recollections of working with Engineers (of what branch, I'm not sure) in the oil refinery he worked at for ~30 years.

He was a pipefitter and he almost said what you just said word-for-word on a regular basis. If he had any corrections—well—he's just a lowly pipefitter, he can't be correct. Then he'd go out, work to their spec, the system would fail and he'd have to be called back in for overtime to fix it when they adjusted the spec to suit the problems he originally pointed out.

Nothing new under the sun, huh.

Re:Learning Ada by ovi256 on Thursday March 28, 2019 @11:33AM (#19513200)
That's just bad process that many best practices make a point of correcting. Lean Manufacturing, famously, pushes for people to give feedback.
Re:Learning Ada by 52-6F-62 on Thursday March 28, 2019 @11:49AM (#19513355)
Ah. Well while a refinery is technically in the category of manufacturing, my father wasn't part of the oil refining process itself.

He was initially construction, and later maintenance on—well—all of the pipes.

So the situation wasn't as iterative. It was more, for ex:

* We need a new line for X process.

* Draft plans for new line.

* Receive [unwanted] feedback from fitters familiar with existing lines (having been in and out of them for n years)

* Disparage feedback and double-down on drafted plans

* Fitters implement plans

* Line fails (a number of times this step has nearly cost people their lives)

* Feedback of failure reverts to engineers

* Redraft plans with practical considerations applied

* Fitters implement fixed plans

AFAIU that even somewhat aligns with lean manufacturing—in that they adhered to the designed process according to the authority, and when defects were found they iterated.

I think the main complaint is that the fitters at this point act as almost an extension of the machine itself explaining why something will not work, and the given authority rejected any input at the outset—acting as the old priest caste, if you will.

I worked briefly for Toyota (subman. Toyoda Iron Works) and the process wasn't much different. The stakes were just lower as the parts were smaller, cheaper, and faster to adjust. If I, as an operator, attempted to raise issue with the engineering team I would have been laughed out of the room in the same way. †

† the engineering team had us set every M part aside for inspection 2-3 times a day so they could come check calibration. There was no other direct feedback loop that way from ops.

Re:Learning Ada by ainar-g on Thursday March 28, 2019 @01:53PM (#19514733)

   You aren't involved in the design or architecture (that is done several
   levels above you by "System Engineers"), you are given a highly detailed
   spec (sometimes so detailed it amounts to pseudo-code) that really doesn't
   allow any room for creative problem solving.
Maybe there is something wrong with me, but it sounds amazing. Compared to “Agile Enterprise Software Development” I have to do now, where specs are non-existent, and developers are also architects, QA, DevOps, and managers, the job that you've described is Heaven.
Re:Learning Ada by nostrademons on Thursday March 28, 2019 @02:17PM (#19514976)
Why not swap jobs? Your pitch to the aerospace company is "I've got extensive experience in software development, but I'd like to work in a more rigorous environment with people who have extensive experience in solid engineering practices, and apply my skills to safety-critical problems that will affect millions of people."

I did an internship in college at a company that wrote avionics software, and it taught me that I didn't really want to do that. My job is actually a step beyond "agile enterprise software development" in ambiguity - I'm a founder, which means that not only are my specs non-existent, but my product, customers, and business model are too, and my job description also includes customer development, sales, marketing, interaction & visual design, and enough legal to avoid completely fucking things up. But I've found that I like the highly ambiguous environment where nothing's nailed down and everything's a problem that needs to be solved in a hacky way yesterday.

Luckily the economy is broad enough that people can move around to the work that suits them best. Take advantage of that - if you find you really don't like a sort of work, do something else!

Re:Learning Ada by anitil on Thursday March 28, 2019 @11:50PM (#19519028)
> not only are my specs non-existent, but my product, customers, and business model are too

This gave me a good chuckle!

Re:Learning Ada by ainar-g on Thursday March 28, 2019 @02:35PM (#19515170)
I probably would if I was a US or EU citizen. I live in Russia, and our aerospace industry… has issues, to say the least, and I've heard that US companies tend to be vary of Russian nationals. Thanks for the advice though, and good luck with your enterprise!
Re:Learning Ada by 4thaccount on Thursday March 28, 2019 @12:52PM (#19514034)
This is why I'd much rather be doing the Matlab modeling simulations and analysis as the first step of the project and would prefer to stay away from the actual implementation part. You get the creative fun without the hard part of tracking down bug.
Re:Learning Ada by acomjean on Thursday March 28, 2019 @10:38AM (#19512599)
I worked in defense for 10 years then left. I'm assuming its similar to the defense industry I guess (Radar and we were a Boeing sub contractor).

There a few things I don't miss: 1) It can be a little stressful, knowing that your software is controlling things that if wrong could go bad (people's lives are at stake). The strong process we had makes you abstract that away, but still its serious work.

2) Yesterdays technology tomorrow. We were using stable releases from years ago on hardware I couldn't buy in a a language hardly anyone uses (we were an Ada/C shop). I do like Ada, but it made it harder for employees let go to find new work.

it was somewhat satisfying when the end result got built and it was operational.

My software probably running today, somewhere. Even though I left a while ago.

Re:Learning Ada by Jtsummers on Thursday March 28, 2019 @10:52AM (#19512723)
I have a few more points but yours are a good start.

It's software work run by hardware companies. They don't schedule or budget or staff correctly. They often put engineers (of any sort) into decision making positions that should belong to computer scientists (or at least those trained in programming). Writing software is often treated as "just typing" when it's really an engineering and design activity.

Waterfall is also pervasive as a project management methodology. Even "modified Waterfall" (Vee model and others) are still subpar. What's frustrating is that, on the physical engineering side, they actually get the idea and value of prototypes and iterative development/design. But back to my first point, they still view software writing as a manufacturing activity, and not a design activity. So software shops get compared to the production line and not the engineering offices.

Regarding 2: Oh man, yeah. We've got people straight of school stuck on projects written in JOVIAL. Literally put them into a dead-end job straight out of school, we can't retain them. And we don't have the money (from customers) to hire the old timers, they're enjoying retirement too much.

Re:Learning Ada by jcadam on Thursday March 28, 2019 @11:17AM (#19513029)
> Oh man, yeah. We've got people straight of school stuck on projects written in JOVIAL. Literally put them into a dead-end job straight out of school, we can't retain them.

Exactly this. I got stuck doing Ada near the beginning of my career. Took forever to extricate myself from that trap.

Re:Learning Ada by majewsky on Thursday March 28, 2019 @08:55AM (#19511681)
> It's the only language I've ever used that tended to produce programs that worked correctly on their first run

I've had the same experience with Rust. (Never used Ada/Spark myself.)

Re:Learning Ada by sanxiyn on Thursday March 28, 2019 @10:49AM (#19512692)
Comment on training, comparing 80s and now, rings so true. Shame on Boeing.
Re:Learning Ada by bpyne on Thursday March 28, 2019 @01:16PM (#19514315)
It's not just Boeing, though. Formal training, at least in my limited perspective, is seen as a luxury now.

A related point is that training used to signify a ramp up time for an employee with an unfamiliar technology. Employees didn't go onto projects until they passed through a training course. Companies now expect zero ramp up time. Hence, they pass over highly qualified software engineers, who may not have a lot of experience in a particular technology, to get less experienced engineers who don't need training in the technology.