Programming language for engineering

In summary: As e.g. Warren mentioned, there's a lot of software development going on in the aerospace industry that has nothing to do with craft control software and its extreme requirements.In summary, it seems that while Ada may have been used in the past for some aerospace programming, it is not as widely used now due to a limited market and the rise of other languages and tools such as MATLAB, C++, and domain-specific languages like UML. Additionally, not all aerospace engineering involves programming and those who do use programming languages may need to have a strong understanding of software engineering principles for reliable and efficient code.
  • #1
z-component
494
2
Hi,

I read somewhere that aerospace engineers use the language Ada to write instructions for aircraft/ spacecraft systems. I also read that the Boeing 777 was primarily programmed with Ada. This kind of makes me want to learn some Ada over the summer, just to get some exposure for later.

However, I know that C++ is used primarily at my university for engineering, and I already took an intro C++ class and did well in it, so I'm not sure if I should learn more C++ or begin Ada. Or, I could learn MATLAB more formally, since I was only exposed to it for about two weeks in class.

So I suppose learning MATLAB would be advantageous, too. What do you all think I should do for now?
 
Engineering news on Phys.org
  • #2
MATLAB is one of those languages you don't need to learn. ITs really simple unless you plan to make GUIs. The only thing about MATLAB you need to really know is the file layout(i think its 1 function per file) and vectorized operators, everything else you can search in Matlabs help or online.

U should really talk to a prof or someone in the industry. But perhaps learning C++ packages in the field or ADA would be useful(never having seen or used it myself).
 
  • #3
FORTRAN. You may laugh. FORTRAN is highly antiquated - according to many. However, it has continued to be updated up to FT95 -that is, the year 1995 - and is both simple to learn and use, and highly efficient for mathematical and engineering tasks. It can control ports rather easily, and has powerful, readily available libraries of mathematics to use out of the box.
 
  • #4
There are many kinds of engineering. If you're talking about electrical engineering, MATLAB and C++ are probably the most useful.

- Warren
 
  • #5
While Ada was designed specifically for military (and NASA) aircraft/ spacecraft flight software, the language never quite took off (excuse the pun). There are just not enough tools written around the language, not enough programmers who know the language, and not enough projects that use the language.

The latter is a big factor that militates against the language. Why should a person learn Ada as opposed to some a language with much greater marketability such as C++? Ada is a specialty language with limited marketability. If you decide to specialize in Ada, realize that you may well be restricting your career.

The first flight software was written in assembly language. Higher-order languages such as Ada and C++ replaced assembly decades ago. Even higher-order languages are beginning to replace Ada and C++. Industry is moving toward automatically generated flight software. Algorithm designers write their designs using domain-specific tools such as Matlab. Software design tools automatically translate those designs into C++ or Ada, automatically generate test scaffolding, and automatically generate documentation.
 
  • #6
I see the general consensus is to stick to C++ and MATLAB. I guess Ada is out.

D H said:
Even higher-order languages are beginning to replace Ada and C++.
Like what?
 
  • #7
z-component said:
Like what?

Domain-specific languages: Matlab/Simulink for guidance, navigation, and control algorithms, Unified Modeling Langauge with a host of automatic code generation tools for things like developing finite state machines, etc. This http://en.wikipedia.org/wiki/List_of_UML_tools" lists several UML tools.
 
Last edited by a moderator:
  • #8
z-component said:
Like what?

Python, C#, Visual Basic, etc.

- Warren
 
  • #9
This thread is about aerospace engineering, particularly "instructions for aircraft/ spacecraft systems", aka flight software. I don't know of any flight software written in Python, C#, or Visual Basic.
 
  • #10
D H said:
This thread is about aerospace engineering, particularly "instructions for aircraft/ spacecraft systems", aka flight software. I don't know of any flight software written in Python, C#, or Visual Basic.

The title of the thread said only "engineering." The OP notably did not specify that he wanted to learn a language specifically relevant to aerospace engineering; he only used Ada as an example. It seems you're the only one here making the assumption that the OP is interested only in flight-software specific tools. Perhaps you're right, but the original question was a little vague on this.

- Warren
 
  • #11
The title was vague, but the post was not. Re-read the original post.
 
  • #12
D H said:
The title was vague, but the post was not. Re-read the original post.

I read it several times. It contains an anecdote about Boeing using Ada, and a mention that this made him want to learn Ada. It then went on to discussing what languages his school uses for "engineering," in general. He never once said anything resembling "I want to learn a language that will be useful for aerospace design work."

Lose the attitude.

- Warren
 
  • #13
