Does a modern day physicist need to be an expert computer programmer

Click For Summary

Discussion Overview

The discussion revolves around the necessity of programming skills for modern physicists, particularly from the perspective of an undergraduate student concerned about their coding abilities. It explores the role of programming in physics education and research, including data analysis and simulations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses concern about needing programming skills for a physics career, questioning whether this should be a worry.
  • Another participant reassures that there is no immediate need to worry and suggests acquiring programming skills by the end of the degree.
  • Several participants discuss the best ways to learn programming, suggesting starting with small tasks and gradually building skills through coursework and practice.
  • It is mentioned that many physics and math classes will include programming assignments, which can aid in skill development.
  • One participant emphasizes the importance of logical sequencing in programming, stating that many failures stem from faulty logic rather than coding errors.
  • Another participant notes that most physicists engage in some coding, particularly for data analysis, and that skills are often developed incrementally throughout their education.
  • There are suggestions for taking additional programming classes or modules during undergraduate studies to enhance skills.
  • One participant shares their experience of learning programming through practical application and modifying example code, highlighting the value of hands-on experience.
  • Another participant describes a specific example of automating data analysis tasks using MATLAB, illustrating the practical benefits of programming skills.
  • Participants acknowledge that making errors in coding is common and encourage persistence despite challenges.

Areas of Agreement / Disagreement

Participants generally agree that programming skills are beneficial for physicists, particularly for data analysis. However, there is no consensus on the level of expertise required or the best methods for acquiring these skills, as various approaches and experiences are shared.

Contextual Notes

Some participants highlight that the necessity and extent of programming skills may depend on specific career paths within physics, and there is variability in how much coding is integrated into different educational programs.

SteveDC
Messages
39
Reaction score
0
I am about to start my undergrad physics degree and have every intention of having some sort of career in physics whatever that may be, however I am concerned that it seems most modern day physicists spend large portions of time writing computer code, which is something I am pretty bad at. Should I be worried? Advice please!
 
Physics news on Phys.org
You don't need to be worried right now. Just pick up some programming skills by the time you finish your degree.
 
What's the best way to pick up programming skills?
 
You will learn it throughout your studies, half the physics and math classes you take will some programming asignments/components.
 
SteveDC said:
What's the best way to pick up programming skills?

Like any skill, start slow by programming small tasks. One can practice with something as simple as setting up a spreadsheet. Figuring out formulas for a spreadsheet calculation is a skill which can be used when writing a regular program.

The important thing about writing a program is not so much the actual coding, but laying out a logical sequence of tasks to perform which will give the proper results. Many programs fail not so much because something wasn't coded correctly, but because the logical sequence of steps was faulty in some respect. It also helps to study the numerical analysis aspects of solving problems, like linear algebra or differential equations. Knowing the proper numerical techniques to arrive at a solution also makes a good programmer.
 
I don't know if 'expert' is the right adjective, but most everyone I know does a fair amount of coding. This doesn't have to be running full scale simulations or anything (thought you might have to), but at the very least, some relatively involved data analysis. Most of the experimentalists I know, me included, picked it up as we went. A little bit in undergrad, a good deal more in grad school, etc. Most of this stuff is along the lines of Matlab/IDL/Python.

Obviously, the more your do in addition to what is required by your classes, the better off you'll be. I got interested in Python at some point in grad school. Using it for non-work related things gave me the opportunity to learn a lot more about it. The more you learn, the more opportunities you'll have to use it.
 
SteveDC said:
What's the best way to pick up programming skills?
If you are starting undergraduate degree, then there are probably extra classes/optional modules for programming. Go for these, if you want to pick up programming skills. It is definitely a good idea if you want to stay in physics further than undergraduate. And really, it is something that you pick up from just doing it. I find it does help if you have someone show you some example code first. And then you modify the code to do something similar. I think that is the easiest way to learn. If I come across a new command, then I have to look on google for examples where people have actually used the command, otherwise I often just can't work out how to use it.

I think the vast majority of physicists need to do data analysis (as kinkmode said). So even if you are not actually writing the computer program, you might analyse the data from it. For example, you have a bunch of data files with names like 'Nsites10', 'Nsites50', 'Nsites100', e.t.c. (which might be separate simulations for different system sizes). And now you want to import each of these into say matlab, and calculate important parameters for each, using the data, and then make a graph for each, and modify the axis names for each. Now, you could manually do this separately for each file. But that would take much more time than just writing a MATLAB function that automatically imports each of these files, and reads the filename to see the system size, and makes calculations accordingly.

Once you do this, it's actually pretty cool. You can get the computer to automatically do things that you used to have to do manually. Anyway, learn by doing. This goes the same for writing computer simulations too. Just make your own 'practice programs' if you like. p.s. I always have made a tonne of errors whenever I write code. So don't get discouraged if you have to go back over your work for ages looking for where you made the errors. This happens to everyone I think.
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 63 ·
3
Replies
63
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K