Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion _extras/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,60 @@ title: "Instructor Notes"
permalink: /guide/
---

FIXME
____
# Tips and Tricks

____
## Making a handout

Librarians like handouts. To make a handout for this lesson, adapt/print from [http://data-lessons.github.io/library-python/reference/](http://data-lessons.github.io/library-python/reference/).

_____
# General notes on python

## Overall

This lesson is written as an introduction to Python,
but its real purpose is to introduce the single most important idea in programming:
how to solve problems by building functions,
each of which can fit in a programmer's working memory.
In order to teach that,
we must teach people a little about
the mechanics of manipulating data with lists and file I/O
so that their functions can do things they actually care about.
Our teaching order tries to show practical uses of every idea as soon as it is introduced;
instructors should resist the temptation to explain
the "other 90%" of the language
as well.

Explain that we use Python because:

* It's free.
* It has a lot of scientific libraries, and more are constantly being added.
* It has a large scientific user community.
* It's easier for novices to learn than most of the mature alternatives.
(Software Carpentry originally used Perl;
when we switched,
we found that we could cover as much material in two days in Python
as we'd covered in three days in Perl,
and that retention was higher.)

We do *not* include instructions on running the Jupyter Notebook in the tutorial
because we want to focus on the language rather than the tools.
Instructors should, however, walk learners through some basic operations:

* Launch from the command line with `jupyter notebook`.
* Create a new notebook.
* Enter code or data in a cell and execute it.
* Explain the difference between `In[#]` and `Out[#]`.

Watching the instructor grow programs step by step
is as helpful to learners as anything to do with Python.
Resist the urge to update a single cell repeatedly
(which is what you'd probably do in real life).
Instead,
clone the previous cell and write the update in the new copy
so that learners have a complete record of how the program grew.
Once you've done this,
you can say,
"Now why don't we just break things into small functions right from the start?"