Programming languages used by physicists?

In summary: If you are going to end up on Wall St/industry like most of us then learning some python/C++/Linux is going to be useful.The reason all of the material you found about Fortran being old is because Fortran is old. You will find that many languages in physics are used simply because they are used. IDL, for instance, is used for things like image processing - it's often said among the department I know that uses IDL extensively that the only reason they still use IDL is because no-one has bothered to write the processing routines in MATLAB.Additionally, Fortran is good at what it does, but I wouldn't recommend it as a first language. It's messy
  • #1
BigD
14
0
It is suggested that I learn a computation oriented programming language for an physics internship which I hope to apply for soon. I'm curious; what is the most commonly used programming language in the physics community?

I've heard that Fortran has been used extensively for a some time, but all of the material discussing Fortran that I've found online is quite old. Is there something else that has replaced it?
 
Physics news on Phys.org
  • #2
Depends what area and where in your career.

New grad student = Mathematica, Matlab, Excel

New post doc = c++

Senior lecturer = Fortran

Professor = the highest level programming language "grad student". It only has one statement which is "hey you - write me a program to do X"
 
  • #3
Thank you. I actually haven't finished 4-year yet, but I love reading things beyond my level.

P.S. Thanks for the quick laugh.
 
  • #4
There was almost a serious point - It depends on your life goal!

If you want to get on in physics you probably want to do as little programming as possible, there are better things to do than be in the lab at 4:00am looking for that intermittent memory bug that only happens when your model has been running for 12hours.
Ideally if you can use something like Mathematics, matlab, IDL - or even Excel.

If you are going to end up on Wall St/industry like most of us then learning some python/C++/Linux is going to be useful.
 
  • #5
The reason all of the material you found about Fortran being old is because Fortran is old. You will find that many languages in physics are used simply because they are used. IDL, for instance, is used for things like image processing - it's often said among the department I know that uses IDL extensively that the only reason they still use IDL is because no-one has bothered to write the processing routines in MATLAB.

Fortran is good at what it does, but I wouldn't recommend it as a first language. It's messy, takes a while to get used to and will feel utterly illogical for a while. Once you're comfortable with setting programming aside as being something a bit abstract in your mind, Fortran is OK - the reason it's still used is simply because the things it can do, it can do very fast.

I also, certainly, wouldn't say you're reading above your level by learning programming - you mean you haven't dealt with any of those mentioned above as part of your course material? I was introduced to MATLAB in year one and had projects in it every year, as well as a bunch of others.

I would recommend you start with MATLAB. It's used extensively in physics, applied mathematics and engineering and is a great language to begin with. It's fairly easy to pick up, and many of the skills you'll learn in MATLAB are transferrable to things like C++. The tutorial system and built-in help are also pretty reasonable.
 
  • #6
mgb_phys said:
Depends what area and where in your career.

New grad student = Mathematica, Matlab, Excel

New post doc = c++

Senior lecturer = Fortran

Professor = the highest level programming language "grad student". It only has one statement which is "hey you - write me a program to do X"

Are you speaking from a condensed matter standpoint? For those of us in high energy, even we grad students have to know C++.
 

1. What are the most commonly used programming languages in physics research?

In my experience, the most commonly used programming languages in physics research are Python, C++, and Fortran. These languages are all highly versatile and have a wide range of applications in various fields of physics.

2. Why are these programming languages preferred by physicists?

Python, C++, and Fortran are preferred by physicists because they offer a good balance of speed, flexibility, and ease of use. They also have strong libraries and tools specifically designed for scientific computing, making them well-suited for use in physics research.

3. Are there any other programming languages used in physics research?

Yes, there are other programming languages that are used in physics research, such as Java, MATLAB, and R. However, these languages are not as commonly used as Python, C++, and Fortran in the physics community.

4. Can physicists use any programming language for their research?

Technically, physicists can use any programming language for their research. However, certain languages may be better suited for certain types of research or may have more tools and resources available for scientific computing. It is important for physicists to carefully consider their specific needs and choose the appropriate language for their research.

5. Do physicists need to have strong programming skills to use these languages?

While having strong programming skills can certainly be beneficial for physicists, it is not always necessary. Many physicists are able to learn and use these programming languages for their research with basic programming knowledge. There are also resources and support available for physicists who may need help with programming tasks.

Similar threads

  • STEM Academic Advising
Replies
6
Views
2K
  • STEM Academic Advising
Replies
8
Views
1K
Replies
28
Views
655
  • STEM Academic Advising
Replies
4
Views
2K
  • STEM Academic Advising
Replies
4
Views
2K
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
8
Views
866
  • STEM Academic Advising
Replies
26
Views
11K
  • STEM Career Guidance
Replies
7
Views
2K
Back
Top