Slashdot Mirror


The Return of Ada

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."

30 of 336 comments (clear)

  1. I used ada.... by aldousd666 · · Score: 4, Informative

    In school. It wasn't actually any different from very many other languages that have huge class libraries, it's just that they were all 'included' in the langauge instead of linked in separately. 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. Just more typing, from what I remember.

    --
    Speak for yourself.
    1. Re:I used ada.... by TargetBoy · · Score: 4, Insightful

      Likewise, I also used Ada in college.

      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.

    2. Re:I used ada.... by Chris+Mattern · · Score: 4, Insightful

      Ever try reading in and storing an arbitrary length string? I'm fairly convinced it's not possible in Ada.


      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.
    3. Re:I used ada.... by SL+Baur · · Score: 4, Informative

      Now that I've left I STILL find ADA code running from the 70s. Ada didn't become Ada until 1983. Commercial compilers were still stabilizing five years later. So, if you had working Ada code you had a time machine and you also had a compiler from the future. See (all of the criticisms of Ada were true at the time I wrote it) http://homes.cerias.purdue.edu/~spaf/Yucks/V1/msg00096.html

      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?
    4. Re:I used ada.... by naasking · · Score: 4, Informative

      Well, that and Ada's I/O is pretty terrible. Ever try reading in and storing an arbitrary length string? I'm fairly convinced it's not possible in Ada.

      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!

    5. Re:I used ada.... by SL+Baur · · Score: 4, Interesting

      Yeah. The typed I/O stuff was really the pits. It was even more difficult to send arbitrary data across the wire in networked applications (which of course, they all are in C3I - one of Ada's first application domains). Difficult, but not impossible.

      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.

    6. Re:I used ada.... by Not+The+Real+Me · · Score: 4, Interesting

      "Likewise, I also used Ada in college."

      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.

  2. Skill and not language used? by thedak · · Score: 5, Insightful

    I may just be a whippersnapper, get off my lawn and whatnot; as a Java, C, C++ coder, but the project being completed under-budget and pre-deadline and having that attributed to Ada itself seems rather misguided to me.

    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.

    1. Re:Skill and not language used? by Digi-John · · Score: 5, Insightful

      Perhaps a language which is slower and a bit more difficult to write prevents programmers from dumping so many lines of semi-working crap, requiring them to put a little more thought into the code?

      --
      Klingon programs don't timeshare, they battle for supremacy.
    2. Re:Skill and not language used? by everphilski · · Score: 4, Informative

      Oddly, they're saying a language which is slower for people to write, and considerably more obscure than most languages, is the reason something is done under-budget and quickly? It seems like those traits would make it more secure, but take much longer to make...

      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", 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.

      Maybe, maybe not, but there's a good chance it had something to do with Ada.

    3. Re:Skill and not language used? by Detritus · · Score: 5, Insightful

      One of the advantages of a language like Ada is that more problems can be detected at compile time and corrected at low cost, as opposed to languages like C that assume that you know what you're doing and are optimized for speed. Ada also has run-time checks that can catch many problems. It's usually more efficient for the project to do the work up-front, rather than to hack together something and debug it.

      --
      Mea navis aericumbens anguillis abundat
    4. Re:Skill and not language used? by Jason+King · · Score: 5, Insightful

      Yes, 10 uber-coders can finish a project ahead of 10 clueless coders every time. What Ada does is it makes it harder for the clueless coder to hose the whole system. Because its persnickety you don't find buffer overruns (for example) in the wild. You always get them in test or sometimes they even generate compiler errors. The earlier in the cycle you get your errors the easier they are to fix.

    5. Re:Skill and not language used? by wfstanle · · Score: 5, Insightful

      You are forgetting something... Actually writing the original code takes up a small part of the total time spent on a program in its life cycle. There is debugging, testing and updating that have to be considered. I have updated programs written in Ada and in other programming languages. Have you actually had to read code the code written by others? Reading a C or C++ program is not easy. Some say that C (and all of its derivatives) are "Write only languages". At least in Ada, it is easier to make sense of the code that others write.

    6. Re:Skill and not language used? by Ephemeriis · · Score: 4, Insightful

      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", 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.

        Maybe, maybe not, but there's a good chance it had something to do with Ada. Ada is almost self-documenting. The syntax is all very verbose and human readable.

      If you have to walk in blind and maintain someone else's code, Ada is the language to do it in.
      --
      "Work is the curse of the drinking classes." -Oscar Wilde
    7. Re:Skill and not language used? by afidel · · Score: 4, Insightful

      No, I'm saying most of the bottom 90% have no idea what Ada is =)

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    8. Re:Skill and not language used? by hey! · · Score: 4, Insightful

      Not necessarily.

      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.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    9. Re:Skill and not language used? by naasking · · Score: 4, Funny

      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.

      Wouldn't work. C++ is just such a language for example, but this provides no such barrier to poor programmers and poor code! ;-)

    10. Re:Skill and not language used? by Tired+and+Emotional · · Score: 4, Informative
      Actually the real difference between Ada and many other langauges is that it is possible to code in a way that often guarantees that subsequent changes will either be correct or else will fail to compile. In other words, it makes modification easier. The idea is that local changes cannot have global effects. This was a design goal of the language (look up "beaujolais effect" for some history)

      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.

      --
      Squirrel!
    11. Re:Skill and not language used? by bnenning · · Score: 4, Insightful

      That extra security/straightjacket can mean it works right the first time.

      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.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    12. Re:Skill and not language used? by darkwing_bmf · · Score: 4, Insightful

      As a programmer, *I* find it more readable as well. This doesn't matter when writing your own small program from scratch, but it's damn convenient when you've got to maintain someone else's code. You can do fewer "clever" things in Ada.

      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 := b;
      IF b /= 0 THEN
        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?

  3. Stringency==Secure by Zordak · · Score: 4, Funny

    Ada's stringency causes more work for programmers, but it will also make the code more secure, Ada enthusiasts say.
    So... you're saying I should ideally program my firewall in INTERCAL?
    --

    Today's Sesame Street was brought to you by the number e.
  4. Ada by nwf · · Score: 4, 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

    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.

    --
    I don't know, but it works for me.
    1. Re:Ada by Maaras · · Score: 5, Insightful

      You hit the nail on the head. I wrote Ada on a defense project for about 4 years. From a purely technical standpoint, it is the best programming language that I have ever used. However, in the real world, other concerns tend to dominate. Concerns such as IDE's (AdaCore's IDE was exceptionally slow and hard to use, on Solaris, at least.) and finding developers who know Ada (or are willing to REALLY learn it) counter-balance a lot of Ada's strengths. What good is the best language on Earth if you can't get developers to use it?

  5. Generating Ada CSDs by HockeyPuck · · Score: 4, Informative
    If anyone is programming in Ada, I highly recommend the program jGRASP http://www.jgrasp.org/. From the site:

    jGRASP is a lightweight development environment, created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software. jGRASP is implemented in Java, and runs on all platforms with a Java Virtual Machine (Java version 1.5 or higher). jGRASP produces Control Structure Diagrams (CSDs) for Java, C, C++, Objective-C, Ada, and VHDL; Complexity Profile Graphs (CPGs) for Java and Ada; UML class diagrams for Java; and has dynamic object viewers that work in conjunction with an integrated debugger and workbench for Java. The viewers include a data structure identifier mechanism which recognizes objects that represent traditional data structures such as stacks, queues, linked lists, binary trees, and hash tables, and then displays them in an intuitive textbook-like presentation view. Another great product from the academic community.
  6. shhh! don't go blabbing this all over the place by museumpeace · · Score: 5, Interesting

    I make a nice living rewriting Ada systems into C++. When DoD suspended the "only quote us system development costs based on Ada" requirement, most bidders dropped Ada like a burning bag of poop. Its best advances such as exception handling have been picked up by modern system programming languages and even Java. The doctrinaire variable type enforcements have yet to be equaled but OO it really aint. Bottom line, plenty of old defense software systems have few living authors who will admit to knowing the code and upkeep is expensive, talent hard to find. This is ironic since DoD spec'd Ada in the first place because it had a maintenance nightmare of hundreds of deployed languages. So of course the managers think a more popular language with "all the features" of Ada should be a porting target. Eventually even customers demanded modernization and compatibility ports.

    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.

    --
    SLASHDOT: news for people who can't concentrate on work or have no life at all and got tired of yelling back at the TV.
    1. Re:shhh! don't go blabbing this all over the place by KokorHekkus · · Score: 4, Informative

      And besides, Ada is really French. [why did GNU make an ada compiler??????????????]
      Actually. GNAT is the result of the US Airforce forking over $3 million to New York University and apparently part of that contract was that the copyright would be assigned to FSF.

      Source:http://www.oss-in-atm.info/20051207/09-gasperoni.php
  7. Re:Language Magic Bullets by Detritus · · Score: 5, Informative

    It was the first Ariane V launch. They had reused software from an earlier model of the Ariane without properly testing it in its new environment. Think of it this way, you take the speedometer module from your Trabant and install it in a Ferrari. The first time that you exceed 100 km/h, the speedometer module fails with an overflow error because the type for speed was defined as 0..100. The problem was that Ariane's management was cutting corners on requirements analysis and testing. The software performed as designed, it just wasn't designed for the Ariane V.

    --
    Mea navis aericumbens anguillis abundat
  8. Re:Language Magic Bullets by mihalis · · Score: 4, Insightful

    Bug? Phooey - The software in question performed exacly as per spec... the spec for the Ariane 4 rocket, that is.

  9. Re:It is not just the language by dprovine · · 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.

  10. Re:Language Magic Bullets by TheRaven64 · · Score: 4, Informative
    Actually, it's slightly more depressing than that. The component in question was a gyroscope used for immediately post-launch corrections on IV. It wasn't required at all in V due to improvements in other areas, but it was kept in for extra reliability.

    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).

    --
    I am TheRaven on Soylent News