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

AI Thread Summary
A second-year Mechanical Engineering student is exploring programming languages to enhance both hobbyist skills and professional capabilities, particularly in programming and embedded systems. The student has narrowed their options to Python, Ada, and C++. Python is favored for its ease of learning, extensive libraries, and acceptance in both hobbyist and scientific communities. Ada is appealing due to its applications in aerospace and embedded systems, though it lacks widespread popularity and has limited use cases. C++ is recognized for its versatility in simulations and gaming, but it comes with a steeper learning curve and mixed reviews regarding its complexity. The student seeks advice on which language to prioritize, considering the potential for future applications in electronics and simulation within their Mechanical Engineering degree. A recommendation is made to start with Python for its simplicity and then transition to C++ for performance-critical tasks, suggesting a hybrid approach that leverages both languages effectively.
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top