Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm starting to learn C++ but there is another language that recently caught my attention, and that is ADA programming language, a real-time language used in NASA and military computers, just a question to anyone who knows both C++ and ADA, is ADA more difficult to learn, is it really hard? because i assume from it's great application that it's harder to learn

and what books you recommend to read for ADA?
Posted
Comments
PIEBALDconsult 21-Jul-15 16:10pm    
It's not inherently harder (maybe easier as it's fairly similar to Pascal), but you won't have as many resources to help you along. And you won't find as many job offerings.
I wasn't aware that "NASA and military computers" still used it.
Sergey Alexandrovich Kryukov 21-Jul-15 16:23pm    
Nice to meet another person familiar with Ada. Maybe my answer will look more or less interesting to you.

As to job offering, I saw some some time ago, but they usually require security clearance; the situation is similar to the one with some other rarely used technologies: it's hard to find a job, but it's also hard to find an engineer, so if they find you, they many value you. It depends... Really, the language has majorly went out of circulation, but, in a way, it is not too old at all: the current ISO/IEC standard is dated by 2012 (!)

—SA
PIEBALDconsult 21-Jul-15 16:40pm    
I never used it. My father got a book (by Narain Gehani) just about the time I was getting into programming and had learned BASIC and Pascal. When I picked a college, I made sure the course listing included Ada, but (alas) it wasn't offered while I was there -- and we had to petition the college to include C!
Anyway, the Ada book is still on my shelf, and I think my current OpenVMS license and media includes an Ada compiler, so I could try if I really want to.
But C# is paying the bills.
Sergey Alexandrovich Kryukov 21-Jul-15 17:20pm    
Sure. Almost the same with be, but we had an informal group of people studying Ada and using it. I probably used it the most, in some of my research work. Even now, if you look at my first article on enumeration, you will see that it is essentially the "fix" of .NET on the base of Ada requirements; I have some non-Ada works like that, and they worked well for me. This is what I mean by saying that learning Ada is good for getting a productive view of programming.
—SA
PIEBALDconsult 21-Jul-15 17:33pm    
"getting a productive view of programming"
Learning many languages will do that, particularly "dead" ones, even if you never use them.

I really appreciated the books by Narain Gehani for depth, thorough understanding of software development as the type of human creative activity, brilliant thoughts and convincing motivations of all the techniques and features described. Also, his books are not just about the language; they provide excellent pathways to some important parts of general computer science, especially parallelism.

I cannot give you exact references, please find out yourself. The books can easily be found on the Web, but I'm not sure if you can find anything in electronic form.

What is harder to learn is not a valid question. I would say, Ada is harder then C++ and C++ is harder then Ada. Hardness in learning is not really the valid or essential criterion. Often, harder learning means easier work. From my Ada background, I made a conclusion that C++ is wrong thing, but I cannot say that Ada is perfect. Still, I'm sorry that it kind of went out of circulation. Even if you won't be able to use Ada, it can help you to develop very productive views on general computing. Ada ideas and approaches greatly influenced Object Pascal and hence its descendant C#, despite its C++-like syntax, which should not fool you into thinking that C# is derived from C++; it got a lot more from Ada than from C++.

—SA
 
Share this answer
 
v3
Comments
PIEBALDconsult 21-Jul-15 16:46pm    
"C++ is wrong thing"
I concur. But it's popular.
While "better" languages (e.g. D) get little use.
Sergey Alexandrovich Kryukov 21-Jul-15 17:14pm    
This is what I think; at least I considered it in many aspects and made my own conclusion: to avoid it.
As to the popular, I once derived my own "rule of the market": typically, the most popular product is the worst among the acceptable ones. Another one is: most successful competitor is typically #3 in product quality, and all other competitors are well behind #1-#3, take much less market share than any of the first three. Unfortunately, nova days (last 5-10 years) I observe breaking of this second rule: the situation tends to shift to "#1 only", which I think is quite sad.
—SA
ahmed91za 21-Jul-15 19:21pm    
will i just graduated from computer technology engineering, you answers where interested at best, but i would like to make a response Sergey Alexandrovich, C++ is Wrong? but isn't it one of the fastest object-oriented programming languages, it's the predominate programming language used for games because it's the closest to the processor, plus the wide spectrum of it application from regular user to Space mission application like shotter lunch and handling the computer, not to mention it's the predominant language for Linux and UNIX.
Sergey Alexandrovich Kryukov 21-Jul-15 19:47pm    
No it is not. It's that people invested more in compilers. And it's exactly as "close to the processor" as a good number of other question; closeness to the processor is just the false (totally, totally false) argument often used by inexperienced C++ followers. Ada is one of the languages which allows to be exactly as close to CPU, still with better abstraction (which is a matter of opinions). Wrong C++ design is a big topic, there is a lot of literature on the topic. We just cannot cover that. The least I can do is to advise: use critical thinking, don't buy the hype, don't always go with the crowd, think with your own brain. And it's up to you how you use my advice. See also: Argumentum ad populum. You are the one who is trying to use argumentum ad populum, but this is the false way of giving arguments.

