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

80 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 Xipher · · Score: 2, Insightful

      I had to use Ada in my Data Structures class with John McCormick at UNI http://www.cs.uni.edu/~mccormic/ This guy teaches a tough class but you end up learning a lot, and he is very big on Ada. While I haven't used it much since I did like a lot of features in the language.

      --
      I don't know everything.
    2. Re:I used ada.... by aldousd666 · · Score: 2, Informative

      They used it in real school too, I never had a java course, and I get along just fine today in 'the real world.' Admittedly I don't use Ada either, but it worked well enough for Data Structures and Algorithms classes.

      --
      Speak for yourself.
    3. 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.

    4. 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.
    5. Re:I used ada.... by harmonica · · Score: 2, 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.
    6. Re:I used ada.... by wfstanle · · Score: 2, Informative

      That's the root cause of buffer overflows. If you can't do such "crimes" then security is advanced.

    7. 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?
    8. 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!

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

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

    11. Re:I used ada.... by Orion+Blastar · · Score: 2, Informative

      Ada is very much like Pascal, but with a black box strategy.

      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, but another contracting agency on another team cannot steal your IP because they only have access to your library but not your source code. They know the variables they have to send to your functions and procedures in order to use them and what they pass back, but it is a black box process in that they cannot see how the black box works only what goes in and out of it.

      Ada meets the DOD standards for a secure language because of the black box concept. That way a program written for the military by several different contracting teams is more secure because if an enemy agent gets a copy of one of the source code copy to one of the libraries they won't have access to the other five or six libraries that it interfaces into in order to work.

      Of course this means Ada isn't the best language to use for an open source project, or for when several teams need access to the source code of the other teams as well. Ada should only be used when the IP or security needs to be secret and on a need to know basis that can control who can see the source code and who cannot.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    12. Re:I used ada.... by Mad+Merlin · · Score: 2, Interesting

      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.

      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 appending the character to a string which you could theoretically resize. However, IIRC, resizing the string, casting a character to a string, and appending to a string are all extremely painful or impossible.

    13. Re:I used ada.... by jonadab · · Score: 3, 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.

      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-example programs.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    14. Re:I used ada.... by LoofWaffle · · Score: 2, Funny

      You're right. An XML parser is infinitely more useful than say an early warning radar, which are largely coded in Ada.

      --
      You know, Custer had a plan.
    15. Re:I used ada.... by HeroreV · · Score: 2, Funny

      I don't think many applications are going to find much use for early warning radar.

    16. Re:I used ada.... by kafka.fr · · Score: 2, Informative

      [...] anything much beyond classroom-example programs. Oh yes. Check this classroom example :
      https://libre.adacore.com/aws/main.html

      "AWS: a complete Web development framework"

      As a reminder, the GNAT compiler is written (mostly) in Ada. But maybe it's not much beyond a classroom example either.
    17. Re:I used ada.... by Bush+Pig · · Score: 2, Informative

      When I was at uni from 1992-6 ADA was the teaching language (must have stabilised since you used it). I loved it. It forces good habits, and if you get a clean compile, it is GUARANTEED to do something sensible (although not necessarily what you wanted). Also Oracle's PL/SQL is a subset of ADA with database extensions, and it's as tight as a nun's cunt. I love it.

      --
      What a long, strange trip it's been.
  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 larry+bagina · · Score: 3, Insightful

      Aside from writing code, you also have to test it. That extra security/straightjacket can mean it works right the first time.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

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

    4. 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
    5. Re:Skill and not language used? by samkass · · Score: 2, Insightful

      Not at all. Most of the time spent between project kickoff and software delivery is NOT spent actually typing the code. If you program in a language that makes it harder to write bugs, easier to find bugs, easier to express algorithms, easier to read other people's code, and easier to do automated testing and verification you'll save huge amounts of time even if coding takes several times as long.

      Interestingly, that's one of the arguments in support of Java. Hardcore C or C++ hackers find it cumbersomely verbose, but it's pretty easy to read any Java coder's source code from anywhere in the world and debug it with relatively little time spent in the code archeology phase. That is, for those bugs that make it past the relatively extensive automated checks that are possible because of the straightforward syntax.

      --
      E pluribus unum
    6. 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.

    7. Re:Skill and not language used? by Anonymous Coward · · Score: 2, Insightful

      but it's pretty easy to read any Java coder's source code from anywhere in the world
      Only if India's on the moon.
    8. Re:Skill and not language used? by hey! · · Score: 2, Interesting

      I think there is something to be said for this idea. Not too much, mind you, but something.

      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 programmers is capable of using might be a good thing for some projects.

      Unfortunately, I don't think you can mandate thinking via language restrictions.

      If you really, really wanted to improve the quality of thought in code, wouldn't mandate languages, you'd mandate editors that don't support cut and paste. Then instead of taking a piece of code that works more or less for one purpose, then hammering into the approximate shape you'd need for something else, sooner or later you'd be forced to abstract what was useful about it rather than banging it out over and over again.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    9. 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.

    10. Re:Skill and not language used? by somersault · · Score: 2, Insightful

      That's what I was thinking too. Testing should be a major part of any project - and especially one where large pieces of metal hurtling through the air are involved :p

      --
      which is totally what she said
    11. Re:Skill and not language used? by aldousd666 · · Score: 3, Insightful

      haha in refernce to your java being easy to read by default, you're forgetting about people like this.

      --
      Speak for yourself.
    12. 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
    13. 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.
    14. 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.
    15. Re:Skill and not language used? by Abcd1234 · · Score: 2, Insightful

      Nah. "Hack it 'til it compiles" still works in a strict language. It just takes a little longer.

      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.

    16. Re:Skill and not language used? by iamacat · · Score: 2, Insightful

      That is, for those bugs that make it past the relatively extensive automated checks that are possible because of the straightforward syntax.

      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 pointers into template classes and relying on local destructors for reliable memory management.

    17. 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! ;-)

    18. Re:Skill and not language used? by darkwing_bmf · · Score: 3, Informative

      You could say it's slower to write, but it's not that slow.
      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.

    19. Re:Skill and not language used? by cmeans · · Score: 3, Interesting

      Or it could simply mean that they way over budgeted for the work that was actually needed to be performed, and poorly spec'd the time it would take to do it. Normally, companies are more conservative with how long it'll take to do something (this helps bring the cost down and increases the likely hood that they'll get the work), thus, the reality tends to extend the deadline. In this case, they might have just been overly generous in their time allotment, and simply fortunate that the client was willing to pay for it.

    20. Re:Skill and not language used? by Kartoffel · · Score: 2, Insightful

      Mod parent up. Bondage and discipline prevents sloppy hack jobs, yet hinders quick hackish projects. For small projects, rapid hacks are ok. For large projects, you want thoughtful organization and testing along the way.

    21. 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!
    22. Re:Skill and not language used? by Darinbob · · Score: 3, Insightful

      "Return of C"? Has it ever gone away? I use it all the time in places where C++ is too bloated and assembler isn't required.

      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.

    23. Re:Skill and not language used? by Darinbob · · Score: 2, Interesting

      The problem with software taking too long to write and ending up over budget has little to do with how easy it is to write a line of code. Obscurity should have zero impact on a quality team of programmers (who should all be able to switch languages at a drop of a hat). Writing slowly should have little impact as well, since most programming should rarely involve having to type as fast as you can all day.

      So why does a difference in language make an impact? If a language emphasizes good programming practices, the users of that language tend to follow along. A language that is sloppy with types or has malleable interfaces can encourage sloppier code. You can write great code in any language, and yet great code still remains relatively uncommon.

      Another factor is with project management itself. The project under consideration isn't about writing a new version of quicksort quickly and under budget, it's about a huge piece of work with maybe dozens of people working together. Programming such a project is not about writing a new function, but about how to fix or change existing functions without breaking something else, and how to get different people's work to fit together as planned.

    24. 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.
    25. Re:Skill and not language used? by gbjbaanb · · Score: 2, Insightful

      Actually, I think its the reason you get uber-coders in the first place.

      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 the old stuff. They are the people who are more interested in getting the system implemented well, and not playing with the new toys.

      So, choose ADA. If you can find them, experienced ADA devs will be far better for your business than some C# kids.

    26. Re:Skill and not language used? by Samah · · Score: 3, Interesting

      I don't understand why people love dynamic typing so much. I'd much rather the compiler tell me off for misusing a variable than at runtime where it might not crop up until the code is in production. I'm not saying dynamic typing is BAD (I love Lua), just that I don't get why so many people can possibly hate static typing.
      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 exactly terse, either. :)

      --
      Homonyms are fun!
      You're driving your car, but they're riding their bikes there.
    27. 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?

    28. Re:Skill and not language used? by chgros · · Score: 2, Insightful

      Note that the verbosity is not due to static typing. For instance, what you do in Python can also be done with most ML family languages (e.g. OCaml), which are statically typed.

      For instance in OCaml you'd write:
      let emps = List.filter (fun e -> e.salary>limit) employees

  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. Language Magic Bullets by msgmonkey · · Score: 2, Insightful

    Most projects do not meet their goals and/or timeframes from bad project management. Whilst the choice of language is obviously important, I have never heard of choice of language being a major factor when reporting on contracts that are over due/over budget or plain just dont work.

    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.

    1. 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
    2. 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.

    3. 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
  6. we need it where it matters by r00t · · Score: 3, Interesting

    All that vulnerable client-side code (image libraries, HTML parser, etc.) would be immune to buffer overflows if it were in Ada.

    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)

    1. Re:we need it where it matters by dpilot · · Score: 2, Informative

      I was grabbing someone's .sig and stuffing it into my "quotes" file, and found this relevant tidbit...

      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

      --
      The living have better things to do than to continue hating the dead.
    2. Re:we need it where it matters by Nimey · · Score: 2, Insightful

      Unix syscalls in Ada: like ripping your cock off to give yourself head. -- anonymous

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
  7. 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.
  8. Anything that forces discipline is good. by ErichTheRed · · Score: 3, Interesting

    I don't think I'm the only one who has had to work with really lousy programming and IT coworkers. One of the good things about the past was that programmers had a much harder time hiding their mistakes. In the days of dual-core processors and tons of RAM, even a mediocre programmer can get Java or any of the .NET languages to produce code that works. Of course, readability, maintainability and speed aren't really a factor.

    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.

    1. Re:Anything that forces discipline is good. by Petaris · · Score: 3, Insightful

      Whats wrong with searching Google?

      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.

      --
      ~Petaris "The world is open. Are you?"
  9. I'm quite fond of Ada by Alistair+Hutton · · Score: 3, Interesting

    I'm actually quite fond of Ada as a language. Yes, it's a very verbose language but unlike, say Java or C#, the verbosity gives you a lot of stuff. It gives you good threading. It gives you a very good encapsulation. It gives you a very nice parameter system for procedures/functions That's a point, it seperates between procedures and functions. It gives very, very, very good typing. Very good typing. It's very good. I like it. It's what I want when I'm doing strong, static typing rather than the wishy-washy getting in the way mess that many other main-stream languages. When I use a type I want it to mean something. It's a good language to teach students about programming in my opinion.

    --
    Puzzle Daze is now my job
  10. 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
  11. You scared me for moment there by BigGar' · · Score: 3, Funny

    That was my aunt's name and she passed away many years ago.

    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.

    --


    Shop smart, Shop S-Mart.
  12. 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.

  13. Re:I clicked too early... by eclectro · · Score: 3, Funny

    ... i thought this story's title read, "the return of ABBA."

    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.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
  14. Re:It is not just the language by Alistair+Hutton · · Score: 3, Insightful

    I think that any strongly typed language with lots of compile time and link time checks would be about as good (e.g., Java). Java, all the verbosity of Ada without any of the benefits. I can't work out how Java managed to make programmers type so many characters without achieving anything. Java's compile time checking is decent but seriously weak when compared to Ada. I've always liked the Ada compiler pointing out my spelling mistakes :-)

    --
    Puzzle Daze is now my job
  15. Ada never went anywhere... by nullkill · · Score: 2, Insightful

    My first three foundation CS courses (back in 2001) were all taught in ADA. This provides the benefit of qualifying me to talk on the subject, with the drawback of providing a heavily biased opinion...

    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 highly employable, but with a greater risk of turning out highly incompetent programmers.

    Ada never went anywhere, there has just been a large increase in the number of developers trained on other languages. The reason its 'Returning' is because almost any Project that uses Ada does provide for a success story (As long as you use developers who have been trained on Ada (Googling for source examples is not training)). Its a professional language for applications that just have to run. (Examples of great software written in ada: (Air Traffic Control, Flight Software, Hello World, etc...)

    As I said, my opinion is biased.

  16. Hurray! by Zarf · · Score: 2, Funny

    I worked in Ada for a few years. I guess I better go and dust off my books.

    And, here I spent all that time learning Java. Sheesh.

    --
    [signature]
  17. Re:Ada was designed for multiple CPUs by fitten · · Score: 2, Insightful

    However, one particular feature of Ada seems more suited to current hardware than other languages: it was designed to allow many computers/CPUs to communicate via the rendezvous.


    "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 languages with similar code... semaphores, mutexes, events/conditionals, etc. but perhaps with a little more explicitness by the programmer.

    The first thing to remember is that no (higher level) language gives magical properties to a computer. If one language can do it, I can guarantee that at least one other can tap into it as well... Machine Language being the easiest example because even magical Ada gets compiled into ML or interpreted by ML at one point or another... if it can be done, it can be done in ML. C is just a step up from Assembly/ML (we used to joke that C was portable Assembly).

    You *might* can say that Ada was the first to actually have it as a construct defined in the language specification (I dunno the history of it, there may have been a language before Ada with it designed in) but even by Ada's heyday (mid- to late 80s), we could do it in C.
  18. Political Agenda by David+Greene · · 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 and libertarian talking points, ok?

    --

  19. Re:My problems with Ada by drxenos · · Score: 3, Interesting

    When is the last time you used Ada? 1) See: Ada.Strings.Unbounded 2) Ada leaves that choice up to the programmer (like C++) (see: pragma controlled). The next version of Ada will have an STL-like library, which will at least reduce the need for GC. 3) See: pragma Export(C, Foo, "foo") and Convention(C, Foo). Some compiles even support CPP in place of C, with automatic translation between C++ classes and exceptions. 5) You should always know the type of data you are dealing with (unless you are writing generics, which still has some limits for safety). 6) Ada's dispatching is based on the actual call being made. No need to mark members has virtual (C++) or to just make them all virtual (Java).

    --


    Anonymous Cowards suck.
  20. Reminds me of structured programming by shoor · · Score: 2, Interesting

    Back in the 70s there was a big fuss being made about something called "Structured Programming". A lot of people took notice when a big project, an indexing system for the New York Times was finished with remarkably few errors. Yet, that success did not seem to become the norm. (It's mentioned briefly in the wikipedia article on 'structured programming').

    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 hired to update obscure code in this 'self-documenting' language to handle dates with the year 2000 in them back at the end of the 90s.

    Basically, I think what it boils down to is discipline and talent in the development process. That is far more important than the choice of language. To some extent, I would buy the idea that the fewer lines of code required to write out a program, the better, because there are fewer chances of errors. But even that can be taken to extremes in a language like APL, or if the lines refer back through obscure nests of classes. By few lines of code I mean a few readable lines of code that a programmer can look at and actually know what is supposed to be happening and how.

    --
    In theory, theory and practice are the same; in practice they're different. (Yogi Berra & A. Einstein)
  21. inevitably by fred+fleenblat · · Score: 2, Funny

    I think the main issue that people are afraid to talk about here is that Ada will soon be replaced by a language based entirely on cat macros.

  22. Re:My problems with Ada by HiThere · · Score: 2, Interesting

    I didn't say there weren't solutions to those problems. Merely that the problems exist.

    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 mean try doing it yourself...this is about the general problem of C++ libraries.) And Ada doesn't even handle interfacing with C well (which isn't unusual, it's a hard problem...macros and other #define's).

    5) I can tell what kind of data I'm dealing with at run time, but dealing with this in Ada is unpleasant. Think of a container of objects that resides on a disk. If you read something in, it will tell you what kind of thing you've retrieved, but if you need to have that type hard-coded into your program, you've got to run through considerable contortions to deal with this. It's hard to handle this well and still be efficient at run time, but to me it's a continual irritation if I'm trying to use Ada.

    6) I think I understand what you're saying, but I guess I was too vague. Ada's model of objects *IS* a data structure. What you inherit is that data structure, which you can extend. Operations on the structure aren't a part of the "object". Operations, however, are typed to deal with particular groupings of objects. (I'm not clear on precisely when you need to say type'class, but I haven't used Ada much because of the other irritations.)

    Yes, I'm picky. I acknowledge that. Currently I'm using Python while I wait for D to develop into a suitable language. (Insufficient libraries is the main problem. Again there's problems connecting to libraries written in C or C++ . Nobody seems to handle that well. Macros and other preprocessor abominations appear to be an intractable problem. If D doesn't shape up in time I'll probably either switch to Boost C++ + Boost Python, or Python + Pyrex + C. Neither option thrills me, but both look possible. So does D + C + Python...though that one looks fragile. And maybe D + Pyrex + Python. But anything involving Python is going to presume that a compatible interpreter is installed on every system that hosts it.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  23. C A R Hoare on Ada by jchandra · · Score: 2, Interesting
    Hoare had written an interesting paper on Ada titled The emperors old clothes on Ada.

    He writes

    And so, the best of my advice to the originators and designers of ADA has been ignored. In this last
    resort, I appeal to you, representatives of the programming profession in the United States, and citizens
    concerned with the welfare and safety of your own country and of mankind: Do not allow this language
    in its present state to be used in applications where reliability is critical, i.e., nuclear power stations,
    cruise missiles, early warning systems, anti-ballistic missile defense systems. The next rocket to go
    astray as a result of a programming language error may not be an exploratory space rocket on a harmless
    trip to Venus: It may be a nuclear warhead exploding over one of our own cities.
    --
    god n. : the Supreme Being, indistinguishable from a good random number generator.
    1. Re:C A R Hoare on Ada by EdF · · Score: 2, Informative

      Hoare later recanted this bit, and strongly recommended the language as a foreward to one of its textbooks.

  24. The reason for ERAM success by oecocsystems.com · · Score: 2, Informative

    I am Oliver E Cole, the president of OC Systems (oec@ocsystems.com). The Ada compiler and associated tools used by ERAM is PowerAda, done by OC Systems. We have worked closely over a number of years with the ERAM project and its predecessors. Yup, they are using Ada because of all its robustness and features, but they also have a good mature software development process. Part of a muture process is choosing the right language and tools for the job. Sometimes php is the right choice, sometimes C, C++ and sometimes Ada. For a project like Air Traffic Control (very long lived, high quality) a strong argument can be made for Ada. Ada catches a lot of errors "automatically" and is designed for big systems.

  25. "Why Ada succeeds where C fails" by airdrummer · · Score: 2, Interesting

    i worked in ada, late '80s, early '90s, alsn, wrote a troff clone;-) i had just learned c & chafed @ the strictness (i don't need no steenkin compile-time checks;-) but i grew to appreciate it...definitely leads to better code.

    http://www.adaic.org/atwork/trains.html gives an interesting case history of the superiority of ada for teaching real-time programming:-)

    " The only difference between the years in which teams succeeded in implementing their projects and those in which no team succeeded was the implementation language."

  26. Re:It is not just the language by smellotron · · Score: 2, Interesting

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

    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 checked_integer;

    struct distance_tag { };
    struct time_tag { };
    struct speed_tag { };

    typedef checked_integer<1, 100, distance_tag> distance_t;
    typedef checked_integer<1, 10, time_tag> time_t; // whoops, colliding with C runtime, ignore that
    typedef checked_integer<1, 10, speed_tag> speed_t;

    // add some other function or template specification that distance / time = speed

    meters_t distance = 30;
    seconds_t time = 5;
    speed_t speed = distance / time; // compiles
    meters_t whoops = distance / time; // doesn't compile

    meters_t distance = 100000; // throws exception when instantiated with out-of-range value