What Coding Language Should I learn?

  • Thread starter Thread starter Jow
  • Start date Start date
  • Tags Tags
    Coding Language
AI Thread Summary
Learning to code is increasingly essential for physicists, as programming skills facilitate data analysis, simulation, and numerical problem-solving. Popular programming languages for physicists include Python, C++, FORTRAN, Matlab, and Java, with the choice often depending on personal interest, available resources, and specific academic requirements. Understanding programming allows physicists to create custom simulations and modify existing code to suit their research needs. Many physics problems require numerical techniques, and coding helps in exploring how changes in variables affect outcomes. While some areas of physics may not require extensive coding, having programming skills enhances one's ability to analyze experimental data and engage in computational modeling. Overall, coding is a valuable asset in the field of physics, providing insights and flexibility in research.
Jow
Messages
69
Reaction score
0
Unlike some of my friends my knowledge of computing is very limited. I want to become a physicist, but I think it would be beneficial for me to learn how to code. However, after some research I am not sure what coding language to learn. What is the most useful / practical code that physicists use?

(I don't know if this will make a difference in what type of code I should learn but the computer I use is a mac.)
 
Physics news on Phys.org
thank you
 
C#, FORTRAN, Python, C++, Matlab, Java seem like good choices
 
Whatever you have easy access to... whatever seems like most fun... if your college is running a Java course, do that. If your favourite prof wants you to hack away at his Basic code, learn that...
 
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?
 
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

There are a lot of problems that require numerical techniques to solve. Programming such problems can give insights to how the system behaves; "how does the result change if I change this variable?" You probably won't be able to find code that helps you with a current one, so you may need to make your own. Also, you may need to modify existing code.
 
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

Anybody who has data from any experiment, ever, has to write a data analysis pipeline to turn that raw data into "scientific results"

EDIT: And most theorists who do simulations write their own simulation code to model the physical system of interest to them. They don't just use other people's code. Or if they do (because it is a generic code for radiative transfer or fluid dynamics or something), they have to modify it to suit their specific application.

I don't know what to do with your question, because almost everyone in the physical sciences needs to be competent at programming for the core aspects of their work.
 
just get a physics leaning computer simulation book and work out the examples.
This one has a bunch of problems and examples.

An Introduction to Computer Simulation Methods: Applications to Physical Systems
 
  • #10
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

Simulation programs may not simulate every situation, and if they do they might be too slow. I think the OP should let his particular physics environment drive his career. It maybe he can do experimental physics or theory that doesn't need any programming at all. If you do research under a professor who doesn't require any coding, then you don't need to do any coding (hey tautologies can be useful!) If the research post you get actually appears to need some coding then you can learn on the job.

Then again if you fancy doing some coding, why not... but only if you fancy it... it might be more relaxing to do modern dance between physics classes...
 
  • #11
These days its hard to do anything in physics without doing some programming/scripting. Many programs that take or analyze data have some programming/scripting component.
 
  • #12
Mmm_Pasta said:
There are a lot of problems that require numerical techniques to solve. Programming such problems can give insights to how the system behaves; "how does the result change if I change this variable?" You probably won't be able to find code that helps you with a current one, so you may need to make your own. Also, you may need to modify existing code.

That's just sensitivity analysis. That's not specific to programming.
 

Similar threads

Replies
4
Views
2K
Replies
11
Views
5K
Replies
6
Views
968
Replies
12
Views
2K
Replies
71
Views
719
Replies
9
Views
952
Replies
1
Views
2K
Back
Top