r/Physics • • 16d ago

Advice or Guidance on coding/computer science

I recognize I have a problem. I love physics and got a degree in it, I hate the idea of coding. I don't really have exposure to it besides a C++ class that never got applied to anything so I don't know what to expect at a job. I'm sure it has to do with my ADHD, I find physics endlessly interesting, but coding for lack of insight into how it can be interesting or used.... I'm just stuck at this perception of it as a monotonous chore that I will hate if I attempt to find a job in the usual for our degree... data scientist/analyst or (software) engineering related. Admittedly I'm also more pessimistic because I don't view the tech/AI industry fondly.

Some aspects of computer science seem interesting, but I figure I'm not trying to double major here. So what parts do you guys find most important to know for what jobs?

I'm just wondering if anyone was on this same boat. What makes you interested in coding, is it a big part of your job? what do you use it for?

15 Upvotes

15 comments sorted by

9

u/topskukkeli 16d ago

As an experimental physicist I use coding (mainly python, matlab, microcontrollers) for numerical simulations, data analysis, writing firmware and GUIs, etc. Do you just have a BSc? Have you worked in any projects/labs?

4

u/rafael123233 16d ago edited 16d ago

Yes UCD 2020. I was misguided at the time and didn't pursue any research, just stuck to classes. There was a single lab class where I wrote reports on NMR and Zeeman effect observations. That was pretty awesome. I used excel for basic plots.

I've been an electronics tech since, considering going back for PHD. Hence the search for insight. "numerical simulations, data analysis, writing firmware and GUIs" I get in principal but basically have no idea what that entails day to day at a job.

3

u/topskukkeli 16d ago

Gotcha. By electronics tech do you mean troubleshooting software issues and installing/changing hardware on PCs/laptops? I'd recommend playing around with some microcontrollers to get down the very basics of coding. Then maybe come up with a hobby project that involves measuring something with your microcontroller and doing some data analysis/plotting, getting used to libraries and functions. I'd imagine having a personal project would help with motivation. I appreciate your view on the AI industry, at the same time LLM-based tools are here to stay and they are immensely useful especially in coding. The basics of coding are the same across languages.

2

u/Yashema 16d ago edited 16d ago

I'm in the middle of my physics degree (have taken ODEs, Calc III and statistical mechanics and modern physics) and took my first embed class last semester and an intermediate level one over summer.  For my final project I made a simple simulation of a hydrogen atom on a pico 2W (n=2, a0=20, no spin) that outputs to a screen the possible location of the electron in relation to the proton. It's technically 3D in terms of coordinates, but I didnt manage to finish that off visually. 

It's giving me great motivation to study a bunch of math (PDEs, stochastics, discrete, complex, non-linear dynamics) and computer theory (architecture II and III, parallelism, game theory) as well as quantum computing and mechanics (and possibly optics lol) to make the simulation as advanced as possible within the limits of the Pico, which actually is fairly powerful mathematically, for reasons I don't understand (yet). 

0

u/rafael123233 16d ago

I should have specified RF amplifier tech - decent experience with RF equipment and very basic RF engineering. Personal project sounds like a really good idea for motivation. Do you mind sharing some specifics on what you code?

1

u/topskukkeli 16d ago

Stuff like libraries for controlling motorized stages, libraries to communicate with lab equipment e.g. oscilloscopes and amplifiers, nonlinear numerical signal forward/reverse propagation (very physics), program microcontrollers e.g. for interfacing/controlling lab equipment or integrated to self-built measurement devices, FFT-based data analysis of signals, general data plotting and uncertainty analysis, GUIs for user-friendly control and data visualization of/from (mainly) self-built measurement/actuation devices, automated image-analysis (e.g. identifying ROIs, evaluating metrics). Most of that isn't honestly very complicated, it's really just mostly needing some functionality or facing a problem and building a solution be it hardware or software. That to me is what physicists should excel at.

6

u/dr_edo_available 16d ago

I like Julia ( but I was a Fortran baby in 1976). The existence of libraries will be the deciding factor.

1

u/StraightUpSeven Engineering 16d ago

I use mine to solve inverse problems, MATLAB, Python, R and Julia. Many of my colleagues use code to reconstruct medical images. I think these applications are way more exciting than the standard 'tech fare' that you see boasts the use of code.

0

u/rafael123233 16d ago

I had to google but I definitely agree. Do you mind sharing a little more on what problems you solve?

2

u/gnomeba 16d ago

I worked as a scientist at a big tech company with many experimental physicists/chemists and most of them were casual users of programming. Many only used Python, or increasingly Julia, when Excel wouldn't suffice. Granted, I think that division was a bit behind in their ability to employ computational physics but places like that exist.

If you can do data analysis and make plots and are an excellent experimentalist, you'll be fine. In fact, possibly more than fine because LLMs make a lot of programming pretty trivial.

2

u/the_physik 16d ago

Unless you're a computational physicist you should look at programing as just one tool in your toolbox. I'm a nuclear physicist; during my phd i had to learn a bit of ROOT (handling large data sets) and some C++ (bc our MC sim was written in it). But as a professional I dont program much; my old company had a software engineer that handled the programming projects. I did write a small Python script to monitor bias voltage of our HPGe detectors; but it was very simple.

The amount of programming you do depends on your research topic and/or job. Some topics will require heavy programming knowledge; some will require very little.

I would disuade most physics majors from applying for programming jobs because colleges have been pumping out CS majors for the last decade or two and the industry is shifting fast now with AI and ML. I know I wouldn't pass a technical test for a programming job. But some of my cohort have gone into computationsl modeling jobs for the insurance industry. Just depends on your experience level and what you want to do.

2

u/Stock_Test2326 15d ago

TIL of ROOT, thanks!

1

u/dampew 16d ago

I think most people need to do some coding these days, if for no other reason than to analyze data (Excel is not always up to the task). But modern programming languages are a bit friendlier than C++. Python is pretty common now — check out Jupyter notebooks to see what you might be working with — and Igor Pro, which has a mouse-based user interface, was pretty common at national labs back when I was a student.

When I first got into programming I made small tasks for myself rather than just trying to learn everything abstractly. I’d plot fractals and make numerical approximations to pi, stuff like that.

Good luck!

1

u/killidpol 16d ago edited 16d ago

Depends on what you’re building. You can more or less just vibe code now as long as you understand at an algorithmic and systems level what’s going on, esp. precision and limitations of your hardware (for which LLMs are also useful consultants given enough context). These things will only get better; do not expect syntactical hand coding knowledge to be a remotely necessary skill in the coming years. That may sound heavy-handed, but it is already hardly necessary.