Is knowing a computer language vital for someone pursuing Theoretical Physics?

AI Thread Summary
The discussion centers on the importance of learning programming, specifically C++, for a physics major. Although the major does not require programming, many participants emphasize its necessity for simulation, modeling, and data analysis in both theoretical and experimental physics. They argue that programming skills are increasingly essential in scientific research, with many physicists using languages like MATLAB, R, and Python. The consensus is that taking an introductory programming course, such as "Intro to Program Concepts in C++," is beneficial and manageable alongside summer studies in physics and mathematics. Participants recommend focusing on programming fundamentals rather than just the specific language and suggest starting with independent studies and utilizing available resources. Textbook recommendations are encouraged to aid in self-learning. Overall, the discussion strongly advocates for acquiring programming skills as a valuable asset in a physics career.
JJHK
Messages
24
Reaction score
1
Hello! I am currently a sophomore in undergrad, majoring in Physics. I haven't been exposed to any computer languages, such as C++, and I am wondering if it necessary for me to know it? My major's requirement doesn't require it, but many of my physicist friends seem to recommend me take it. So I'm thinking about taking an intro to C++ class in the summer, but I would much rather use my summer to strengthen my foundations in Physics and Mathematics. So what do you guys think? Do you think that in the long run it will be better for me to be exposed to C++ in the summer or study rigorously to strengthen my foundations? (I was planning on going over Kleppner's Mechanics, Purcell's EM, and Spivak's Calculus over the Summer)
 
Physics news on Phys.org
Hey JJHK and welcome to the forums.

If you need to do any kind of simulation or modelling work then no matter what field or specialization is involved, programming will be important.

Given how important simulation and modelling is in both the theoretical and experimental areas of science, engineering, and pretty much anything, I would recommend it for that reason alone.

Because things nowadays involve a lot of data, whether its simulated, collected from somewhere (like an experimental apparatus connected to a computer through say a USB) or wherever, people need to program the computers to analyze and spit out results and since no one situation is the same, you will probably have to do some programming at some point no matter how minor or major that may be.
 
I know a lot of physics researchers work with R and MATLAB, but I only know that because a few friends of mine work in Physics and Astronomy labs. I can't speak from personal experience or anything as to Theoretical Physics, but it never hurts to learn a good computer language. I personally work in a mechanical engineering lab and literally EVERYONE uses MATLAB, so I couldn't imagine not having to do any programming or simulations in any sort of physics-based research.
 
There is still abstract theoretical work done with paper and pencil, but sooner or later you will need some kind of programming skills, be it Mathematica, Fortran, Matlab, R, C++, python or whatever. The details will depend on the field you work in.

If you take a class seslect one that focusses on programming, not the language. Languages are easy to pick up once you understand the fundamentals.
 
You probably won't drop dead, no. But personally, I think it's wise to know some programming no matter which science or engineering major you do - the chances of having to use it are simply quite high.
 
Definitely take it. I'm taking a computational physics/numerical methods (scilab) course and I wish I would've had a serious exposure to programming earlier. I can't really imagine any theoretical work today that doesn't require programming in some form or another, not to mention its easily the most transferable skill you pick up in a physics degree.
 
To echo what has already been said: yes, learn to program. I would be surprised if you could find a physicist who has never written or modified a program at some point in their career. Many physicists program extensively.

But, I don't think it's as much of a scheduling conflict as you say. If you are a sophomore physics major, an intro programming class should be no problem. I doubt the class will take up your whole summer, so you will have plenty of time to study other things at the same time.
 
Thanks guys, everyone seems to agree that I should take it. "M Quack" said I should focus on programming, not the language. The class that I'm thinking about is "Intro to Program Concepts in C++", would that be suitable? I don't see a specific programming course @ my school.

I think in order to prepare myself, I'm going to start with independent studies on programming. This forum's subsection on programming seems to have a lot of helpful material.

Are there any specific textbooks that you guys recommend? Thanks again for the help!
 
you need a language to program. The title indicates that programming is the focus and C++ a means to that end, that is good. To quote Kernighan and Ritchie, "the only way to learn a programming language is to write programs in it.", so get yourself a cheap Linux box and some introductory book (there is a current thread with recommendations) and get going.
 

Similar threads

Replies
7
Views
3K
Replies
4
Views
202
Replies
12
Views
1K
Replies
6
Views
3K
Replies
4
Views
4K
Back
Top