Programming languages used by physicists?

Click For Summary

Discussion Overview

The discussion revolves around the programming languages commonly used by physicists, particularly in the context of preparing for a physics internship. Participants explore the relevance of various languages based on career stages and specific fields within physics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant suggests that Fortran has been widely used in the past but questions if it has been replaced by newer languages.
  • Another participant indicates that the choice of programming language depends on the career stage, recommending Mathematica, Matlab, and Excel for new graduate students, while suggesting C++ for postdocs.
  • A humorous remark is made about the programming language for professors being a single statement directed at students to write programs.
  • One participant emphasizes that the choice of language may depend on career goals, suggesting that those aiming for industry roles should learn Python or C++.
  • Another participant notes that Fortran is still used due to its speed and efficiency, despite its outdated reputation and complexity for beginners.
  • There is a recommendation for MATLAB as a starting language due to its extensive use in physics and ease of learning, with transferable skills to C++.
  • One participant questions whether the discussion is specific to condensed matter physics, noting that even graduate students in high energy physics need to know C++.

Areas of Agreement / Disagreement

Participants express varying opinions on the most suitable programming languages based on different career stages and fields within physics. There is no consensus on a single language that dominates across all areas.

Contextual Notes

Participants highlight the dependence of language choice on specific fields and career goals, indicating that recommendations may vary significantly based on individual circumstances.

BigD
Messages
14
Reaction score
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
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"
 
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.
 
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.
 
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.
 
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++.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
822
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 26 ·
Replies
26
Views
13K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
27
Views
15K
  • · Replies 7 ·
Replies
7
Views
4K