Skip to content

Commit 39ed466

Browse files
Merge pull request #198 from LibraryCarpentry/iss152
Instructor notes cleanup
2 parents 50412ce + 0594b31 commit 39ed466

File tree

1 file changed

+51
-76
lines changed

1 file changed

+51
-76
lines changed

_extras/guide.md

Lines changed: 51 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ layout: page
33
title: "Instructor Notes"
44
---
55

6-
____
7-
# Tips and Tricks
6+
## Tips and Tricks
87

9-
____
10-
## Making a handout
8+
### Making a handout
119

1210
Librarians like handouts. To make a handout for this lesson, adapt/print from [https://librarycarpentry.org/lc-shell/reference](https://librarycarpentry.org/lc-shell/reference).
1311

14-
______
15-
## Differences between platforms
12+
### Differences between platforms
1613

1714
Some of the commands used in this lesson behave differently depending on whether they are run on Git Bash for Windows, macOS X or Linux. Be prepared to manage these differences. Here are some examples from episode 5, "Counting and mining with the shell":
1815

@@ -26,13 +23,11 @@ Some of the commands used in this lesson behave differently depending on whether
2623

2724
As noted below, you should avoid demonstrating any more options that only work on certain platforms.
2825

29-
_____
30-
# General notes on shell
26+
## General notes on shell
3127

3228
- Why do we learn to use the shell?
3329
- Allows users to automate repetitive tasks
34-
- And capture small data manipulation steps that are normally not recorded
35-
to make research reproducible
30+
- And capture small data manipulation steps that are normally not recorded to make research reproducible
3631
- The Problem
3732
- Running the same workflow on several samples can be unnecessarily labour intensive
3833
- Manual manipulation of data files:
@@ -44,7 +39,7 @@ _____
4439
- Built-in commands allow for easy data manipulation (e.g. `sort`, `grep`, etc.)
4540
- Every step can be captured in the shell script and allow reproducibility and easy troubleshooting
4641

47-
## Overall
42+
### Overall
4843

4944
Many people have questioned whether we should still teach the shell.
5045
After all,
@@ -86,12 +81,10 @@ using high-performance computing infrastructure,
8681
and running new specialist tools in many disciplines.
8782
We do not teach HPC or domain-specific skills here
8883
but lay the groundwork for further development of these skills.
89-
In particular,
90-
understanding the syntax of commands, flags, and help systems is useful for domain specific tools
84+
In particular, understanding the syntax of commands, flags, and help systems is useful for domain specific tools
9185
and understanding the file system (and how to navigate it) is useful for remote access.
9286

93-
Finally,
94-
and perhaps most importantly,
87+
Finally, and perhaps most importantly,
9588
teaching people the shell lets us teach them
9689
to think about programming in terms of function composition.
9790
In the case of the shell,
@@ -103,48 +96,44 @@ as long as learners using Windows do not run into roadblocks such as:
10396

10497
- not being able to figure out where their home directory is
10598
(particularly if they're using Cygwin);
106-
- not being able to run a plain text editor;
107-
and
99+
- not being able to run a plain text editor; and
108100
- the shell refusing to run scripts that include DOS line endings.
109101

110-
## Preparing to Teach
102+
### Preparing to Teach
111103

112104
- Use the `data` directory for in-workshop exercises and live coding examples.
113105
You can clone the shell-novice directory or use the `Download ZIP`
114-
button on the right to get the entire [repository](https://github.com/swcarpentry/shell-novice). We also now provide
106+
button on the right to get the entire [repository](https://github.com/librarycarpentry/lc-shell). We also now provide
115107
a zip file of the `data` directory that can be downloaded on its own
116108
from the repository by right-click + save or see the ["setup"]({{ page.root }}{% link setup.md %}) page on the lesson website for more details.
117109

118110
- Website: various practices have been used.
119111
- Option 1: Can give links to learners before the lesson so they can follow along,
120-
catch up,
121-
and see exercises (particularly if you're following the lesson content without many changes).
112+
catch up, and see exercises (particularly if you're following the lesson content without many changes).
122113
- Option 2: Don't show the website to the learners during the lesson, as it can be distracting:
123114
students may read instead of listen, and having another window open is an additional cognitive load.
124115
- In any case, make sure to point to website as a post-workshop reference.
125116

126117
- Content:
127-
Unless you have a truly generous amount of time (4+ hours),
118+
- Unless you have a truly generous amount of time (4+ hours),
128119
it is likely that you will not cover ALL the material in this lesson in a single half-day session.
129120
Plan ahead on what you might skip, what you really want to emphasize, etc.
130121

131122
- Exercises:
132-
Think in advance about how you might want to handle exercises during the lesson.
123+
- Think in advance about how you might want to handle exercises during the lesson.
133124
How are you assigning them (website, slide, handout)?
134125
Do you want everyone to try it and then you show the solution?
135126
Have a learner show the solution?
136127
Have groups each do a different exercise and present their solutions?
137128

138-
- `reference.md` can be printed out and given to students as a reference, your choice.
139-
140129
- Other preparation:
141-
Feel free to add your own examples or side comments,
130+
- Feel free to add your own examples or side comments,
142131
but know that it shouldn't be necessary:
143132
the topics and commands can be taught as given on the lesson pages.
144133
If you think there is a place where the lesson is lacking,
145134
feel free to file an issue or submit a pull request.
146135

147-
## Teaching Notes
136+
### Teaching Notes
148137

149138
- Super cool online resource!
150139
<https://explainshell.com/> will dissect any shell command you type in
@@ -159,8 +148,7 @@ as long as learners using Windows do not run into roadblocks such as:
159148
- Running a text editor from the command line can be
160149
the biggest stumbling block during the entire lesson:
161150
many will try to run the same editor as the instructor
162-
or will not know how to navigate to the right directory
163-
to save their file,
151+
or will not know how to navigate to the right directory to save their file,
164152
or will run a word processor rather than a plain text editor.
165153
The quickest way past these problems is to have more knowledgeable learners
166154
help those who need it.
@@ -179,19 +167,14 @@ as long as learners using Windows do not run into roadblocks such as:
179167

180168
- Building up a pipeline with four or five stages,
181169
then putting it in a shell script for re-use
182-
and calling that script inside a `for` loop,
183-
is a great opportunity to show how
184-
"seven plus or minus two"
185-
connects to programming.
170+
and calling that script inside a `for` loop, is a great opportunity to show how
171+
"seven plus or minus two" connects to programming.
186172
Once we have figured out how to do something moderately complicated,
187173
we make it re-usable and give it a name
188-
so that it only takes up one slot in working memory
189-
rather than several.
174+
so that it only takes up one slot in working memory rather than several.
190175
It is also a good opportunity to talk about exploratory programming:
191-
rather than designing a program up front,
192-
we can do a few useful things
193-
and then retroactively decide which are worth encapsulating
194-
for future re-use.
176+
rather than designing a program up front, we can do a few useful things
177+
and then retroactively decide which are worth encapsulating for future re-use.
195178

196179
- If everything is going well, you can drive home the point that file
197180
extensions are essentially there to help computers (and human
@@ -208,45 +191,18 @@ as long as learners using Windows do not run into roadblocks such as:
208191
If learners already understand the basic material,
209192
this can be covered instead using the online lessons as guidelines.
210193
These limitations also have follow-on consequences:
211-
212-
- It's hard to discuss `#!` (shebang) without first discussing
194+
- It's hard to discuss `#!` (shebang) without first discussing
213195
permissions, which we don't do. `#!` is also [pretty
214196
complicated][shebang], so even if we did discuss permissions, we
215197
probably still wouldn't want to discuss `#!`.
216198

217-
- Installing Bash and a reasonable set of Unix commands on Windows
218-
always involves some fiddling and frustration.
219-
Please see the latest set of installation guidelines for advice,
220-
and try it out yourself *before* teaching a class.
221-
222-
- On Windows machines
223-
if `nano` hasn't been properly installed with the
224-
[Software Carpentry Windows Installer][windows-installer]
225-
it is possible to use `notepad` as an alternative. There will be a GUI
226-
interface and line endings are treated differently, but otherwise, for
227-
the purposes of this lesson, `notepad` and `nano` can be used almost interchangeably.
228-
229-
- On Windows, it appears that:
230-
231-
~~~
232-
$ cd
233-
$ cd Desktop
234-
~~~
235-
{: .bash}
236-
237-
will always put someone on their desktop.
238-
Have them create the example directory for the shell exercises there
239-
so that they can find it easily
240-
and watch it evolve.
241-
242199
- Stay within POSIX-compliant commands, as all the teaching materials do.
243200
Your particular shell may have extensions beyond POSIX that are not available
244201
on other machines, especially the default OSX bash and Windows bash emulators.
245202
For example, POSIX `ls` does not have an `--ignore=` or `-I` option, and POSIX
246203
`head` takes `-n 10` or `-10`, but not the long form of `--lines=10`.
247204

248-
249-
## Windows
205+
### Windows
250206

251207
Installing Bash and a reasonable set of Unix commands on Windows
252208
always involves some fiddling and frustration.
@@ -260,22 +216,41 @@ Options we have explored include:
260216
4. having learners connect to a remote Unix machine (typically a VM in the cloud).
261217

262218
Cygwin was the preferred option until mid-2013,
263-
but once we started teaching Git,
264-
Git Bash proved to work better.
219+
but once we started teaching Git, Git Bash proved to work better.
265220
Desktop virtual machines and cloud-based VMs work well for technically sophisticated learners,
266-
and can reduce installation and configuration at the start of the workshop,
267-
but:
221+
and can reduce installation and configuration at the start of the workshop, but:
268222

269223
1. they don't work well on underpowered machines,
270224
2. they're confusing for novices (because simple things like copy and paste work differently),
271225
3. learners leave the workshop without a working environment on their operating system of choice, and
272226
4. learners may show up without having downloaded the VM or the wireless will go down (or become congested) during the lesson.
273227

274-
Whatever you use,
275-
please *test it yourself* on a Windows machine *before* your workshop:
228+
Whatever you use, please *test it yourself* on a Windows machine *before* your workshop:
276229
things may always have changed behind your back since your last workshop.
277-
And please also make use of our
278-
[Software Carpentry Windows Installer][windows-installer].
230+
And please also make use of our [Software Carpentry Windows Installer][windows-installer].
231+
232+
#### Windows Notes
233+
234+
- On Windows machines
235+
if `nano` hasn't been properly installed with the
236+
[Software Carpentry Windows Installer][windows-installer]
237+
it is possible to use `notepad` as an alternative. There will be a GUI
238+
interface and line endings are treated differently, but otherwise, for
239+
the purposes of this lesson, `notepad` and `nano` can be used almost interchangeably.
240+
241+
- On Windows, it appears that:
242+
243+
~~~
244+
$ cd
245+
$ cd Desktop
246+
~~~
247+
{: .bash}
248+
249+
... will always put someone on their desktop.
250+
Have them create the example directory for the shell exercises there
251+
so that they can find it easily and watch it evolve.
252+
253+
___
279254
280255
[shebang]: http://www.in-ulm.de/~mascheck/various/shebang/
281256
[windows-installer]: {{ site.swc_github }}/windows-installer

0 commit comments

Comments
 (0)