Applying Pedagogical Principles in This Course
This post originally appeared on the Software Carpentry website.
I've talked a bit about instructional design and educational principles in this blog in the past; here's a concrete example of how we try to apply those ideas. As well as teaching the basics of the Bash shell and Python, we also (try to) teach people that every programming system must have:
- Individual things. A typical "thing" in the shell is a file; in Python, it's a number or string.
- Groups of things. In the shell, these are the lines in a file, or the files that match a pattern like
*.dat
. In Python, they're lists and dictionaries. - Commands that operate on things, like addition or the
cp
command. - Ways to repeat commands, either explicitly (like
for
loops in the shell and Python) or implicitly (likewc *.dat
). - Ways to make choices, like
if
statements in Python or file-matching patterns in the shell. (We're not going to try to teach people how to do conditionals in the shell.) - Ways to create chunks, like functions and shell scripts.
- Ways to combine those chunks, like function composition and pipes.
These ideas are connected: groups of things and ways to repeat commands tie together naturally, as do creating functions and combining them. Those connections:
- help people learn: loops are easier to digest when you know that they exist to work on groups of values.
- help people solve problems: if they know how to do something in the shell, they might be able to reason their way to a Python solution by analogy.
In fact, connections matter as much as facts. What distinguishes experts from novices is not just how many facts the former know, but the density of connections between those facts. The more densely connected someone's knowledge is, the eaiser (and faster) it is for them to bring the next set of facts they need to solve a problem into working memory.
Another example of how we try to tie ideas together (which we haven't used in courses yet, but should) is the essay on counting things. It works through successively more complex scenarios, and uses the shell and SQL as well as Python, to give learners context for complexity. Our biggest goal in the next major revision of the course material is to do more of this: switching to the IPython Notebook will be cool, but putting a sound pedagogical basis under the course will make a much bigger difference.