Programming language for Mech Engineering (for profession and as hobby)

Click For Summary
SUMMARY

The discussion centers on the selection of a programming language suitable for Mechanical Engineering students, with a focus on C++, Ada, and Python. Python is recommended for its ease of learning, extensive libraries, and versatility in scientific applications. C++ is acknowledged for its performance in simulations and large applications, while Ada is noted for its use in embedded systems but lacks widespread adoption. The consensus suggests starting with Python and later integrating C++ for performance-critical tasks.

PREREQUISITES
  • Basic understanding of programming concepts
  • Familiarity with MATLAB for scientific computing
  • Knowledge of embedded systems principles
  • Interest in simulation and electronics programming
NEXT STEPS
  • Learn Python programming and explore libraries like NumPy and Matplotlib for scientific applications
  • Study C++ for performance optimization in computational tasks
  • Investigate Ada programming for embedded systems and real-time applications
  • Explore simulation tools and frameworks relevant to Mechanical Engineering
USEFUL FOR

Mechanical Engineering students, hobbyist programmers, and professionals interested in enhancing their programming skills for simulations and embedded systems.

blynxGT
Messages
8
Reaction score
0
Hello,

I am a second year Mech Engineering student. I was co-oping this past spring and was introduced to programming/embedded systems in real life situations. Among this, simulation caught my attention as well. Have decided that it would be great to learn a language so that I can use it for both as a hobby and for augmenting my work skills. I know that the point of any language is to learn the concept and art of programming but I have various interests so I want to know a good programming language that can serve this purpose. I have narrowed it down to three choices personally: C++, Ada, and Python. I've already had a course in MATLAB but wanted to add something else. Well here is my reasoning behind the three:

Python: good easy language to "learn". multiple modules for both scientific and even some plug in graphics engines. Seems to have the best of both worlds since it seems to be well respected both as a hobbyist language and in the scientific community

Ada: I love aerospace and to me Ada seems like a really neat language to learn (not just because of aerospace). It can and is used for embedded systems but has OO capability and similarities to C++. I have seen a couple of 3D engines such a globe 3D written in Ada. It has applications for real-time, embedded and even simulation. Don't know how good it is as a number cruncher though. Also it seems to have not gained any momentum since it was introduced. Mainly used for ATC control, communications, and transportation safety systems.

C++: general all around programming language. Used for simulations and gaming as well as large software apps that Ada is used for. More widely accepted than Ada however. Combines low level memory access with higher level functions. Seems like a good choice but have heard mixed feeling about it in the engineering and science community (i.e. too bloated, design by committee, steep learning curve).

Honestly I have been doing some searching and talking to fellow colleagues at school but I still have yet to decide. I've used Python (well Vpython to be specific) in physics and python seemed cool enough to me. I would really like some input from people at the physics forum. Honestly i think learning how to do a bit of electronics and programming for electronics as well as simulation could go a long way in the future with my Mech Eng degree.
 
Technology news on Phys.org
My recommendation is the following:

(1) Adopt Python and use it for any programming tasks you have. It is easy to learn and quick to debug, and has a large library of already-written modules.

(2) At some point you will write some code for which Python is just too slow. At this point, add C++ to your skill set. What I find is that it is not necessary to translate my entire Python code to C++, I just identify the most computation intensive segments and translate these to C++ functions, which I call from Python.

This strategy has served me well for a wide range of computing applications.
 
Thank you so much for the input.
 

Similar threads

Replies
86
Views
2K
  • · Replies 59 ·
2
Replies
59
Views
8K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
11K
  • · Replies 102 ·
4
Replies
102
Views
2K
  • · Replies 397 ·
14
Replies
397
Views
20K
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K