1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Physics and programming

  1. Mar 24, 2012 #1
    I read in the "So you want to be a physicist" thread that it is essential these days for a physicist to be able to program. Since I plan to dual-major in mechanical engineering, will this give me the programming skills I need? I notice that the very first course in the curriculum is Engineering Computations...
     
  2. jcsd
  3. Mar 24, 2012 #2
    Get a CS Minor if you can. If you're dedicated you can take one CS class, learn the basics, and pick up anything else you need. Most people aren't and it's hilarious to see my physics and math friends that took C++ their freshman year or something try to program something nowadays. I program all the time and being relatively good at it allowed me to pick up Mathematica in a few days rather than a few months; a tool which I find indispensable even for research in pure mathematics.
     
  4. Mar 24, 2012 #3
    The good news is, if you are pursuing physics and engineering degrees, you'll probably find programming fun. The best way to get good at programming is to make a hobby out of it. There are plenty of websites with programming challenges to improve your skills such as Project Euler or CodingBat.
     
  5. Mar 24, 2012 #4
    Even as a CS major, the classes you take may not give you enough to do to make you a good programmer. If you want to work with code a lot in the future, you should always have some project/software/app/whatever that you're working on. Plus this gives you things that you can talk about in an interview when they ask you about projects you've worked on in the past. If you contribute to some big open-source effort, you can put it on your resume as well.

    Really you don't need classes to help you be a programmer, but of course certain classes help you with some specialized fields such as scientific computing or computational physics. They're generally not the typical CS programming classes, though (they're things like applied numerical methods, networking, parallel algorithms, etc.). Since you have to take a programming class for your engineering major, you could start there and then just learn on your own for the more advanced things.

    It probably won't make a big difference that you don't know how to run highly efficient simulations on a supercomputer if your intended field isn't very heavy on the numerical stuff. Still, knowing how to program really well makes for a hell of a fallback plan; writing software is pretty fun.
     
  6. Mar 24, 2012 #5
    thanks for this guys... i really needed the answers as well... i love physics alot and i also wanted to know .. do i have to learn C++ or java know how to be a hacker?... not for bad intentions off course...
     
  7. Mar 24, 2012 #6
    Yes.

    First of all, computer programming is language independent so that if you are good in one language, you can pick up another language in a few days (or even a few hours). It's expected in programming that someone will be able to give you a language that you've never seen before, and you ought to immediately be able to use it.

    Second, C++ tends to be something of a litmus test. You can write C++ that looks like fortran, that looks like python, that looks like lisp, that looks like assembly language, so the assumption is that if you can program decently in C++, then you can program in anything.
     
  8. Mar 24, 2012 #7
    Which is why I made the statement that a CS *degree* is not too useful. CS *knowledge* is essential, but I've given interviews in which it was obvious that the person with a *CS* degree just couldn't program at a high level. Conversely, there are people without CS degrees that are excellent programmers.

    One thing that I like about the field of programming, is that it's great for people that like to learn stuff on their own.

    And a lot of those classes are online. Because degrees aren't important in programming, you can get a quite good education by going online and looking for stuff.

    Bureaucracies tend to suck the fun out of thing because you end up taking class X merely to get piece of paper Y so that you can get job Z. There is much less of that in programming than in other fields. You figure out that you don't know anything about template metaprogramming, and so instead of having to take a class, you go on google and amazon and buy the books you need and read the papers and lectures you need.

    In my life, I've only taken one formal course on computer programming (6.001), and that course is now available for free online.
     
  9. Mar 25, 2012 #8
    I'm going to provide a bit of a dissenting opinion here. You should be able to develop good enough programming skills in the Engineering Computations class to complete your coursework. Physics classes don't really involve any difficult programming.

    That being said, programming is a very valuable and desirable skill. I would recommend taking extra programming classes when possible.
     
  10. Mar 25, 2012 #9
    You're right in that you generally don't need to do much (if any) programming in physics courses, but I think the OP's question is more about the importance of programming for a physicist rather than the importance of programming for a physics undergraduate student.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Physics and programming
  1. Programming for physics (Replies: 12)

  2. Programming for physics (Replies: 43)

Loading...