Please understand: you asked for the opinion, and I answered. At this moment, it's not about having the arguments on the topic. By the way, I'm not saying one can afford not knowing C++. Probably every developer should know it; it's not very much of an option. But your question was not about it.

—SA
ahmed91za 22-Jul-15 8:38am    
so you are saying that C++ is a terrible language? if so and if i have to go to ADA, but the problem is there is no SDK that is as strung as Visual Studio, that support ADA, most of the IDKs that has ADA compiler are very small and has extremely small scale, another problem is the wide spectrum of applications, for example the Arduino uno microcontroller, it only support C, another problem is Gaming development, no game engine support ADA
ADA is only available in military institutions and NASA spacecraft applications, there is no wide use let along no Advanced IDK or SDK for it as far as i'm concern so even if ADA is faster and can do everything C++ can and faster sense it's a real-time language, there is still the problem of compatibility
You will learn several computer languages in your career.
No matter what the syntax is, you should try to get the concepts the computer languages cover.

The beaten path would probably be to learn some kind of procedural concepts.
Then go on to object based/object oriented concepts.
Maybe some meta programming concepts.

Alternatively, functional programming concepts might open up a fully new way of thinking.

Depending on the level of abstraction you are most enthusiastic for, you might even start on assembly language level and getting the concepts of a CPU and System-On-A-Chip of micro controllers.

You will have to deal with (non)determinisms, with concurrent execution (with sequencing and synchronization concepts), with resource management (e.g. memory management: fully user controlled versus garbage collected), etc.

I suggest to learn a language where you get most support in the community today and where a lot of material is available. ADA might (unfortunately) not be one of them, though.

In the end, the hard thing about learning computer languages (and their concepts) is to constantly exercise the topic. To become proficient, you might need to invest some 10000 hours exposure to the material. With this exposure, you are ready to mix and match variants and produce high quality, maintainable and concise code.

Beside the language concepts, you most likely need to learn how to make code testable and to get acquainted with testing concepts (and find ways to implement these in the given language).

So, take any language you like, go on with it and do your first steps. Always look out for the concepts behind and do not get distracted by the details of the syntax and the grammar of the language. Remember: it won't be the last language you learn.

Cheers
Andi
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Jul-15 19:35pm    
Not sure you are well familiar with Ada, but there are some good points. I would note on some, though.

Well, going with the crowd, despite of apparent benefits of having the most support in the community, is not always the best and not the only way. Perhaps you remember that years ago support from community was orders of magnitude lower than these days, and yet many great people grew up out of this. Importantly, learning esoteric languages (with Ada being by far not the most esoteric, and it influenced, say C# greatly) helps to overcome tunnel vision, to expand the views and promote open mind hopefully backed with critical thinking.

In your "Alternatively, functional programming..." may greatly confuse some, even if you did not mean it. The fact is: functional programming does not have to be alternative to imperative or declarative programming, to OOP, to strict typing. Rather, it can complement either of those concepts. This is just another dimension. So, it's better to be careful with "alternative".

Also, I'm sure you understand that learning CPU level and programming on the level of registers, ports and memory segments/descriptors/pages is not associated with CPU and System-On-A-Chip of micro controllers. But, again, it's important not to create such illusions. Modern "big" OS greatly protect low level from application-level programming, but this is not an excuse for not learning low-level programming of CPUs like Intel's. Just the opposite: it was always considered a must for at least really professional level; I hope it is still considered as a must, if we set aside so much of fake "programming" education popular these days. Moreover, understanding of such things is important for real understanding of high-level programming, for keeping in mind where it all comes from.

Finally, to constantly exercise is a great point, but it's good not to forget about learning what other experienced people do, and it means learning good level of theory. I always welcome re-inventing the wheel, but each invented wheel should better be compared with collective experience of wheel achievements and wheel theory, otherwise any of us can easily lose the connection with reality.

—SA
Andreas Gieriet 22-Jul-15 6:13am    
Hello Sergey,
I got in touch with ADA after university while applying for my first job. Later I worked on parsing and generating VHDL (which is kind of a derivate of ADA as a hardware description language, e.g. for ASIC development). Before the WWW days, there was libraries with real books and later I gained access to news groups where I could exchange thoughts which was very valuable for me.

I wished more programmers know the basics of how hardware works (to a certain degree). But we have no evidence if the OP does have that background. Should he start now there before going to ADA or C++ or any other language...?

Now to the OP question: C++ is not good as a first language, I'd say. The language carries several legacy constructs that might easily overwhelm a beginner. ADA might be from a conceptual point of view a good language for a beginner.

If a language is hard to learn is a matter of what background you have, i.e. what concepts on computer language you know already. Than you can ask "how do I employ concept X in language Y".

Cheers
Andi
Sergey Alexandrovich Kryukov 22-Jul-15 11:00am    
Good points, Andi.
As to your note on "the basics of how hardware works" and "before": in real life, there is no "before" and "after". Learning happens iteratively and in parallel. It is very typical that people start from the black box and make more vision on more or less abstract or realistic model on what's inside; "to certain extent" is the key here. And not getting to hardware at all would mean not having sense of reality, I think. So, combining high and low level during learning is important. By the way, this is why I value so much such thing as inline assembly (such as in C++ and Object Pascal).
—SA
Andreas Gieriet 22-Jul-15 16:32pm    
I wonder from a didactical point of view if it is better for a complete beginner in programming to start top-down or bottom-up?

E.g. top-down: we have a piece of HW (e.g. the PC) and we need to get it doing what we want. Computer programming languages were invented to tell the PC what to do, several approaches suggest how to achieve the goals in a more or less effective way. None of the programming languages nor of the approaches are the only right ones. A program (written in some programming language) is the result of translating the programming language's statements into some unified form that controls the behavior of the HW (--> language constructs, concepts, paradigms, ..., tools, ..., object code, OS, processes, HW components, CPU, memory, aux- and io-devices, BIOS, bootloader, ...)

Or bottom-up: we have a piece of HW (e.g. the PC) and we need to get it doing what we want. The HW consists of several pieces that work together: CPU, memory, aux- and io-devices. These pieces are connected by some wires called the bus. The CPU (Central Processing Unit) controls the whole system by toggling some controlling bits (conveniently organized in registers). There are varying approaches to organize the several pieces of HW, each has its benefits. One is the bus architecture (e.g. Von-Neuman, Harward, ...), another is the machinery the CPU executes programs. Further design decisions involve performance consideration (execution speed: caching, etc.) and power consumption (e.g. turn on/off parts that are only part time in use, etc.). The CPU executes a program by fetching bytes from some memory location and interpret these bytes one after the other according to the CPU's intrinsic instruction set (the commands it understands to read and write from/to registers and memory, perform some logic and arithmetic operations, get instruction bytes from the next or any other memory location (jump (un)conditionally)). At power-up, the CPU fetches the first instructions from a predefined location. Etc. (--> BIOS, bootloader, OS, processes, ..., from programming language to object code, ..., programming concepts, programming languages, ...)

Cheers
Andi
Sergey Alexandrovich Kryukov 22-Jul-15 18:06pm    
Neither! Both top-down and bottom-up concepts are useful, but trying to apply them in one or another pure form is counter-productive in vast majority of situations. In reasonable approach, this is always a combination. (Only during latest years I started to realize how many pseudo-science and false conceptions have been created under the label "software development method". Many ideas are interesting and useful, but overall it boiled down to appearance of followers trying to apply the conceptions literally, with disastrous results. All successful teams I ever heard of are trying to use their own brains first.)

I think you should feel this controversy trying to picture each approach in your two paragraphs. In reasonable approach, there are iterations. Think at how good schools teach children. Eventually, they are told about earth, water and clouds, and textbooks mention that cold air lowers down and hot air goes up. Then they learn some mathematics, biology, language and literature, and eventually the gravitation laws and Newton laws are presented to them mathematically, but perhaps not too formally. Then they learn some more mathematics, biology, language and literature, and more, and are getting ready for more formal understanding of the classical mechanics. And only then they are given the idea of Special Theory of Relativity, not very formal, and General Theory of Relativity and theory of gravitation, in a very vague way, but now they know that some of them can go and learn it in depth in the university, with all the mathematical formalism. And those who proceed with that can learn hydro- and aerodynamics, theory of turbulence, to finally get to the conclusion that they don't really understand how the clouds and winds move, something which probably seemed to very clear in their early age. :-)

Great American popular writer Martin Gardner, in his popular book "Relativity for the millions" once explained to me one great and simple thing: when a child asks you "why all those things fall down on the floor after I toss them up", he doesn't expect to get into gravitational fields, but he needs your assurance: "this is the general law of nature". His conception was: this explanation would be not better and not worse than any deeper or more modern explanation, and it is as correct. I would add: if you answer properly, you may have a chance to keep the interest in this person.

The knowledge in general is highly self-referenced and should be taken in integrity. That's why only some purest and very limited fragments of knowledge can be mastered in pure top-down or bottom-up approaches — and application of these approaches to those very limited fragments could really be very useful.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900