Which programming language should I learn?

Click For Summary

Discussion Overview

The discussion centers around which programming language a mechanical engineering student should learn, particularly in the context of preparing for a PhD and supporting research. Participants explore various programming languages, their applications in engineering, and the relevance of each language to scientific computing.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests that Fortran is an engineering language, but notes that their school requires a C++ programming class for graduation.
  • Another participant recommends continuing with C/C++, asserting that mastering it will facilitate learning other languages quickly.
  • Some participants advocate for learning Java or C#, citing their object-oriented nature and safety compared to C++, especially for general programming tasks.
  • It is mentioned that C/C++ has the advantage of compatibility with many libraries, which are often written in C.
  • Python is proposed as a popular alternative due to its scientific library support and ease of linking with C libraries.
  • One participant argues that C++ is essential for engineering and scientific work, emphasizing that most current development relies on C and C++. They suggest learning C++ thoroughly before moving on to a scripting language like Python.
  • A participant shares their experience with Visual Basic for Applications (VBA), noting its utility for specific applications like modeling heat transfer, while still recommending C++ as a foundational language.

Areas of Agreement / Disagreement

Participants express differing opinions on the best programming language to learn, with some advocating for C/C++ as essential for engineering, while others suggest Java or C# as safer alternatives. The discussion remains unresolved with multiple competing views on the topic.

Contextual Notes

Participants highlight various assumptions about the applicability of different programming languages to engineering tasks, and the discussion reflects a range of experiences and preferences without reaching a consensus.

Dauden
Messages
42
Reaction score
0
I'm going for a major in mechanical engineering and am planning on getting a PhD. I was planning on having a minor in Computer Science just to help with research and general programming.

With all of the programming languages out there, it gets kind of overwhelming when trying to narrow it down to one language. I've seen that Fortran is described as an engineering language but my school requires you to take a programming class in C++ to graduate with an Associates in engineering (I already took that class).

Any insight would be appreciated.
 
Technology news on Phys.org
Keep studying C/C++. Once you master it you can literally pick up any new language in a weekend.
 
I would learn either Java or C# which are object oriented, perform well for calculations, and are a heck of a lot safer to use for the average programmer than C++. In the "real world", one probably only needs C++ if doing systems programming (on a computer operating system) or extreme multimedia as in computer games. Otherwise, for physics type calculations, you'll be a lot happier in the long run equipping yourself with a language that does automatic garbage collections and has well-behaved objects without the hazards of multiple inheritance and broken pointers.
 
The advantage of C/C++ is that most libraries are written in C or can easily link to it.
The other popular choice is python, it has a lot of scientific library support and links easily with c libs
 
What happened to he other posts in this thread (I made one)
 
harborsparrow said:
I would learn either Java or C# which are object oriented, perform well for calculations, and are a heck of a lot safer to use for the average programmer than C++.
You wouldn't if you were studying engineering. C++ is essential for the sciences, everything else is secondary. Just about all current work is developed in C and C++. Unless you're up for the job of rewriting decades of library development in C#, you don't have much choice. The situation may change, but if it does it will change very slowly.

My suggestion would be learn C++ and learn it well. Then learn a scripting language such as Python, which will be quick and easy if you know C++. This way you have the essential foundation for engineering work, and you have the high level language which comes in handy everywhere else (prototyping design ideas, etc).
 
I first learned C++ during my first semester in college. I have now been playing around with visual basic(for applications) or VBA its pretty nice. I know its not as powerfull as c++, but if you have excel you can do some cool stuff. I had a professor who swears by excel and VBA. He is mainly a heat transfer guy and has used excel/VBA to model 3-D heat tranfer amoung other things. I have been working on developing an application to numerically solve n-body gravitational problems. The language is different that c++ but certain things feel pretty similar. Anyway I would still take c++ it makes it easier to learn a new language.
 

Similar threads

  • · Replies 397 ·
14
Replies
397
Views
21K
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
12K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K