Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming languages used by physicists?

  1. Jul 4, 2010 #1
    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?
  2. jcsd
  3. Jul 4, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    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"
  4. Jul 4, 2010 #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.
  5. Jul 4, 2010 #4


    User Avatar
    Science Advisor
    Homework Helper

    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.
  6. Jul 5, 2010 #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.
  7. Jul 5, 2010 #6
    Are you speaking from a condensed matter standpoint? For those of us in high energy, even we grad students have to know C++.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook