The Benefits of Programming for Theoretical Physics

In summary, the conversation discusses the role of programming and computer skills in theoretical physics. The speaker is a physics student who enjoys programming and wonders if it is worth spending time on, or if they should focus more on traditional problem-solving skills. They also express concern about their ability to come up with original ideas and theorems. The other person in the conversation believes that programming is a valuable skill in modern theoretical physics and that it is important to balance it with traditional problem-solving skills. They also mention the limitations of time and resources in programming and the need for reliability in certain applications.
  • #1
powerflow
7
0
Hello,

I am a physics student and I am currently writing my Bachelor thesis in theoretical Physics. A thing which has sometimes crossed my mind over the past months is this: I have always loved computers and programming. I always find it fun to solve some programing related problem. E.g. often when I had exercices which involve calculations, I found it fun to learn how to do them in Mathematica, even though I would have been much faster manually. It's the same with Matlab, I was probably among the first in my year to find out how powerful it is to solve ode's numerically, and I programmed plenty of Matlab simulations and animations since, most of them just for fun. I have been programming, but also playing around with tools like Mathematica and Matlab, but also with Linux itself, with version control systems, also a lot with graphical programs and with Latex, just for fun and willingly ignoring that much of that was or seemed a waste of time. Right now, compared to most of my fellow students, I am far ahead of them when it comes to programming and software, I do the pretties latex documents and graphics, and I know how to solve many problems in Matlab and Mathematica.

But thinking of my future, I would like to be a theoretical physicist, yes, to earn money doing theoretical physics. Even though I never neglected or neglect my courses or Bachelor thesis and usually got very good grades, I sometimes wonder whether all of this playing around with the computer would not better have been spent thinking about problems and practicing doing symbolic calculations or just practicing some maths on the paper. Surely, I did a whole lot of them as part of the courses I took, any my Bachelor thesis is predominantly analytical stuff.

But - in a nutshell - do you think that programming and playing around with science and typesetting and operating system related software is worth it and / or that I should continue doing it just for fun?

I am afraid that I'll teach myself rather to be a computer/numerics geek than a physicist who has deep thoughts and thinks about generalization and proof. I do not want to end up as somebody who hacks and NDSolves anything in Mathematica before even a thought about generalization and proof has crossed his mind. On the other hand, though, I feel there can be a great advantage if one immediately knows how to e.g. numerically solve a problem and if one knows how to obtain the solution right away. I know that some really good students in my year (really very good at theoretical stuff and maths) chose not do go into theo physics (at least for now) because they feared and were unskilled with computers. Also, I think when it comes to making great looking graphs for publications (like doing everything vector graphic based, using psfrags and the like, etc.) I will be able to do that pretty easily (after the work I've done on that so far).

So, what do you think? Does it sound as if I exaggerate the whole computer/programming thing and neglect the really important skills? Or is it OK because it is a useful skill so that I should just go on and stop thinking/worrying about that?

What is worrying me is: there is nothing I cannot imagine to program. Some things are very hard and require much help and time, but nothing seems impossible. But when I look at theories, methods, also the ones I am applying in my Bachelor thesis, they seem totally out of reach. I can apply them and understand how they work, it's also fun to play around with them and read papers about them etc., but I could not easily imagine myself finding or deducing a cool method or theorem - yet this is what a theoretical physicist is supposed to do... You see what I mean?
 
Last edited:
Physics news on Phys.org
  • #2
powerflow said:
Even though I never neglected or neglect my courses or Bachelor thesis and usually got very good grades, I sometimes wonder whether all of this playing around with the computer would not better have been spent thinking about problems and practicing doing symbolic calculations or just practicing some maths on the paper.

No it's not. The problem with the standard undergraduate physics curriculum was that it was largely created in the 1950's and 1960's and doesn't include much computer experience. You'll find that much of theoretical physics today involves being a computer geek.

But - in a nutshell - do you think that programming and playing around with science and typesetting and operating system related software is worth it and / or that I should continue doing it just for fun?

Yes.

What is worrying me is: there is nothing I cannot imagine to program. Some things are very hard and require much help and time, but nothing seems impossible.

Nothing is impossible given enough time and people.

However, in the real world, you are limited by time and people. You aren't going to be able to rewrite Microsoft Word in a weekend, and once you get into graduate school, a lot of the effort will be trying to figure out how to plan a programming project so that you get something done on time.

The other thing is that there is a reliability issue. You can write a "quick and dirty" program that adds numbers together quickly, but when if you need to write a program and then consequence of making a mistake is that an airplane blows up, then you have to start going things slowly.

The other thing is that things get really hard when you have 100 programmers or 1000 programmers working on the same project.

I could not easily imagine myself finding or deducing a cool method or theorem - yet this is what a theoretical physicist is supposed to do... You see what I mean?

Different theoretical physicists do things in different ways, and about 80% of theoretical physicists don't do mathematical proofs.

Personally, I like doing math problems, but doing proofs and theorems is something that I've never particularly enjoyed and something I'm not particularly good at.
 
  • #3
Far from pulling back, it might be worth while going a bit deeper into the theory of computer science. You'll find many parallels and connections with theoretical physics. Leaving aside mundane applications where you use computers to solve a problem, or even slightly less mundane ones such as quantum computing, there is a great truth which we don't emphasise to students enough: a theory is nothing if you can't calculate with it. Personally, I only really understand how everything works once I can tell a computer to do it --- it's like a more extreme version of teaching, where the instructions have to be extra clear and unambiguous.

Topics which are good to learn: algorithms and complexity theory; information theory; logic; type theory and functional programming.
 

What is programming and how is it relevant to theoretical physics?

Programming is the process of creating computer software by writing and testing code. In theoretical physics, programming is used to design and run simulations, analyze data, and create models to test theories and make predictions.

What are the benefits of using programming in theoretical physics?

Programming allows for complex calculations and simulations to be performed quickly and accurately, saving time and resources. It also allows for the manipulation and visualization of large datasets, making it easier to identify patterns and make connections between different variables.

Do I need to have prior programming experience to use it in theoretical physics?

While having prior programming experience can be helpful, it is not a requirement. Many resources, such as online tutorials and courses, are available to help beginners learn programming for theoretical physics. With patience and practice, anyone can learn to use programming in their research.

What are some programming languages commonly used in theoretical physics?

Some commonly used programming languages in theoretical physics include Python, C++, and Fortran. These languages are known for their efficiency, flexibility, and wide range of libraries and tools that are specifically designed for scientific computing.

Can programming completely replace traditional theoretical physics methods?

No, programming is a valuable tool in theoretical physics, but it cannot completely replace traditional methods. Theoretical physicists still need to have a strong understanding of mathematical and analytical techniques, as well as the ability to interpret and analyze data. Programming simply enhances and complements these skills in the pursuit of scientific discoveries.

Similar threads

Replies
37
Views
3K
  • STEM Academic Advising
Replies
2
Views
1K
Replies
8
Views
1K
Replies
8
Views
1K
  • STEM Academic Advising
Replies
1
Views
346
  • STEM Academic Advising
Replies
5
Views
347
  • STEM Academic Advising
2
Replies
50
Views
4K
  • STEM Academic Advising
Replies
4
Views
2K
Replies
16
Views
1K
  • STEM Academic Advising
Replies
9
Views
145
Back
Top