Best way to learn computer language for physics major

AI Thread Summary
Programming is increasingly valuable for physics students, especially as many universities require programming knowledge. A user with limited C++ experience seeks effective self-study methods over the summer. Recommendations include working through a C++ primer by Stroustrup for beginners and possibly pairing it with Lippman's book for deeper understanding. Emphasis is placed on the importance of strong foundational knowledge in mathematics and physics textbooks, alongside practical programming skills. The discussion highlights the interconnectedness of computer science and quantum mechanics, particularly in optics, suggesting that a solid programming foundation can enhance understanding in these areas.
Crush1986
Messages
205
Reaction score
10
It seems being able to program is a very valuable tool to a student studying physics (about to be a 3rd year). I'm transferring from a CC to a four year soon. I noticed a lot of the universities I've been accepted to have had their sophomores take some programming this year.

Over the summer I'm planning on doing some self study and programming is one of the things I'd like to tackle. I'm a bit torn though on what and how I should study and what will give me the most benefit for my time.

In order to receive the best advice I guess I should say that I have very limited experience with C++. A few years ago I somehow got into it for a few weeks and wrote very simple programs (guessing games mostly for my girlfriend, calculator, etc.).

So, in short, what do you feel would be my best route to enlightenment that would help me in my studies of physics.

I thank anyone in advance for their reply and time.
 
Technology news on Phys.org
Greg Bernhardt said:
Simply find a C++ primer book like https://www.amazon.com/dp/0321714113/?tag=pfamazon01-20

Or this one:

https://www.amazon.com/dp/0321992784/?tag=pfamazon01-20

I've never seen this book myself, but it has good reviews on stackoverflow and amazon.com, and I have some of Stroustrup's other books which are very well written. He is the original inventor of C++ and is probably the leading authority on it. Unlike his other books, this one is intended for people with no programming experience.

The comments I've seen about Lippman are that it's more suitable for someone who already knows something about programming in another language. So maybe use the two in tandem: Stroustrup to get started, and Lippman to go deeper.
 
Last edited by a moderator:
  • Like
Likes Greg Bernhardt
Great guys thanks a lot. It seems like it's just a good idea to just work through a good text then. I'll check these suggestions out and see which appeals!
 
Can we trade? Can you tell a CS major how to get rolling in physics with emphasis on optics and knowledge of the Quantum side of optics? Thats what interests me.

Math is the hard part for most, but not for a physics major. Zoom into discrete math, logic, probabilility, etc. to prep your thinking for life outside the continuum, and then learn a high level language like python along with whatever your work is in C. You want to see the common elements in both, and then when you have to deal with the various new languages you encounter for this or that science software suite, you will learn fast
 
Heh, I don't even think I'm near that level of QM. It's only been in my life for about two months. Looks like my senior year most universities have 2 QM classes that have a lot of generality.

For studying physics and having a 4.0 in my major's classes. All I have done is obtained 2-3 decent textbooks (mine are Halliday & Resnik, Kleppner and Kolenkow, Young & Freedman) and pretty much done every problem I could get my hands on. Read every single chapter (It seems almost no one does this for some reason) and raised any question that came to mind, either here or in office hours. I would also watch a second lecture from MIT's OCW if I was confused (Walter Lewin was amazing for me). It's a long arduous process but it has left me with about as good a knowledge of the first two years of physics as I could have hoped for.
 
Thanks for your reply. I am not planning on being anywhere near the QM gurus on this site... Even if I have the brains I don't have the time. But unfortunately, the future of computer science has a great deal to do with light, and QM is the theory that really describes light. So I'm stuck looking around for some kind of toolkit that is going to give me enough insight without doing a 6 year physics degree to understand the deeper levels of it.
 
Back
Top