Not Quite Lesson Material

13 Sep 2015

Lesson plans are a funny thing. The Software Carpentry lessons are an odd balance of a lesson to be read (like a textbook) and a lesson plan for instructors, where they bring the text to life via speaking, live coding, and doing exercises.

This format doesn’t lend itself well to a few activities I’ve used in Software Carpentry workshops. So I’m going to throw them up here until further notice.

Git demo

Before teaching the Git novice lesson, I have done the following live demo. All that’s needed is a picture taking device, preferably a smartphone or tablet. I’ve never timed it, but I don’t think it takes very long - probably around 5 minutes.

I do this after configuring git, but before the first git init.

To wrap up, explain that everyone has just experienced a typical git workflow…

…and that you’ll now be covering the commands used in the shell to achieve the same thing.

Later in the lesson, when talking about commit hashes, I use this example again to explain that Git auto-generates a hash, just like your camera-device gives an automatic name to photos, but you can refer to commits in an ordered way as well, just as you scroll through photos on your device in chronological order.

If you want to go really crazy, the contrast of sticky notes in the photo can be a parallel to using git diff and the return to an original state as an example of git checkout ####.

Pedagogical disclaimer: the motivation for this demo is purely to get people standing up, moving, and physically interacting with these ideas, which are otherwise very abstract. Personally, I have always found that I remember exactly the bits of lessons where I had to stand up and do something. So I have no research-based reason to use this demo except my own experience. That and students seem to like it. If anyone can provide evidence to support me, that’d be great!

Shell group activity

There’s a fine line in the shell lesson between “teaching shell commands”, “teaching shell concepts”, and “teaching general programming constructs by using the shell.” Life is challenging.

One thing I do to address this balance is break up the shell lesson into two pieces. The first piece is “shell concepts” (the idea of the filesystem, and being able to run any command from anywhere) and the second piece is “general programming constructs” (scripts, loops, pipes and filters). To bridge the two, I take a little break and have people investigate shell commands themselves. The logical link for me is: we’ve learned about some very basic shell commands + how the shell works generally; now let’s do a (brief!) overview of some of the variety of shell commands; then we can talk about how good practices like loops, scripts, pipes will allow us to use this variety of commands in even more ways.

The activity is very simple - I divide the room into groups and give each of them a shell command to research. A sample list might be:

Each group needs to use the man pages (or the internet) to find out what the command does, think of an example for the instructor (me) to demonstrate, and describe a scenario where that command might be useful. After a few minutes working together, each group “presents” to the large group, facilitated by the instructor. I’m always careful to point out that this is purely a brief summary, and that I’m trying to expose them to the range of shell commands and to give them the skills to pursue whatever they might need later on their own.

Shell demo

I haven’t done this yet, because I haven’t taught the shell lesson since I thought of it. But I’d like to try to the following to really drive home the idea of relative and absolute paths and that shell commands are run relative to the working directory:

It makes sense to me, but I’m not sure if it would clarify ideas or confuse the listeners.

how-to » programming, computing, Software Carpentry, teaching, lessons, git, shell,

Recent Posts



Popular Tags

ACT (2) RCF (6) Software Carpentry (6) books (3) care and keeping of prs (6) collaboration (9) computing (13) culture (10) empowerment (6) family (2) gender (2) git (9) hope (2) language (3) lessons (4) math (8) mental health (2) movies (2) personal (5) problem solving (3) programming (9) science (2) self care (3) shell (2) teaching (11) true story (5) tutoring (2) work (12)