As you well know, physics involves a lot of math, and research involves a lot of data. What you may not have expected, and what many of us have found out quite abruptly, is that physics and research often require a lot of programming skills as well.
Even introductory physics lab classes ask students to use Python for simulation and visualization projects. All research requires data analysis, which is often aided by competency with programming skills for plotting and fitting graphs of data. If you choose to learn them, you will find Mathematica and MATLAB indispensable for your homework assignments.
In this guide, we will review your options for modes of learning or self-teaching programming, as well as offer brief insights into the advantages of different languages you might encounter.
How to Learn
UT Courses
Full list of CS Courses (Courses | Department of Computer Science) (this is specific to non majors but has all comprehensive lists).
- PHY 110C, Introduction to Programming for Physics, 1 hr seminar
- “This is a hands-on, book free, lecture limited course. Programming is a science learned by doing, not reading. This course is designed to be a laid back, collaborative atmosphere to have fun programming. This course will have emphasis on data processing and analysis, but will still give participants a strong basis to begin most programming projects. We will be coding Python for most of the course…”
- CS 303E Elements of Computers and Programming
- A common prerequisite for other CS courses. “Problem solving and fundamental algorithms for various applications in science, business, and on the World Wide Web, and introductory programming in a modern object-oriented programming language.” “This is essentially an introduction to Python class, very useful in learning the syntax and being exposed to all of the different problems you can solve with the language. The problems are relatively simple as it is oriented towards beginners. This is part of the elements of computing certificate and thus does not focus on physics problems, just basic CS problems.”
- PHY 329, Introduction to Computational Physics*Prerequisites listed
- “Computational methods for problem solving and research in physics; numerical analysis and computer simulation methods for physics applications.”
- CS 323E, Elements of Scientific Computing* Prerequisites listed
- “Fundamentals of software issues related to scientific computing. Subjects include floating-point computations, numerical computation errors, interpolation, integration, solution of linear systems of equations, optimization, and initial value problems of ordinary differential equations. Implementation of algorithms are investigated using MATLAB for matrix and vector computations. Examples are drawn from a variety of science and mathematics areas”
Self-Teaching
- Online courses
- BeginnersGuide/NonProgrammers – List of a bunch of tutorials and guides for python
- MIT edX Intro to Compsci and Programming Using Python – Free online course (optional paid certificate, but not necessary), ~15 hours/week, rigorous but rewarding problem sets, good introduction to coding.
- UT Online Bootcamps Learn HTML5, CSS3, JavaScript, jQuery, Bootstrap, Express.js, React.js, Node.js, Database Theory, MongoDB, MySQL, Command Line, Git, and more.
- Youtube Bootcamps
- Other options
- Rosalind is a platform for learning bioinformatics and programming through problem solving. For any coding language.
- jbchampagne/pythontutorials Upperclassman vouched for this Python tutorial.
- Python official documentation tutorial- The Python Tutorial — Python 3.9.4 documentation
- List of Documentation
- Python – 3.9.4 Documentation
- C – C docs – get started, tutorials, reference.
- C++ – Microsoft C/C++ Documentation
- Mathematica – Wolfram Language & System Documentation Center
- MATLAB – MATLAB Documentation, Reference
Downloading Programs
- Matlab, Mathematica, LaTeX, Python, etc.
- Software & Applications | IT@UT | The University of Texas at Austin (Website lists all of the UT funded applications that you can download with a utexas.edu account AND explains what each application is typically used for)
- Includes MATLAB, Microsoft Office
- Download Python (Python download)
- VisualStudio for C and C++ (Visual Studio C/C++ IDE and Compiler for Windows)
- Get LaTeX – Mac OS, Windows, Linux (LaTeX)
- Log in to Overleaf No-download web interface for LaTeX
- Software Downloads | Department of Computer Science (Mathematica)
- Download the RStudio IDE (R IDE)
- Perl Download (Perl)
- Atom.io (Atom IDE, another option to VisualStudio)
- Anaconda (Includes Python, R, Jupyter Notebooks, and more)
Practicality of Various Languages
- Depends on the field and lab, but each language has its perks.
- Python: Fairly widespread, relatively easy to use, plethora of useful libraries, great place to start. Frequently used in physics classes for lectures and assignments.
- LaTeX: Beneficial to learn, good for formatting scientific writing, lab reports, great for writing equations.
- R: “The R language is widely used among statisticians and data miners for developing statistical software and data analysis.” Mean, median, mode, graphs of your data etc.
- Mathematica: Graphing tool. Bash the math, less visual. Great for homework.
- Matlab: Graphing tool. Makes prettier graphs than Mathematica. More visual. Built in functions. Simpler interface, easier to debug (opinion).
- Fortran: “Formula Translator” “Fortran is easier for physics students to learn than C++”
- C: General use programming. Designed to have low level access to memory and machine instructions, can be very fast. One of the most widely used programming languages in the world.
- C++: C with more features, like classes. C but higher level, and more user friendly. Also one of the most used programming languages in the world.
- IDL: Interactive Data Language; generic term for interface where you can input code and run it.