I'm sorry for any vagueness. Let me clarify: I am interested in knowing which programming languages play important roles in engineering, but any information on aerospace engineering in particular is greatly appreciated, too. I'm trying to get an idea on which languages I should expose myself to throughout my university career, and I'd like to use this summer to investigate some of those languages. Thanks for all of your information!
 
  • #14
"Engineering" is a very broad topic. The list of languages that play important roles in engineering is no smaller than the list of programming languages, period. Aerospace engineering alone is a very broad topic, as eerospace engineering is very much a multidisciplinary field.

Note well: Most aerospace engineers are not programmers. From my experience, the vast majority of aerospace engineers who are programmers are truly lousy programmers, second only to physicists and mathematicians (the worst algorithm I have ever seen is the completely unmaintainable/unverifiable/unreadable singular value decomposition algorithm.)

It is a good idea to learn something about software engineering so you won't be among the ranks of bad aerospace engineering programmers. Aerospace engineering deals with what must be extremely reliable (six nines) and yet highly computerized systems.
 
  • #15
D H said:
Aerospace engineering deals with what must be extremely reliable (six nines) and yet highly computerized systems.
Let's just cleanly separate things here.

Of course, extreme reliability must be a property of key in-flight software. I don't really know what this kind of software is typically written in, but indeed Ada was designed with special considerations for reliability. To achieve this,it puts higher than average constraints on how to do things on programmers, and hence belongs to the category of the so called "bondage and discipline" languages. These comments about Ada are just to point out that writing high-reliability (e.g. flight control) software is niche in any engineering field (even aerospace), and one is not likely to stumble upon it casualy.

The other, prevaling kind of programming that an engineer will typically encounter, is custom software used in various stages of design and development, written for personal use, or developed in-house. This kind of software has no particular need for reliability, as long as it can be coerced into producing verifiable results. Much more important here are rapid development and ease of maintenance. I like to think of this as new emerging engineering culture -- once there were sliding rules, then hand-held calculators, followed by clunky spreadsheets, and now programming at large should come. A motto: Never make a computation around which you cannot wrap a loop.

z-component said:
I'm trying to get an idea on which languages I should expose myself to throughout my university career, and I'd like to use this summer to investigate some of those languages.
I'd say this falls under the "programming at large" concept above, so to that end I would suggest three things:
  • Last-line, heavy-duty number cruncher: C/C++ and/or Fortran
  • A computer algebra system (CAS): Matlab
  • General purpose scripting language: Python

The number cruncher is there for computations which need raw speed. Also, they are still holding out as primary tools for writing bigger pieces of in-house software, and most existing computational codes are written using them. I would say that the choice between Fortran and C/C++ here depends on personal preference, and what you happen to be working on. For example, so far Fortran has bypassed me, but by a narrow margin. (In case you wonder, pure C is mostly a subset of C++, but one does need to know which subset and the practice of using it, so I lump it as C/C++ rather than just saying C++).

CAS are excellent for any own computations and actually any computation that does not require the raw speed. They may also be a less wieldy for planned developer cooperation (revision control, etc.) needed for larger codes, but don't take me on this. I relied on them heavily during my university days. Matlab seems to be the most ubiquotous of CAS, so I recommend that one.

General purpose scripting languages are the workflow glue. They can be used to link several computational tools together in an automated chain, and generaly help with any computer-related service tasks. Python is highly touted for its cleanliness (something not granted for scripting languages), has large base of usefull add-on modules, and among these some specifically numerically oriented.

Finally, the particular choices that I listed in these three categories, either are free or have free implementations (as in zero cost, source code), and exist for any imaginable and unimaginable computing platform. I hold these to be very important qualities.

--
Chusslove Illich (Часлав Илић)
 
  • #16
I must add one thing, to keep my conscience at peace.

Looking through engineering job skill requirements, frequently there pops up the mention of "Microsoft Office", which for computational component means Microsoft Excel. My own experience and some that of some friends, has confirmed that in places Excel is indeed very much used, to the point of being primary general computation tool. Hence, having good command of Excel, and especially of its scripting capabilities (VBA), will be an asset for some job positions.

There, I said it.

(I find Excel to be hideous for engineering computations -- actually, spreedsheets in general, Excel just being the prime example. I have tried to use it, but only after being exposed to the tools mentioned in my previous post, and it very much aggravated me.)

--
Chusslove Illich (Часлав Илић)
 
  • #17
What you need to learn is "how to program", not "the details of languages X Y and Z"

Looking back on my own career, I have probably learned a new language every couple of years. On the other hand, the basic principles haven't changed much. The one exception of object oriented design coming in part way through - though it turned out we were pretty much writing object-oriented systems in Fortran before then, it's just nobody had told us that's what we were doing!

