Is programming essential for a physics major at Virginia Tech?

  • Thread starter Thread starter tolove
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary

Discussion Overview

The discussion centers around the importance of programming for physics majors at Virginia Tech, exploring when and how students should engage with programming in relation to their physics and mathematics studies. Participants share their experiences and opinions on programming languages relevant to the field.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant questions the necessity of programming, asking when to prioritize it over physics or mathematics and whether to take formal classes or self-study.
  • Another participant, working at CERN, emphasizes the prevalence of C++ and Python in high-energy physics (HEP) and suggests avoiding FORTRAN and C unless specifically required.
  • A different participant shares their experience using multiple programming languages, noting that while FORTRAN is still used in some contexts, the key takeaway is to learn programming fundamentals rather than focusing on specific languages.
  • Some participants argue that programming skills are essential, likening it to learning to use a calculator, as it can significantly enhance productivity and efficiency in various tasks.

Areas of Agreement / Disagreement

Participants express differing opinions on the relevance of specific programming languages, with some advocating for the importance of programming in general while others debate the necessity of particular languages like FORTRAN and C. The discussion remains unresolved regarding the best approach to learning programming for physics majors.

Contextual Notes

Participants mention generational differences in programming language familiarity, which may influence the relevance of certain languages in different fields of physics. There is also a recognition that the choice of programming language may depend on specific research contexts and collaborations.

tolove
Messages
164
Reaction score
1
[Starting junior, physics, Virginia Tech]

I'm coming out of a community college and for the first time poking my head into the world of my chosen major. After reading through the "So you want to be.." post, I felt like date checking the advise on programming.

How important is studying programming? When should I begin using my free time to study programming instead of physics or mathematics? Or should I take actual programming classes instead of picking it up on my own? I have a talent (but not a passion) for programming. Would it be wise to use these classes as a GPA bump?

Are FORTRAN and C still the two languages of choice in fields of physics? Java has a rather large market hold. FORTRAN is pretty small.
 
Physics news on Phys.org
There are a lot of differing opinions about this, but I'll give my experience and advice:

Currently I work at CERN, doing mostly coding for ATLAS. Pretty much everything I've seen is written in C++ or Python. While I've never worked with it, I know there are parts of the computer architecture that are written in Java (I think only the computer scientists here touch that). I've never seen anything written in FORTRAN or C.

If you aren't going into HEP experiment, that experience might be very misleading. I think our professor's "generation" knows mostly FORTRAN, which means fields with smaller experiments are probably still written in FORTRAN. By contrast, many profs in HEP experiment don't understand the code currently used anywhere near as well as their grad students who work on it. Still, I would shy away from FORTRAN until you are explicitly told to use it. My advice is similar for C, don't spend time on it until told to do so. If you learn C++, you'll learn many of the core ideas and much of the syntax of C, and you will also learn object oriented programming which is an important part of modern programming.

As to whether or not you should learn programming, you definitely should. Think of it like learning how to use a calculator. Most people don't have a passion for it, but not learning how to use one would be ridiculous. There's so much you can do with a computer, once you know how to program, that you'll outclass those who never bothered to learn. Tasks that will seem like too much work to other people (like pulling information from hundreds of web pages) will seem simple to you; an afternoon's work rather than weeks. That's useful no matter what you do, even if it's highly theoretical physics.
 
DimReg said:
There are a lot of differing opinions about this, but I'll give my experience and advice:

Currently I work at CERN, doing mostly coding for ATLAS. Pretty much everything I've seen is written in C++ or Python. While I've never worked with it, I know there are parts of the computer architecture that are written in Java (I think only the computer scientists here touch that). I've never seen anything written in FORTRAN or C.

If you aren't going into HEP experiment, that experience might be very misleading. I think our professor's "generation" knows mostly FORTRAN, which means fields with smaller experiments are probably still written in FORTRAN. By contrast, many profs in HEP experiment don't understand the code currently used anywhere near as well as their grad students who work on it. Still, I would shy away from FORTRAN until you are explicitly told to use it. My advice is similar for C, don't spend time on it until told to do so. If you learn C++, you'll learn many of the core ideas and much of the syntax of C, and you will also learn object oriented programming which is an important part of modern programming.

As to whether or not you should learn programming, you definitely should. Think of it like learning how to use a calculator. Most people don't have a passion for it, but not learning how to use one would be ridiculous. There's so much you can do with a computer, once you know how to program, that you'll outclass those who never bothered to learn. Tasks that will seem like too much work to other people (like pulling information from hundreds of web pages) will seem simple to you; an afternoon's work rather than weeks. That's useful no matter what you do, even if it's highly theoretical physics.

Thank you very much for your thoughts. This makes a lot of sense.
 
In my research, I've personally used Fortran, C++, Python, and Mathematica for various tasks. Mathematica primarily (although lately I've been transitioning to almost exclusively Python).

Fortran still has a place if you are doing lots of number-crunching, but personally I wouldn't use it by choice. All of the projects in which I've used it have been at the prompting of collaborators from "older generations" who aren't familiar with newer languages.

That said, there's an important thing that needs to be mentioned here: what's important in the long run is simply that you learn how to program - not which language you pick to learn. Once you know the basics of programming, picking up new languages is easy.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
12
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K