Python Bootcamp

This bootcamp consists of six sessions, totaling about 20 hours of instructions and exercises aimed at scientists with a background in functional programming with python. Recordings are provided below along with notes on the key topics covered and links to the slides and exercises associated with each session. I constructed this bootcamp myself, and I've run it every May since 2020 for an audience of undergraduate research students!

In Autumn 2022, I recruited several of my graduate student classmates to train in the course material. They will run the bootcamp under my supervision in May 2023 for the next class of summer undergraduate research students. We are also planning on expanding the course material to cover topics such as usage of GitHub and calling C code from python.



Basics of the Unix Terminal
  • Simple Commands
  • Aliases
  • Environment Variables
Python as a Programming Language
  • Compiled versus Interpreted Code
  • Static versus Dynamic Typing
  • Weak versus Strong Typing
  • Objects and the Python Data Model



The Basics of Python and Syntax Review
  • Built-in types: int, float, list, tuple, dict
  • The list versus the NumPy array
  • Conditionals: if, elif, and else
  • Loops: for and while
  • Functions: def
  • Simple file I/O with and without NumPy
  • Catching exceptions: try, except, and finally
  • Built-in iteration tools: any, all, zip, map, and filter



Documentation in Python
  • reStructuredText
  • Standard format and contents
  • NumPy, SciPy, and Matplotlib
  • Example plotting script line-by-line with documentation
Multi-File Python Programs
  • Importing code in the same directory
  • The file
  • The usefulness of your PYTHONPATH

Object-Oriented Programming 1


Object-Oriented Programming
  • Properties and setter function
  • Class methods and static methods
  • Syntactic sugar
  • Emulating numeric types

Object-Oriented Programming 2


Object-Oriented Programming
  • Inheritance
  • Composition

Basic Software Engineering


Object-Oriented Programming
  • Multiple Inheritance
Basic Principles of Software Engineering
  • DRY: Don't Repeat Yourself
  • No ifs, ands, or buts
  • Version control