If you know C++ or Java (I mean you know the language, not you can get by using a small subset of it) then converting to the next language that comes into fashion will be easy enough when you need to do it.

As for ADA, sure it was used for the embedded systems on the 777. But that represents a smal proportion of the software used to design the 777, and the rest wasn't written in ADA. To put it in perspective, I worked on one of the engine projects for the 777. I would estimate fewer than 1 in 100 of the engineers working on the whole project had anything to do with ADA.
 
  • #18
Great posts, caslav.ilic and AlephZero. You reiterated my main point against D H, which is that very little software in the entire field of engineering is actually high-reliability zero-defect flight software. It would not make sense to spend your time learning Ada, instead of something more general and more widely applicable like MATLAB or C++, unless you are 100% sure you will never pursue nor accept a job doing anything other than zero-defect flight software.

Of all the possible languages, C++ is the one that young engineers are pretty much expected to know, so you might as well start with that one. Companies will look very highly upon any prospective employee who has gone beyond C++. MATLAB and Fortran are tools that will find applications in almost any kind of engineering position, so I'd pursue them next. (And, in all honestly, MATLAB is greatly preferred in industry.) General purpose languages like Python or Perl can probably come last.

And, in the exceptionally unlikely event that you do end up doing Ada for a living, you can probably pick it up in a couple of weeks on the job.

- Warren
 
Last edited:
  • #19
chroot said:
Great posts, caslav.ilic and AlephZero. You reiterated my main point against D H, which is that very little software in the entire field of engineering is actually high-reliability zero-defect flight software. It would not make sense to spend your time learning Ada, instead of something more general and more widely applicable like MATLAB or C++, unless you are 100% sure you will never pursue nor accept a job doing anything other than zero-defect flight software.

Warren, why are you trying to argue with me? Your final point is right along the lines of what I said. Those who choose to specialize in Ada are significantly reducing their career options.

I also agree that very little software is of the high-reliability sort. It costs so very much to produce (less than one line of code per programmer per hour) that these techniques can only be used for very special purposes (i.e., the actual flight software, plus direct test scaffolding and flight data generation software, both of which are often treated as flight software.) Lower risk software can be written with two or three orders of magnitude greater productivity.

Because flight software is so expensive, organizations such as Boeing and Lockheed are moving away from programming directly in Ada (or whatever). The people who do the flight software development are more likely to be software engineers than aerospace engineers.

BTW, it appears Penn State does have a software engineering curriculum, but only at its Erie campus.
 
  • #20
Just echoing what was said before, you need to learn how to program. There is a specific art that one uses to approach and deal with problems as they appear in the programming world, regardless of language. Having said that, I would recommend a set of books that I keep very close - "The Art of Computer Programming" by Donald E. Knuth. There are currently three completed volumes (the fourth is mostly available and the fifth is in preparation). Have a look at the author's website. The box set has a rather hefty price tag, but its definitely the book(s) to have if you're serious about programming.
 

What is a programming language for engineering?

A programming language for engineering is a specialized computer language that is used to create, modify, and analyze engineering systems and processes. It is designed to be efficient and effective in solving complex engineering problems.

What are the benefits of using a programming language for engineering?

Using a programming language for engineering allows engineers to automate tasks, perform simulations, and analyze data more quickly and accurately. It also allows for better collaboration and communication among team members working on the same project.

Which programming language is commonly used in engineering?

There are several programming languages that are commonly used in engineering, including MATLAB, Python, C++, and Java. The specific language used may depend on the type of engineering and the specific needs of the project.

Do I need to have programming experience to use a programming language for engineering?

While having some programming experience can be helpful, it is not always necessary to use a programming language for engineering. Many of these languages have user-friendly interfaces and built-in functions that make them accessible to those without extensive programming knowledge.

Can a programming language for engineering be used in other industries?

Yes, many of the skills and techniques used in engineering can be applied to other industries, and therefore, programming languages for engineering can also be used in other fields such as data analysis, finance, and healthcare. However, the specific applications and functions may vary depending on the industry.

Similar threads

  • Programming and Computer Science
2
Replies
59
Views
7K
  • STEM Academic Advising
Replies
10
Views
2K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
8
Views
863
  • Programming and Computer Science
Replies
4
Views
595
  • Programming and Computer Science
Replies
16
Views
1K
  • General Engineering
Replies
10
Views
2K
  • STEM Academic Advising
Replies
4
Views
3K
Replies
65
Views
3K
  • STEM Academic Advising
Replies
12
Views
1K
Back
Top