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.
Many of the advancements in computing technology and coding occurred precisely because of Physics. The Manhattan project had human computers to compute the results of theoretical equations. Later early digital computers were used for a wide variety of physics applications. Part of the development of the internet is credited to CERN.
Coding is very useful for parts of Physics. But if you look at the core of the physics skill - being able to build theories and models of new systems - you will see that almost all the fundamental discovery work in Physics was done before the era of digital computers. And despite of now a lifetime of usage of inane amounts of computing powers in Physics, we have hardly discovered any foundational results.
Sure numerical analysis is critical for building intuition about complex systems. And it is a necessary part of a physicists training. And this excellent book does exactly this - derives a bunch of physics equations using mathematics, and then implements them in lisp to build intuition. But writing code will help you with the core physics skill much less than actually struggling with mathematics.
Scott Aaronson, from shtetl-optimized fame, describes his work as on the boundary of math, physics and computers. P vs. NP problem is a CS problem yet has some apparent consequences in quantum world.
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 physics. Why are things the way they are? What predictions can one make ? etc....
Or do you even mean "physics" in the sense the word is used in computer game development ?
Which is "largely" (an over broad term) mechanics; how things move, flow, deform under external forces.
Can you give us more details? That would help with giving you pointers.
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.
First, you’ll need an engaging intro to physics. Without enthusiasm, anything you do will be boring. In the 60’s, books by George Gamow interested me, as did books on astronomy and astrophysics. I can’t say what newer books would help, though I will give that a look.
To learn the basics, something like The Feynmann Lectures on Physics.
But if you are serious, know that there are really varied branches of physics, some theoretical and some experimental. The theoretical branch (and making it through grad school) will demand lots and lots of math, and not the “numerical” kind that is common in computing. You might get familiar with symbolic math computing, such as MAXIMA.
Experimental work is very hands-on, but since so much of it is quantum level, the math is also important. Lesson I learned: if you want to really do physics, learn to love math, advanced stuff.
But if you do get into experimental physics, there are some pretty exciting projects. Just today, I found this article.
If you want something done right, do it yourself: the scientists who build their own tools
Astronomy and Astrophysics are similar. You can go experimental, and of course, reduce tons and tons of data. But cosmology is going to require mostly math as your tool, relativity and quantum physics, perhaps the twain will meet.
Of course, you could go the circular route, as I did. I got a B.S. in physics, did optical and electronic engineering, and eventually got a job supporting computing at an outstanding physics department.
I was a great experience, but when funds were cut, I went on to other, mostly computer-related, jobs.
Personally, I took a liking to optics, which requires knowledge of physics, but it was something I could hold in my hands ( i.e. a camera ) or not hold, as in space optics. My optical engineering days were very enjoyable.
This reads to me like you’re assuming OP is looking to make a career in Physics—what if they’re just looking to learn more about what comprises the field, or to satiate their own curiosity?
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.
As in get a "get a job in physics" or "understand physics"? If it's the former I'd suggest boning up on your FORTRAN and applying to scientific computing jobs. If it's the latter I'd recommend Khan academy. You're going to want to relearn your diff eqs. and your PDEs, plus some linear algebra.
Check out your local community college! I'm in my 30s and taking a physics I-III class series, just as a fun exploration/challenge. I found the social aspect of going to school more engaging than self-teaching, since I work from home all day.
Take/get involved with basic physics courses with eye on developing/automating the lab course work (excel spread sheets, etc) and/or other things[0][1] that others can see/understand/demonstrate that you're interested in doing physics realted things.
If you are serious about it then grab a Physics 101 textbook and get familiar with the subject. Read skim through it and then reevaluate and decide what exactly you need or want to learn. Physics is a huge subject so you need to be a bit more focused on what you need or want to be able to understand where to start.
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).
Go apply maxwell equations to real world situations and gain experience tackling the gravity of issues with free form 3d printing feyman diagrams for programming language bnf forms without material support. VR works too.
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".
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