We are filling in the exercises below
in order to make the lesson plan more concrete.
Contributions (both in the form of pull requests with filled-in exercises,
and comments on specific exercises, ordering, and timings) are greatly appreciated.
Process Used
This lesson was developed using a slimmed-down variant of the “Understanding by Design” process.
The main sections are:
Assumptions about audience, time, etc.
Desired results:
Overall goals
Summative assessments at half-day granularity
What learners will be able to do, what they will know, etc.
Learning plan
Each episode has a heading that summarizes what will be covered,
then estimates time that will be spent on teaching and on exercises.
The exercises are outlined to make expectations concrete.
Stage 1 - Assumptions
Audience
Graduate students and research software engineers in numerate disciplines from cosmology to economics
Who can write procedural code in a dynamic language such as Perl or MATLAB
Largely self-taught
Variables and assignment, loops, lists or arrays, conditionals, simple functions
May or may not have done object-oriented programming
Familiar with basic Unix shell commands (cd, ls, rm) and concepts (home directory, path)
But have not programmed in Python before (or if they have, they’ve only dabbled)
Constraints
One full day 09:00-16:00
06:30 teaching time
1:00 for lunch
0:30 total for two coffee breaks
Learners use native installs on their own machines
May connect to a cloud resource at their own discretion, but they have to set it up
Assume knowledge of the Unix shell but not of version control
Use the Jupyter Notebook
Authentic tool
There isn’t really an alternative
And means that even people who have seen a bit of Python before will probably learn something
Exercises will mostly not be “write this code from scratch”
Want lots of short exercises that can reliably be finished in allotted time
So use MCQs, fill-in-the-blanks, Parsons Problems, “tweak this code”, etc.
Running Examples
Morning: invasion percolation
Afternoon: data analysis
Stage 2 - Desired Results
Essential Questions
How do I…
…express operations I’m already familiar with (loops, conditionals, lists) in Python?
…break a program into functions?
…write unit tests for Python programs?
…use data structures make programs simpler and more efficient?
…work with matrices?
…analyze tabular data?
…get data from the web?
Concepts
Learners will know that…
…Python is a dynamic imperative language.
…dictionaries can make programs simpler and more efficient at the same time.
…unit tests are easy to express and run using supporting libraries.
…matrices can be manipulated using MATLAB-style methods.
…tabular data can be manipulated using structures like R’s data frames.
…fetching data from the web is not much more complicated than reading from local files.
Summative Assessment
Mid-point: sort files in a directory into groups by size
Final: Download and process data set from the web
Skills
Learners can:
…run code interactively in the Jupyter Notebook.
…run code saved in a file from the Unix shell.
…create, index, and slice lists.
…create and index dictionaries.
…call built-in functions.
…use help and online documentation.
…import code from libraries.
…read tabular data into arrays and data frames.
…do collective operations on arrays and data frames.
…create simple plots of data in arrays and data frames.