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

Question about the programming you learn during Theoretical Physics

  1. Jul 1, 2010 #1
    I was reading that while you study a Bsc in Theoretical Physics, you learn how to do quite a lot of programming.
    I am quite unfamiliar with programming but I was wondering how transferable are the programming skills you learn? Are they applicable to things like web design etc? Or are they only useful within the realms of Theoretical Physics?

  2. jcsd
  3. Jul 1, 2010 #2

    Ben Niehoff

    User Avatar
    Science Advisor
    Gold Member

    You will learn whatever programming you choose to learn. I don't think there is anything about theoretical physics that naturally requires programming. You will learn how to use Mathematica or Maple (or both), and do a little programming in those, but that is not very transferable. You may find yourself doing numerical calculations, but in order to perform them you will most likely use Mathematica/Maple rather than writing your own numerical algorithms from scratch (which would be a silly thing to do, given the expertise that has gone into existing mathematical software).

    If you do some kinds of simulations, then you will do some possibly intense programming, and you will learn all kinds of useful algorithms that have been developed by others. It is unlikely you will come up with a new algorithm that is any better, because these problems have been thought about for a while; but if your simulation is sufficiently unusual, maybe you will find something new. At any rate, programming on simulations is quite transferable to other fields such as aerospace, engineering, and video games. You probably won't write any simulations in a field like string theory, but you will probably do simulations in fields like biophysics and materials science (biophysics is really hot right now).

    However, it is very unlikely you will have to do anything remotely related to web design in the course of physics research. Web design requires an entirely different set of programming skills. You will need to learn those skills separately if that's what you're interested in doing.
  4. Jul 1, 2010 #3
    Thanks for the info.

    I read somewhere that a substantional amount of TP grads go into computer programming so that just got me interested in other uses for the programming you learn, admittedly I think web design was a poor example haha
  5. Jul 1, 2010 #4
    I have a couple of things to say, too.

    Firstly, almost everyone I have worked with uses MATLAB. I have come across math departments that teach Mathematica and Maple, but only maybe a sole Physics department.

    Secondly, I work with a few different languages and I feel that the programming skills you'll learn in physics are extremely transferable. Learning to think like a programmer is one thing that is incredibly useful, but you'll also find that many languages have similarities in syntax - when you're comfortable with MATLAB for instance, C++ becomes a whole lot easier and vice versa. MATLAB is a huge language, and is used all over the place in science - it can be used in places from industry engineering to mathematical finance. C++ is also huge in usage: it's possible you'll learn this in a physics undergraduate, which would be great. Things like web design are a bit of a different game, but there will be developmental techniques and practices that you would find useful, and there are languages like Perl that can be useful for scripting in physics as well as useful in relation to websites.
  6. Jul 1, 2010 #5
    I have a question. Currently, I know Java and some microsoft web based scripting languages (it was my interest when I was younger, but atleast I've developed a sense of OO programming), PHP, things like that. I decided that I should learn C++ because I see it pretty useful to doing little useful things as well as the things I've heard, that it is used in modeling for theoretical physics.

    So I've taken AP Computer Science, which is in Java. So I can go on to 1302, which is basically CS 2 at my school, but it is in Java. There's another class, computing for engineers, and that uses MATLAB. Am I correct in inferring that it would be much better for me to take the MATLAB course, since it's very much like C++ as well as being used extensively in research for physics? Or is Java also very good as well? The caveat is that the MATLAB course is an introduction.. the CS 2 course is a level beyond introduction.
  7. Jul 1, 2010 #6
    I would imagine a good majority of people going into physics have had early experience(often starting as early as junior high school) with C, C++, Java, PHP, Perl, Python, LUA, etc. I had experience with all of the aforementioned languages just through a single gaming project of mine. I wanted to run a game server through my computer so I had to learn PHP and Java so I could setup a website, C++ so I could edit and compile the code for the console, Perl to manage .xml files, and LUA to script events.
  8. Jul 1, 2010 #7

    Ben Niehoff

    User Avatar
    Science Advisor
    Gold Member

    I misread the OP; since he said "theoretical physics", I assumed he mean graduate school. Nobody will teach you any programming in graduate school unless your research group is doing hardcore simulations; you will learn along the way whatever is most useful for your research, and in theoretical physics that is mostly Mathematica.

    I've never heard of a BSc in theoretical physics. It sounds too specific. Typically a BSc will just be in Physics, generically. And yes, in that case, you'll have programming classes in languages such as Matlab and C++.

    If you want to learn web design, take some electives in that. Merely knowing how to code a little in Perl/PHP/MySQL is not enough to actually create quality, functional, secure websites.
  9. Jul 1, 2010 #8
    I'd suggest python simply because of the Numpy and Scipy libraries.
  10. Jul 2, 2010 #9
    I agree.
  11. Jul 4, 2010 #10
    I don't know what country you guys live in, but I'm going to assume America as perhaps there is a difference in course options there?

    But we have good handful of Uni's here in England that offer a Bsc in Theoretical Physics.
    Here's one example:

    I don't specifically want to learn Webdesign, I was more just using that as an example for different uses the coding could be transfered to. But it's good to know that the programming is a good gateway into different skills.
  12. Jul 4, 2010 #11
    I was born, live and studied in the UK. I know many of these programmes exist - It's just that I don't think 'theoretical physics' is a sensible degree title for an undergraduate programme.

    Pretending to undergraduates that they're somehow specializing in theoretical physics isn't much short of a lie - with all of the so-called 'theoretical physics' programmes I've seen, the only difference is that a couple of physics modules are swapped out for some extra math. You'll be a specialist in theory no-more than someone that takes a Physics degree becomes an experimentalist. All of the basics are the same - and it takes more than the 4 or 5 years allotted for your degree to learn them. Physics with Mathematics would be a more sensible title to me - though granted on the 'theory' courses there may also be extra computation (which I also disagree with - many experimentalists are no strangers to programming! Programming and computational ability are worthy no matter what field you choose) - I guess we're stuck with what we have.
  13. Jul 4, 2010 #12
    Fair play, to be honest you probably know more about it than I do. I was just under the assumption that, in particular the more reputable universities, couldn't get away with giving misleading titles to their undergrad courses (although when thinking about it, it really doesn't suprise me. :tongue:)

    But for the arguments sake I provided a link to the programme as some people seemed skeptical as to whether the course even existed, albiet somewhat questionable.

    When I come back from China I'll make a few calls to the Physics departments of the Universities and ask what the real difference is between the standard Physics Bsc and a TP Bsc, then from that make a decision.

    Thanks for the guidance and info everyone.
  14. Jul 5, 2010 #13
    They are misrepresenting it to undergraduates. Theoretical physics is not an appropriate title for an undergraduate degree.

    You'll find that the difference between that and 'regular' physics will be that you'll maybe drop a class in labs and take some extra mathematics, possibly with the option of extra comp-sci.

    Don't let the title interfere with your plans for study - if you want to do a bit more math then go for the 'theoretical' course. At the end of the day, when you finish your degree, the title won't make any difference. You wouldn't ever be excluded, or even in any way disadvantaged, in applying for 'experimental' positions or engineering - as far as those who employ graduates are concerned, a physics degree is a physics degree.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook