Live data from Hacker News

Ask HN: What is the best way to get into Physics as a coder?

news.ycombinator.com

11–20 of 36 posts

Re: Ask HN: What is the best way to get into Physics as a coder?

#11
I'm a fellow programmer who has been self-learning physics for the past few months. My opinion is that a programming background is largely irrelevant to the "learning physics" part. It might help depending on what you want to do with the physics after you learn it, if that involves writing simulations or something like that. But really learning physics mostly involves reading books and solving physics problems.

I think the most important advice is don't try to skip ahead. It's tempting to jump straight into the cool modern physics topics like quantum mechanics and general relativity before you have the necessary background. I've gone down that route and didn't really learn anything that way.

If you haven't taken any physics at the university level, you probably want to start with one of the big calculus-based intro books like Young's University Physics. Calculus, differential equations, and linear algebra are really important, so you might want to pick up separate textbooks on those (or a single volume Engineering Mathematics textbook) unless you have already learned these subjects. Everyone speaks highly of the Feynman Lectures, but some say that they're only really beneficial after you already have a decent understanding of the subjects being covered. I believe I heard Sean Carroll say this once on a podcast, and I trust his opinion on physics matters.

The core subjects in undergraduate physics are classical mechanics, electrodynamics, special relativity, quantum mechanics, and statistical mechanics/thermodynamics. You will learn all of these subjects from an intro textbook as a first pass. After that, you'll return to each subject and essentially relearn it at a more advanced level with dedicated textbooks for each (except SR which is covered in electrodynamics). General relativity and quantum field theory are usually taught at the graduate level or as upper-level undergraduate electives, so those are best to save for last.

Having forgotten a lot of the math I learned a decade ago, I've found that having one of those Mathematical Methods books nearby at all times is indispensable. I went with Riley/Hobson/Bence, but Boas also gets good reviews. These books are a bit terse if you're learning a subject for the first time, but they're great as a reference and contain pretty much all the math you will ever need to know unless you plan on doing research-level physics.

Don't forget about YouTube. There are lots of lectures available from top universities, as well as independent content creators. I haven't looked much into physics channels yet, but on the math side I highly recommend 3Blue1Brown, especially his series "Essence of Calculus" and "Essence of Linear Algebra".

This is a good roadmap to guide your study path and has good textbook recommendations: https://www.susanrigetti.com/physics

Re: Ask HN: What is the best way to get into Physics as a coder?

#12
Wasn't there this site that had a list on what to learn to go from zero to QM and GR? It was a pretty detailed list with specific sources and subjects. If I remember it was Basically started by this girl who ended up doing it from zero as well. She coded too.

I think most people never make it as far as she did. You have to be really smart and let's face it programming is not the smartest job out there. Even the best programmers mostly end up not knowing physics that well.

I'll post the site if I find it later today.

Re: Ask HN: What is the best way to get into Physics as a coder?

#15

Wasn't there this site that had a list on what to learn to go from zero to QM and GR? It was a pretty detailed list with specific sources and subjects. If I remember it was Basically started by this girl who ended up doing it from zero as well. She coded too. I think most people never make it as far as she did. You have to be really smart and let's face it programming is not the smartest job out there. Even the best…

You might be thinking of this: https://www.susanrigetti.com/physics

Re: Ask HN: What is the best way to get into Physics as a coder?

#16
Depends entirely on what you are trying to get out of this.

If you want to write a game engine or something, you just need to understand some equations and how to implement them.

If you actually want to understand physics - as in the rhyme and rhythm of the physical world - you will have to grind it out. Your coding skills won't help you much. No one has written an essay on the Unreasonable Effectiveness of Coding in the Natural Sciences [1], because there isn't much. Most you will get out of your coding skills is that you can quickly numerically simulate some physics equations. But simulating equations is not physics.

Rather than simulating the models, the skill of Physics is to build the models that correctly describe the system in question. Building models requires actions like making the correct assumptions or identifying the symmetries of the system. These skill emerge from mathematically modeling a large number of systems, in a wide variety of domains, so you get the intuitive understanding of what to do when faced with a novel system. Mathematics provides a very convenient framework for making assumptions and identifying symmetries, while coding does not.

So, really, the prescription is to master calculus, linear algebra and differential equations, and then grind your way through about ten physics courses in sequence. There is no shortcuts unfortunately.

I would recommend paying graduate students at your local university to tutor you.

[1] https://www.maths.ed.ac.uk/~v1ranick/papers/wigner.pdf

Re: Ask HN: What is the best way to get into Physics as a coder?

#17
Hang out at places like Barnes and Noble while you code and drink coffee.

Pick up books from subjects that you think might interest you while you hang. Read a few chapters and decide if the book/subject is for you.

If you really love it; buy the book and take it home.

I did this for a number of years, and absorbed a lot from coding, general physics, quantum mechanics, and even tried to dabble in Astro physics.

Re: Ask HN: What is the best way to get into Physics as a coder?

#18

“Structure and interpretation of classical mechanics” by Sussman bridges this gap beautifully

I came to the comments to say more or less the same thing; however, I would also propose that it should probably be updated to use python for maximum accessibility of the cool ideas therein in this day and age (said even though I am a certifiable schemer).

Re: Ask HN: What is the best way to get into Physics as a coder?

#19
post #8

As someone who's done the opposite ... gone from physics to coding ... I'd suggest the first thing to do is question your premise. What exactly does "getting into physics" mean for you? What actually comes to your mind if you imagine tasks a physicist might perform ? Which of those do you think you could do as a programmer, and which have you got no idea about how to approach ? Such a questioning approach is typical…

For that matter, graphics in computer games are informed by physics in the sense that many methods like rendering, raytracing, NeRF, Gaussian Splatting try to simulate light fields.
Post reply on HN