views:

190

answers:

5

We are currently developing a noncritical moving map type navcomm solution for our Atom based avionics device. The prototype has been done in Python/Qt, now I need to decide on a language to use for the "real" app. Ada or C/C++. I've been a C++ developer for 12 years and loathe the language. Ada seems promising, but I'm a little worried about it's supporting infrastructure, available libraries, developer availability and so on. Has anybody here been through this before? What are your conclusions?

A: 

Try going to Monster and similar sites and searching for Ada. See how many people are asking for Ada developers. If it's very few, probably there are also very few Ada developers and you will have staffing problems.

Blank Xavier
If it's mostly about logic and algorithms, every developer should be able to learn a new language in a reasonable amount of time. This is about choosing the right tool for the job (in a risky environment, no less).
DarkDust
Why would a developer learn a new language - with the attendent pay cut from being inexperienced in that field - rather than take a job in a language he's already an expert in?
Blank Xavier
I've googled, looked on eLance, etc. - it seems that Ada programmers are hard to come by. If you are a Company like Lockheed, that might not be a problem, for a small company like ours it is a problem.
Also, the name of the language is Ada, not ADA. Ada isn't an acronym. Well, it is, but when used as an acronym it isn't referring to a programming language. ADA typically means American Dental Association or Americans with Disabilities Act.
George
I *really* dislike the "finding developers" argument. Nobody has any trouble whatsoever assuming developers will pick up a language like Perl on the fly. Ada is far easier to learn (and maintain!!) than Perl. If you can't learn a new language, you have no business being in this industry.
T.E.D.
@ T.E.D.: yet I note -very- few adverts indicating they will accept people who have no knowledge of a given language and that they can learn it on the job. Employers, I think, are not interested in this approach. Rather, they compete for those who already possess the skills they seek.
Blank Xavier
I'm not that worried about developers not being able to learn Ada in a short time, more about developers wanting to learn it, because they feel it's a better investment learning Microsoft's latest greatest.
@user478389 - I'm a firm believer that no knowledge is ever wasted. That beind said, Blank is absolutely right about Ada not being a language du jour right now. Still, I've been around enough to have seen several generations of those from Microsoft. I'll happily learn one if I need to, but otherwise I ceased being impressed years ago. The most important thing you will get from any language is new ways of looking at programming problems (not more padding for your resume).
T.E.D.
+2  A: 

While a robust language in its time, Ada hasn't really kept up with modern software development practices. Its "object oriented" features are a bit awkward and harder to use than newer languages. There are libraries, but it's not exactly a thriving third party ecosystem. Developers are harder to find, but any good developer will be able to pick up Ada in a short time. You may find a slightly higher proportion of developers familiar with Ada in the aviation industry.

You may consider using Java, as there seems to be a migration from Ada to Java in various parts of the aviation industry. You didn't mention Java though, so perhaps you discounted it already for different reasons.

Greg Hewgill
Java wasn't on my radar, to be honest, as I don't see many advantages over C++ here.
One great advantage of Java over C++ is memory safety. There are no dangling pointers or forgotten deallocations in Java.
Greg Hewgill
True, but there's still the problem with unfreed resources.
Another thing is that determinism is a big issue in aviation. If we ever have a need to certify parts of our software, it will be easier with Ada or C(++). DO178C will consider OO technologies, but I'm not quite sure how that will apply to jitted languages.
Avoiding the tempation to vote this down just because I disagree. Generally folks who find Ada's way of doing OO "awkward" are those who learned to do it another way. It is actually more powerful, as you **can dispatch on more than one object at once**. However, as a sop to folks who feel as you do, the latest version of the language provides the old `object.method()` notation you crave. You need feel awkward using Ada no more.
T.E.D.
+6  A: 

(A response from an actual Ada developer)

Contrary to prediction of its imminent demise, Ada is still going along just fine. The current version of the language is Ada 2005, and the updates for Ada 2012 are in the process of being finalized.

Ada continues to undergo modernization and incorporate new software engineering features and practices as they're developed by industry. (And the reverse is true as well--built-in concurrency has been a core Ada feature since 1983, and which is only now making its way into "modern" programming languages. :-)

Not every new feature and practice is going to be adopted by Ada, Ada's not going to morph into a functional language, for instance. But those features that enhance software productivity, reliability, and safety are incorporated in a way that is consistent with Ada's underlying architecture and intent.

It's certainly true that Ada is not a widely used programming language, but it does have a committed developer community, who are almost always more than willing to help out with questions, concerns, and advice for those developing projects and learning the language. Resources include here at StackOverflow (check the Ada tag), comp.lang.ada, even Reddit.

