Slashdot Log In
The Return of Ada
Posted by
Zonk
on Tue Apr 15, 2008 11:57 AM
from the lord-byron-will-be-in-the-sequel dept.
from the lord-byron-will-be-in-the-sequel dept.
Pickens writes "Today when most people refer to Ada it's usually as a cautionary tale. The Defense Department commissioned the programming language in the late 1970s but few programmers used Ada, claiming it was difficult to use. Nonetheless many observers believe the basics of Ada are in place for wider use. Ada's stringency causes more work for programmers, but it will also make the code more secure, Ada enthusiasts say. Last fall, contractor Lockheed Martin delivered an update to ERAM, the Federal Aviation Administration's next-generation flight data air traffic control system — ahead of schedule and under budget, which is something you don't often hear about in government circles. Jeff O'Leary, an FAA software development and acquisition manager who oversaw ERAM, attributed at least part of it to the use of the Ada, used for about half the code in the system."
Related Stories
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
I used ada.... (Score:4, Informative)
Re:I used ada.... (Score:5, Insightful)
I found it very easy to work with and is only slightly more verbose than VB or PowerBuilder.
Frankly a language that forces programmers to do the right thing up front might just be the thing to do. It's always faster to re-type something than to try to find the bug in your code after it is running.
Parent
Re:I used ada.... (Score:5, Interesting)
I too used Ada in college. Ada is a superset of Pascal. It's very similar to Borland's Delphi and Oracle's PL/SQL, which are basically their versions of Object Pascal.
The FAA should've used Java. Then the project would've taken 3x longer and had cost overruns of 400% and/or would've gotten cancelled, like most government projects.
Parent
Re: (Score:3, Insightful)
It's more verbose and stuff, but I didn't see any completely foreign concepts in Ada that aren't around in most other langauges.
However, Ada had a lot of those concepts working reliably in 1983 and 1995 (the years the first two major versions were released if I remember correctly), when most other people were using not-so-sophisticated languages, to put it mildly.
Getting into Ada is rather complicated and time-consuming, though, so it's not surprising that it never took off in a big way.
Re: (Score:3, Informative)
Re:I used ada.... (Score:5, Informative)
Now that I'm not forced to work with it, I feel nostalgia sometimes. I built a GNAT RPM for Turbolinux, but I don't they ever distributed it. How is GNAT nowadays?
Parent
Re:I used ada.... (Score:5, Insightful)
It's not possible anywhere, unless you have access to an arbitrary size memory. Ada simply makes you aware of that fact before you put the code into production.
Parent
Re:I used ada.... (Score:5, Informative)
Show me some hardware that can do that, and it'll be a valid criticism. I believe the criticism you meant to level, was a dynamically sized string. This indeed was more difficult, but not at all impossible. I learned Ada95, and you could do it at least with the libraries available in that revision. Ada 2005 also fixed many such shortcomings in the standard library. Ada even has closures now!
Parent
Re:I used ada.... (Score:5, Interesting)
Perhaps the best job I ever had was when I was the 900 pound gorilla who vetted commercial Ada compilers. Every so often the boss would come in to my office, drop a package or tape of a commercial Ada compiler on my desk and say, "tell me what you think about this".
I got so frustrated with Verdix Ada at one point because they had potentially the best system, but ignored our (valid) bug reports. After perhaps one beer too many and seeing a remark about VADS on comp.lang.ada, I flamed them. The next day, I got email and a telephone call from a guy at Verdix. After some discussion, I agreed to become a beta tester and if my concerns were addressed to issue a formal public apology on the newsgroup. I did, they did and I did. Unfortunately, the fix was in, the official Unix Ada compiler for the DoD was declared to be Alsys (Ichbiah (Green), Brosgol (Red), duh).
I never met Ichbiah, but I did get to meet Benjamin Brosgol. He participated in Ada training (reeducation sessions) for Software Engineers at the company I worked for. A nice man, but I don't particularly care for the design decisions he makes in language design (and being me, I let him have both barrels - he's remarkably even tempered too).
Alsys was barely usable - the code it produced worked, but even small systems (30k SLOC) took hours to recompile. At one point I was setting up a network test and noticed that one of my embedded message strings was wrong. Rather than doing a painful recompile of the world, I fixed it by editing the binary in Emacs. A couple weeks later, the test was still chugging along (remarkable for Ada stability at the time) and when it was time to give a demo to the highest ranking General in the US Army, the boss lady told me to just leave it running, so I did.
So whatever anyone says about Ada in the 1980s, the view from the trenches was somewhat different. I also have no doubt that the technology probably got quite good in the 1990s. Early adopters always get the rough end of the stick.
Parent
Skill and not language used? (Score:5, Insightful)
As far as I'm concerned, if a competent team is hired; skilled programmers and developers, then anyone could get it done under-budget and pre-deadline. (yes, yes, military intelligence, oxymoron, but it seems to have worked out with this project)
I think the headline could later read, "the return of C", or any other language in the future if a team manages to finish a project efficiently due to the use of skilled developers.
Not necessarily a praise of language used is necessary, and a congratulatory beer for the team may be advised.
Re:Skill and not language used? (Score:5, Insightful)
Parent
Re:Skill and not language used? (Score:5, Insightful)
Parent
Re:Skill and not language used? (Score:5, Informative)
For example, suppose you want to add a new value to an enumeration. As long as you adopt certain style conventions (avoiding default clauses) if you miss any places where you need to deal with it, you will get an error at compile time.
The overloading rules work well too because the result type is also involved in overload resolution. So you can have i := foo(); and a := foo(); call different foo's if i and a are different types. If i and a start out the same type and later one of them has to change, you just change it and you will get an error message on the call to foo that you need to fix until you provide the missing implementation.
Plus the fact that you have modules and a good system (in Ada 95) for hiding implementations, and a much better controlled system of generics than in C++ means you have better control over your system. You are never going to have your executable blow up from 10 M to 200M overnight because you added a template declaration.
As for verbosity, it really isn't. More perhaps than C/C++ but nothing like COBOL. However it does pay to use a slightly more verbose style than is absolutely essential by always fully qualifying names, but the same is true in C++.
The one weirdness that catches out beginners is that arrays passed as parameters retain their lower bound. So when dealing with substrings, for example, you have to be prepared for non-zero (or 1) lower bounds. But its easy to do.
Parent
Re:Skill and not language used? (Score:4, Insightful)
I think C is the languages that killed Ada. Ada was about code safety and correctness, and C was about being able to break the rules. Early Ada also did not give sufficient access to the underlying machine, which made it suitable for applications but not so much for systems work where C excelled. By the time Ada evolved, C was already entrenched as the system language and C++ was starting to dominate applications.
As a language, Ada is great. Maybe a few nits I'd change, but very well grounded and building on the solid base of Pascal and Modula-II.
Parent
Re:Skill and not language used? (Score:5, Insightful)
Parent
Re: (Score:3, Interesting)
Let's imagine a language so obscure and difficult, that 90% of working programmers cannot gain sufficient mastery of it to understand what it is saying at first glance. This sounds terrible, until you realize that every programmer at some time in his life has written code in "friendly" languages that 0% of programmers (including his future self) can understand. And maybe selecting a language that only the top 1% of
Re:Skill and not language used? (Score:5, Funny)
Wouldn't work. C++ is just such a language for example, but this provides no such barrier to poor programmers and poor code!
Parent
Re:Skill and not language used? (Score:5, Insightful)
C is a good language if you (a) need a portable language but don't have another portable language to implement it with and (b) you need the language to be well designed enough for a team of competent programmers to tackle nearly any problem.
You can give a language more features that makes it easier to tackle certain problems, but it tends to undermine the portability goal. C is something like a portable assembler, only with the most critical abstractions for day to day programming provided. Once you get into more, you start to run into assumptions. Static or dynamic typing? It depends on your software engineering methodologies, particularly testing.
What C is emphatically not is idiot proof. Even worse, it is spectacularly not clever person proof. I dunno. I've never worked in Ada myself, but I suspect this might be some of its, er, attraction. It looks like a language in which it is not fun to be cleverer than you need to be.
Parent
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
Re:Skill and not language used? (Score:5, Insightful)
Or not. I'm not quite sure why, but my Python code has a significantly higher frequency of working right the first time than my Java code, and that's after developing in Java for 10 years and Python for less than 2. My theory is that it Java's static typing and verbosity consumes a portion of my mental energy that makes it harder to focus on the actual algorithm.
Parent
Re:Skill and not language used? (Score:5, Informative)
You need to make a distinction: they weren't writing new code, they were updating existing code. This is a very important distinction. We are all aware of "code rot" [wikipedia.org], etc. and how over time documentation gets lost, people have to re-learn a piece of code based purely on the source, etc. However they took an older piece of code and revamped it, right on time and under budget. This is notable, and may be attributable to some of the properties of Ada [wikipedia.org].
Maybe, maybe not, but there's a good chance it had something to do with Ada.
Parent
Re:Skill and not language used? (Score:5, Insightful)
Maybe, maybe not, but there's a good chance it had something to do with Ada.
If you have to walk in blind and maintain someone else's code, Ada is the language to do it in.
Parent
Re:Skill and not language used? (Score:4, Interesting)
Parent
Re:Skill and not language used? (Score:5, Insightful)
Parent
Re: (Score:3, Insightful)
Interestingly, that's one of the arguments in support of Java. Hardcore C or C++ hackers find it cumbersomely
Re:Skill and not language used? (Score:4, Insightful)
Parent
Re:Skill and not language used? (Score:4, Informative)
Ada:
IF a AND b THEN
c;
d;
e;
END IF;
C:
if (a && b) {
c;
d;
e;
}
Ada tends to use words instead of symbols. Does it take longer to type? Yeah, a little. But this doesn't make it hard or obscure. In fact, it makes it much easier for non-programmers (and new programmers) to read and understand the code.
Why would you care about non-programmers? Because in the real world, programs are written to offer real world solutions. It helps if these programs can be reviewed by engineers, scientists, accountants, etc... who may not know every language, but can figure out the basic logic if it uses words instead of symbols. Also, the improved readability makes future changes less painful.
What happens if a coworker used & instead of && in the C version? It's a lot harder to make those kinds of mistakes in Ada.
Parent
Re:Skill and not language used? (Score:5, Insightful)
Suppose we want to assign b to a, then execute c if b is non-zero:
In C:
if (a=b) c;
It is clever. But can easily be misread as a comparison between a and b instead of an assignment. Obviously (or maybe not) good programmers won't write this way, but C allows it and you don't always get to choose who wrote the code you're currently working with. And this is just a trivial example. It can get far more complex and clever than I'm willing to attempt.
Ada doesn't let you be that clever. You're forced to write it out:
a
IF b
c;
END IF;
Now pretend someone else wrote this and you don't know the original goal of the code segment. You're not even sure if the code is 100% correct or not. Which one would you rather maintain?
Parent
Re:Skill and not language used? (Score:5, Insightful)
Parent
Stringency==Secure (Score:5, Funny)
Ada (Score:5, Informative)
I took a class in Ada for a previous employer. I found it a lot like Pascal and not all that difficult. The main issue was the cost of compilers which had to go through an expensive certification process. I did find the language a but verbose for many things, e.g. here [adapower.com]
The real issue isn't that it's hard to learn, it's that it's a little cumbersome, but more importantly, not many people know it and they typical clueless manager wants to see 10+ years of Ada experience on the resume/cv before hiring someone. Those people are few and far between, but and competent software developer can learn it.
Re:Ada (Score:5, Insightful)
Parent
Language Magic Bullets (Score:3, Insightful)
I'm just worried that some PHB will read this and go, "Hmm, Ada, we must use that!"
Btw Ada is n't that bad a language, but does n't guarentee success. I remember being told that an Ariene rocket that exploded mid flight was written in Ada, the cause was a overflowing integer.
Re:Language Magic Bullets (Score:5, Informative)
Parent
Re:Language Magic Bullets (Score:5, Informative)
The old 16-bit gyroscope controller was replaced with a 32-bit one but the software was kept the same. The software got an invalid input, diagnosed it as a fault and shut itself down. The backup was brought online, got an invalid input, and shut itself down. At this point, the system determined that the rocket was unsafe and caused it to self destruct. By this point, it was already at a higher altitude than the gyroscope was intended to operate (the V accelerated faster and so got above this threshold much faster than the IV).
Parent
Re:Language Magic Bullets (Score:5, Insightful)
Parent
we need it where it matters (Score:4, Interesting)
Even better, write it in proof-carrying Ada. (while an aritrary theorem prover is impossible, one can get a theorem prover to work in practice via minor tweaks to the input)
Generating Ada CSDs (Score:5, Informative)
Anything that forces discipline is good. (Score:4, Interesting)
Is going back to Ada and other similar languages a good idea? Maybe. But I think you could get the same result by just demanding better quality work out of existing languages. People have correctly pointed out that the languages aren't really to blame, because you can write garbage in just about any language.
I sound like an old fogey, but I'd much rather see a smaller IT workforce with a very high skill set than a huge sea of mediocre IT folks. This would help combat outsourcing and the other problems affecting our jobs. Almost everyone I've heard complaining the loudest about outsourcing has been either downright lazy or just not very good at what they do.
I'm primarily a systems engineer/administrator. There are many parallels in my branch of IT to the development branch. We've got the guys who can really pick a system apart and get into the guts of a problem to find the right answer. We also have the ones who search Google for an answer, find one that solves half the problem, and wonder why the system breaks a different way after they deploy it.
Not sure how to solve it, but I think it's a problem that we should work on.
Re: (Score:3, Insightful)
Its a tool that can lead you to valuable information just as asking a colleague or consulting a book or other publication can. No one knows everything or has come across every issue, but there is usually a good chance someone has. Just because you have seen someone use it to find information who then did a half-assed job of fixing the issue doesn't mean the tool they used is no good or always lends itself to half-assed fixes.
I'm quite fond of Ada (Score:3, Interesting)
shhh! don't go blabbing this all over the place (Score:5, Interesting)
I know a few die hard Ada programmers who just love it...but very few. The brilliance of the language can be debated but its moot: no talent pool to speak of.
And besides, Ada is really French. [why did GNU make an ada compiler??????????????]
technology market: you can't separate technical merits from market forces
open source: your market has a small leak and is slowly collapsing.
Re:shhh! don't go blabbing this all over the place (Score:5, Informative)
Source:http://www.oss-in-atm.info/20051207/09-gasperoni.php [oss-in-atm.info]
Parent
You scared me for moment there (Score:4, Funny)
I was running out the door with my zombie survival guide & bug out bag heading for my arctic hideout to escape the impending invasion and I noticed out of the corner of my eye a reference to programming.
Thank god, Aunt Ada was a tad weird when she was alive, I really didn't want to meet zombie Ada.
Hurray! (Score:3, Funny)
And, here I spent all that time learning Java. Sheesh.
Re:It is not just the language (Score:5, Interesting)
I think that any strongly typed language with lots of compile time and link time checks would be about as good (e.g., Java).
In Ada, you can declare a variable to be an integer in the range 1..100, and if it goes outside that range at any point during its lifetime, an exception is immediately thrown. In most languages, you'd have to check it every time you assign it.
Also, you can declare subtypes which not only define ranges but wall themselves off from each other. If you declare "MonthType" and "DateType" as types, and then ThisMonth and ThisDate as variables, you can't say assign ThisMonth to ThisDate (or vice-versa) without an explicit cast, even if the value stored is within range.
I programmed in Ada more-or-less exclusively for a year, with all the warnings possible turned on, and it did change a bit how I think about programming. I always know, instantly, what type any object is and what its limits are, because I got so used to thinking about those things when using Ada.
Not that it's perfect, or the ultimate, or anything. I had a job where I wrote C only for about 2 years, and that definitely changed how I thought about programming too. When writing C++ I have sense of what the computer is going to have to do to actually run the code.
There's a quote that any language which doesn't change how you think about programming isn't worth knowing. Ada built up my mental macros for making sure my types and values were in order, and for that alone it was worth learning and using for a year.
Parent
Re: (Score:3, Insightful)
Re:I clicked too early... (Score:4, Funny)
ABBA was an early 80's rockband. ADA was an early 80's programming language. ABBA is seeing a resurgence in interest now. ADA is also seeing increased in interest now. ABBA consisted of four singers, and ADA consisted of four programming languages.
Coincidence? I too think not. Take a chance on it.
Parent
Re:My problems with Ada (Score:4, Interesting)
Parent