NOTE: in the spirit of the dynamic nature of Python, the Syllabus (and the class) will be a dynamic document -- evolving as the class progresses. The general structure is fixed, but the details will change.
Christopher Barker, PhD. (PythonCHB@gmail.com) is an oceanographer and software developer currently working for NOAA in Seattle. He first began programming over 30 years ago, and has been using programming to solve problems in science and engineering ever since. He has been using Python as his primary language since 1998. Chris gives numerous presentations on his work at professional conferences, and teaches oceanography and oil spill modeling at regular workshops. He has been involved with the Seattle Python Interest Group (www.seapig.org) for many years, and has given a number of talks and tutorials at SEAPIG meetings, as well as the PyCon and Scipy conferences. He is an active participant in a number Python-related open source communities, and has served as a Google Summer of Code mentor for the wxPython project.
There are two main supported versions of Python: the 2.* series and the 3.* series (py3k). In this class we will be using "cPython" version 2.7, the version distributed by python.org. Each student is expected to have access to a computer with python 2.7 and a decent programming text editor installed, both during class and for homework assignments. Any modern OPerating sytem is fine: OS-X, Linux, or Windows.
This class assumes a basic knowledge of programming. Thus I will try to emphasize what is unique about Python, with less focus on general programing concepts.
One learns programming by doing -- I'll be demonstrating as I talk about concepts, and I will pause frequently to give you a chance to try things out, so plan on having a laptop up and running with python and your text editor of choice during each class.
There will generally be weekly homework assignments. They will usually be flexible to allow for students' varying time constraints. However, you learn by doing, so I do encourage you to put some time in to the homework. I will review your work if you ask me to, and do a mini code-review of selected assignments during class.
Teach Yourself Programming in Ten Years
In addition, I will ask each student to identify a small project, ideally related to your work, that you can develop as a class project -- that project will be the primary homework for the last few classes.
Each student is expected to give one "lightning talk" during the class -- this is a simple 5-minute talk on something related to Python -- totally up to you. We will randomly assign the talks schedule (using Python, of course) during the first class.
Each class will be broken down something like this:
- 30 minutes talk
- 25 minutes lab time
- 5 minute lightning talk
- 5 minute lightning talk
- 20 minutes talk
- 30 minutes lab time
- 5 minute lightning talk
- 5 minute lightning talk
- 20 minutes talk
- 30 minutes lab time
(there will be no official breaks, but we should all feel free to move about during lab/exercise time)
All class materials will be up on gitHub (where you probably found this). This allows me to update things at the last minute, and the students can all have easy access to the latest versions. It also familiarizes you with a very useful tool for software development. We'll spend a bi tof time during teh first class getting everyone up and running with git....
<https://github.com/UWPCE-PythonCert/IntroToPython>_
There is no assigned text book. However, you may find it beneficial ot read other discussions of topics in addition to what I present in class: either to explore a topic more deeply, or to simple get another viewpoint. There are many good books on Python, and many more excellent discussions of individual topics on the web. A few you may want to consider:
Designed for a first course in computer science -- high school or otherwise, quite basic, but does not assume much:
Printed version: Python for Software Design,
Free online version: Think Python.
Despite the different titles, the two versions have the same contents.
A nice introduction that starts from the beginning available online for free, or you can purchase it as PDF + Videos:
Dive Into Python is a getting pretty old and has not been updated for a good while -- nevertheless, there is a lot of good stuff in there.
The definitive reference for both Python and much of the standard library.
This was the best intro book back when I learned in 1999...
Often suggested as the best intro text -- recommended by Guido van Rossum himself. There is also the advanced book, that I haven't looked at yet: "Core Python Application Programming"
A good place to go for reference, and not a bad tutorial. Keep this open in your browser all the time...
... and many others
General Introductionto Python and the class. Using the command interpreter and development environment. Finding and using the documentation. Getting help. Class github project. Basic data types, functions.
Variables, values, expressions, and assignment. Functions. Definition and use. Arguments. Block structure. Scope. Modules and import.
Boolean expressions. Conditionals and control flow. Iteration and recursion.
Data types. Sequences. Strings. Files. Exceptions. Text Processing. Regular expressions. Unicode.
Data types. Sequences again. Tuples, Lists, Dictionaries. Mutability. Aliasing. Argument passing. List comprehensions.
Data types, comprehensions again. Sets, Arrays. Functional programming, lambda, and callables
Object oriented programming. Classes, instances, and methods. Inheritance and duck typing.
More OO -- Special methods, Iterators and Generators.
Decorators, Packages and packaging
Testing, profiling, performance.
Persistence / Serialization / Databases and Python