As for Ada developer availability, it's sort of a "Catch-22" situation. Because it's not widely used, there are fewer developers. Because there are fewer developers, companies shy away from using it in projects, and because it doesn't get used for projects, developers don't go looking for jobs in it.

I can attest, though, that there are many knowledgeable current and former Ada programmers who love working with the language, and would be particularly interested in doing so for an application of the type you're describing--if they knew about it. If you made the commitment to go with Ada, and then unapologetically advertised for Ada developers--on Monster, wherever else you advertise, tastefully on comp.lang.ada or Reddit--I think the availability of Ada developers would surprise you and many other skeptics.

Good luck with your project.

Marc C
Thank you, I've just ordered "High Integrity Software using Spark" and I'm looking forward to working through it.
You said in your question that this project isn't critical. That being so, you might find SPARK a bit over the top -- ordinary Ada, restricted perhaps by using a style guide or more automated tools such as AdaControl (http://adalog.pagesperso-orange.fr/adacontrol2.htm), should be at about the standard of MISRA C. http://www.adaworld.com/pdfs/misracandada.pdf has a rather inconclusive comparison.
Simon Wright
Thanks for the links, appreciated.
One nit: While Ada is indeed not a functional language, I generally like to code it in an at least semi-functional style. Ada's way of dealing with strings and arrays strongly encourages that approach.
T.E.D.
+3  A: 

Generally, there are some situations where I'd prefer C++. If your program has no concurrency in it whatsoever, and there are some C++ (not C but C++) libraries out there that would be really helpful to use, then C++ is probably the way to go.

However, if you will have concurrency as part of your system design, Ada is a huge win, as it supports it natively. One job I was on actually wrote an entirely portable real-time scheduler. We ported the entire simulation (> 100KSLOC) from vxWorks to a completely different vendor's Windows compiler in about 2 hours (all spent dealing with their different source code library systems).

Any library that has C linkage is perfectly available in Ada, although sometimes you might find yourself having to write bindings. That is a wee bit more work, but you will often find that others with the same libraries to deal with have done the work for you already. For instance I believe there are bindings to all of Win32 available. Still, making new ones is easy enough that I often find myself doing it just to provide an interface I like better.

Ada also has a couple of features that IMHO make it the premier language available for low-level system's programming. For example, the language allows you to specify exactly where and how big each field in a record is placed. This is vital in dealing with hardware or data communicated with other platforms. C++ currently only allows you to specify how big each field is. I'm dealing with that right now, and find it very frustrating.

The other killer feature for system's programming is that by default all arrays are bounds checked. You can turn it off for efficiency if you want, but the default is safety. IMHO this is what the default should be. In C++ if you want the safety, you have to go out of your way to code it up yourself, or use a safer class like std::vector (and only use the .at() method. How many times have you ever seen anyone do that? Never? Me either.)

T.E.D.
Are there any tools for automating those boilerplate imports from C libs?
T.E.D.
A: 

I'll throw in my thoughts. For quick context: I'm currently working in Ada at one of those big companies (not Lockheed, but close enough). I am a C programmer at the core. (used C++,C#,and Java as well)

Ada is fine as a language. It has some nice things in it that you can't get in C/C++. For real-time critical systems, it is really nice. It takes a little getting used to, but it is easy enough to learn.

The downside is the language perception really. Most of the engineers I know that like and choose Ada are older (45+). Of those there are 2 types of programmers: the people who are actually really good at Ada and can do it right, and those that "know" Ada, but program it in a way/style representative of the 70s with older languages. Those good Ada programmers are highly valued here. For a small company to snatch them, I would think you would need to drop some major cash on them. They have 4-5 weeks vacation, 6 figure salaries (even in cheaper places to live) and all sorts of benefits. I hope this doesn't seem ageist, but it is just the way it is and something to think about as a small company. If you are in a major tech area like Dallas/Fort Worth, it might be ok. As you mentioned in your comments, most of the younger programmers aren't excited to learn Ada. It may pay well and be fine as a language, but it isn't nearly as marketable or exciting.

If I were starting a real-time embedded system project, I would just stick to C ( or C++ if you need the OO). For embedded I prefer C actually over C++ because in my experience, engineers try to force the embedded system into OO and use features because they are there, but your mileage may vary. With C or C++: 1. HUGE pool of programmers to choose from. 2. Every tool known to man has been made to work with it (many are free). 3. The resources online are endless.

It will allow you to just get to work. If you have access to some of the great debuggers using JTAG like Green Hills and VxWorks have, it really pushes the development speed along.

Awaken

related questions