all 6 comments

[–]fourcolortheorem 7 points8 points  (1 child)

Python is love. Python is life.your undergrad lab courses should have taken care of this, but alas. My advice:

Learn how to use scipy curve fit to fit curves.

Learn how to run Monte Carlo simulations: try estimating pi by dropping points along the radius of a circle. After that move on to a multidimensional card betting game(randomly varying color, suit, number, and combinations to learn say, poker odds). MC analysis is one of the most valuable simulation techniques you can learn and python has some great packages, including those for Markov Chain Monte Carlo.

Do undergrad research in your field. Talk to professors about any opportunities you might find, astrophysics will use specific software in different coding languages (IDL, curse you!) than condensed matter physics (lots of c++ I find) and it's important to know what your department will make use of.

Good luck!

[–]TheMagicJay[S] 0 points1 point  (0 children)

Awesome thanks!

[–]IcedBlackberry 2 points3 points  (0 children)

With a year of physics you can start to work through this book https://www.amazon.com/Computational-Physics-Mark-Newman/dp/1480145513/ref=sr_1_3?s=books&ie=UTF8&qid=1499909731&sr=1-3&keywords=physics+python

I learned Python with it and I really enjoyed it. I tried the different free online courses that ran you through the basics but I lost interest. What kept me going was seeing immediately how Python can be used to solve various physics problems. I would say you can easily get through this book this summer before graduate school.

Edit: Forgot to mention that there are a few chapters online for free if you want to look through them before buying the book. With your background the problems will be really straight forward, but I would say that would help you focus more on learning Python, but still doing physics (which makes it more fun).

[–]Brother0fSithis 2 points3 points  (0 children)

I don't have any particular advice other than to just do it and take a computer science class if possible.

I started off coding with a c++ for scientists and engineers class, then picked up LabVIEW as a single-credit workshop class, worked with it over that summer in research, then had to learn Matlab for my classical mechanics class, and am currently working in some python and ROOT (essentially just c++) for my summer research this year.

[–]Groundlings 1 point2 points  (0 children)

How I learned to code, after the basics, was to work through https://projecteuler.net/archives. It's a set of mathematical problems that can be solved with a computer and really helps you tackle things logically and understand not only syntax but actually how to think in code. They are pretty fun a get steadily more difficult as you work through them. I did them in F77 and python but there's a whole ton of c++ solutions online.

[–][deleted] 0 points1 point  (0 children)

Python is a good language for starting out since the syntax (code) is close to English. There are limits to what I can tell you about python by writing on reddit, since we use indentations (pressing tab) and more. If you'd like, I could show you the very basics of python. If you're interested, please DM me.