The Return of Ada 336
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."
I used ada.... (Score:4, Informative)
Re: (Score:2, Insightful)
Re: (Score:2)
Re: (Score:2)
Now that I've left I STILL find ADA code running from the 70s. Upgrading it is a major bitch but If you are going to sling code for the government it would be good to know the basics.
The ability to import java and c into ADA are a real boon.
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?
Re: (Score:3, 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.
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.
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)
Sure class libraries are not included with Ada as they are in Pascal, C++, Java, et all. But the advantage of Ada is that each team developing a part of the program can write their own piece of it and only release the APIs needed to interface with that piece of the program without seeing the source code. For example you can write functions and procedures into a class library and keep it secret so only members on your team can see the source code,
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.
Re: (Score:2)
Re: (Score:3, Interesting)
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.
I'm not saying it has to be in a single step, indeed to do it safely will often require multiple steps. However, Ada doesn't seem capable of either.
The icing on the case was that if you do a get(foo), where foo is a fixed length string, it will read exactly the length of the string, hanging if there's not enough input and stopping part of the way through the input if there's too much. It might be possible to work around that by reading a single character at a time into a character and then repeatedly ap
Re: (Score:3, Insightful)
> It's not possible anywhere, unless you have access to an arbitrary size memory.
And yet, a language without the capability to attempt that (and only fail if the string actually gets too long for memory, which in practice doesn't happen very often) is pretty much useless for writing real-world programs like, say, an XML parser, or an email proxy, or, you know, anything much beyond classroom
Re: (Score:3, Funny)
Re: (Score:2, Informative)
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!
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.
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: (Score:2)
Re:Skill and not language used? (Score:5, Insightful)
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!
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.
Re: (Score:3, Insightful)
The reality is, bad programmers will inevitably generate bad code. Skilled programmers, however, can always write quality code, regardless of the language, however they will also be able to utilize available language features (such as DBC, etc) to improve their work. At least, IME.
Re: (Score:3, Insightful)
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.
Re: (Score:3, Interesting)
Also I don't think you can really label Java as "verbose" when it shares mostly the same the syntax as C++ and C# (unless you assume those to be verbose too).
Having said that, it's not
Re: (Score:3, Insightful)
For instance in OCaml you'd write:
let emps = List.filter (fun e -> e.salary>limit) employees
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.
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.
Re:Skill and not language used? (Score:4, Interesting)
Re: (Score:2)
Re:Skill and not language used? (Score:5, Insightful)
Re:Skill and not language used? (Score:5, Insightful)
Re: (Score:2, Insightful)
Re: (Score:3, Insightful)
Interestingly, that's one of the arguments in support of Java. Hardcore C or C++ hackers find it cumbersomely
Re: (Score:2, Insightful)
Re:Skill and not language used? (Score:4, Insightful)
Re: (Score:3, Insightful)
Are we talking about the same old Java that doesn't support typedefs and uses Object for all standard data structures? Generics add a bit of syntactic sugar, but do little to ensure safety. You can cast a HashMap to HashMap without any way to check if it is valid at compile OR run time. Compared to that, C++ can be used for safer programming by encapsulating all pointer
Re: (Score:2)
this one feature prevents much debugging and allows better, more automated test coverage.
they coded slower, but took less time in QA.
Ada forces more design ... (Score:2)
Ada may force more up front design and less seat of the pants hacking. This can lead to fewer bugs and less reworking of code. Some of the worst code I've seen came from otherwise intelligent people who jump write in and expeditiously write a l
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.
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?
Re: (Score:3, Interesting)
So why does a difference in language make an impact? If a language emphasizes good programming practi
Re: (Score:2)
Re:Skill and not language used? (Score:5, Insightful)
Re: (Score:3, Insightful)
If you want cowboy coders, then choose the latest, coolest anguage there is. You'll soon see the muppets who couldn't hack it with an established language who had to do real work with real systems using it. By saying they work with the latest, they get to blame the language "its a learning process", or just by following where the money is.
Coders who insist on the latest stuff are always worse than the people who are content to work in t
Re:Skill and not language used? (Score:5, Insightful)
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.
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.
Stringency==Secure (Score:5, Funny)
Re: (Score:2)
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)
Re: (Score:2)
1) You define Distance as 4 digits, but give it a range containing 6.
2) You define speed as distance/speed, which is recursive and wrong.
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: (Score:2)
I was wondering if anyone would mention that - the first non-flight of the Ariane 5 booster [wikipedia.org].
It's possible to program bugs in any real programming language...
Re:Language Magic Bullets (Score:5, Insightful)
Re: (Score:2)
Re: (Score:2)
That was the first Ariene V flight. Wikipedia has an article [wikipedia.org] and the accident report is here [mit.edu].
Basically, the error was an integer overflow in code reused from the Ariene IV for which the range check had been deliberately eliminated as a performance measure since (in the Ariene IV) it could not overflow. That assumption is not valid for the Ariene V.
To add insult to injury, the functionality provided by the component is not needed at or after liftoff, so could s
Re:Language Magic Bullets (Score:5, Informative)
Re: (Score:2)
A remote device might have settings 1 through 10. Send it an 11 and it has problems. ADA is still perfectly capable of overflowing a remote device by a programmer not adhearing to a communication protocol even if the local machine sending commands isn't susceptible to overflows.
Re: (Score:2)
Re: (Score:2)
Ariane V http://www.adapower.com/index.php?Command=Class&ClassID=FAQ&CID=328 [adapower.com]
OTOH, remember the link is to a site promoting Ada. They're telling the truth as they know it, but they're biased.
Re: (Score:2)
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).
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)
Re: (Score:3, Informative)
Imagine a surgeon who discovers how much money can be saved by purchasing Xacto blades instead of using blades manufactured to more stringent standards. That is exactly the situation we are currently facing when contractors decide to use C or C++ instead of Ada. On the surface one gets the same result. It is only that superficial result that counts for the lowest bidder.
- Richard Riehle
Re: (Score:3, Insightful)
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.
Re: (Score:2)
Just peruse any IT forum site for common tech questions. You will see 10 answers for the same question, some of which are totally ridiculous. However, they're not totally ridiculous to someone who hasn't worked in the fiel
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]
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.
My problems with Ada (Score:2)
2) Garbage collection is managed by hand.
3) Poor interfacing with C++. (Well, so has most everything but C++.)
4) Programs in Ada tend to be HUGE!!!. That's the big one. I'm talking about source code size here, not binary size, which is reasonable.
5) If you don't know the type of data you're reading in, it's difficult to handle it. This is both a problem and an advantage.
6) Ada's handling of inheritance is ver
Re:My problems with Ada (Score:4, Interesting)
Re: (Score:3, Interesting)
1) Unbounded strings is a partial solution, but it doesn't blend nicely with string constants, so it's not a good solution.
2) I don't like C or C++ and garbage collection either. I'm considering boost C++ for a project, but I'll probably opt for some language with decent garbage collection.
3) Exporting a C interface isn't equivalent to good support of C++. Try interfacing Qt to Ada. (It's probably been done, but I mea
Re: (Score:2)
Re: (Score:2)
String issues are the single biggest bugaboo I've seen Cish programmers have with Ada. Ada's built in strings are fixed-sized and sized perfectly to their contents (no Cish null terminator). You'd think this would be a trivial difference, but it completely changes how (and when) you need to create and handle y
Ada never went anywhere... (Score:2, Insightful)
Because of the nature of the language, you HAVE to know what you are doing to write a program in Ada. Getting something to compile in Ada pretty much guarantees you get something that will run reliably.
Schools that train programmers starting with Java or C++ provide the benefit of making their graduates high
Hurray! (Score:3, Funny)
And, here I spent all that time learning Java. Sheesh.
Political Agenda (Score:2, Insightful)
Look, can we get beyond the "government is always inefficient" meme? It's just not true. Many government projects come in on schedule and on budget. Some project are late and over budget. Guess what? It happens in the private sector too.
Government is actually more accountable to the people than private corporations are. Numerous cost controls are in place. Public officials are elected. I have not seen the same level of scrutiny in the private sector.
So let's move beyond the ultra conservative an
Reminds me of structured programming (Score:2, Interesting)
COBOL used to be touted as a great language because it was 'self documenting'. Yet a lot of retired COBOL programmers got a last hurrah when they were
inevitably (Score:3, Funny)
50k line projects.. so could be in C (Score:2)
There was a period where any program projected to be over 50k lines had to be in Ada.
So they did the only logical thing.. broke projects into 50k line components.
Re: (Score:2)
I can't help but wonder what industrialized country you live in that is somehow not addicted to oil.
Re: (Score:2)
Re: (Score:2)
Having 33% of your energy production dependent on oil can well be considered "addicted". Would the oil sources disappear over night, you'd certainly have much trouble (as would the rest of the industrialized world).
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.
Re: (Score:3, Interesting)
I know it's not the same, but can't you get the same effect in other languages? In particular, C++ can be used to implement numbers with ranges and units. Something like this...
template <int min_value, int max_value, typename type_tag>
class chec
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.
Re: (Score:2, Insightful)
"I can do it in C" was the line we always used when our Ada teacher said anything "could be done in Ada but nothing else".
"Rendezvous" was built into Ada explicitly but other standards have given it directly or through libraries to everything else. It's just thread synchronization that you can emulate/simulate/do in many other lang