INST 326: Object-Oriented Programming
Preliminaries: Introduction to the Course and Installation
- Syllabus and course overview
- Coding style guide and template
- command line vs. interactive vs. IDE
- situating the Python language in the context of other programming languages
Part 1: Fundamentals
Module 1: Python Fundamentals
- variables
- operators
- expressions
- conditionals
Module 2: Functions and Iteration
- function definitions
- function calls
- arguments and parameters
- return statements (fruitful vs. void functions)
Module 3: Data Types
- Strings
- Lists
- Dictionaries
- Tuples
- Sets
Module 4: Serialization and File I/O
- File handles & opening files in various modes
- Pickle
- JSON
- CSV
- XML (brief overview only) and lxml
Part 2: Object-Oriented Programming in Python
Module 5: OOP Fundamentals
- Classes and objects
- dot notation
- Methods and attributes
- init
Module 6: Inheritance and OOP Patterns
- Superclasses and subclasses
- How to extend a built-in class with subclassing (for example to create a special-purpose list type)
- Classmethods (maybe worthwhile?)
- Generators
- Decorators
- Other OO patterns?
Module 7: Exceptions and Logging
- Types of errors (syntax, runtime, logic)
- Catching exceptions
- Raising exceptions
- Creating your own exception classes
- Logging
- Log levels
Part 3: Python for Data Analysis
Module 8: Databases and SQL
- brief overview of relational databases
- the Structured Query Language (SQL)
- database normalization
- primary and foreign keys
- sqlite DBs
- using Python’s sqlite3 module
Module 9: Testing
- modules and packages
- import syntax
- try/except
- assert/AssertionError
- pytest
- unittests
Module 10: Data on the Web
- HTTP
- HTML and BeautifulSoup
- Web scraping
- APIs
- Python’s requests module
- (if time allows) building websites with Flask
Module 11: Python for Data Analysis
- Pandas and dataframes
- Matplotlib and data visualization
- Jupyter notebooks (?)
- More on APIs