Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Shell script lesson exercise List Unique Species has high cognitive load (and relies too heavily on piping) #958
I've just been building my handout for my upcoming SWC lesson and I saw the exercise (https://swcarpentry.github.io/shell-novice/06-script/index.html#list-unique-species)
This exercises relies on topics introduced only in exercises two lessons ago, and introduces quite a lot of cognitive load for "Hey, you can use variables in a script to iterate over filenames"
In my exercises, since I don't have much time to polish, I rewrote it as:
But I'm sure folks can improve it from here, perhaps relying on commands we've demonstrated in a lesson instead of a probably-skipped series of exercises?
I'm concerned about the "remembering this exact series of commands" remark, as that may suggest to some readers that memorising commands is a good method to learn computing. If there's a pattern of some learners trying to work by memorising commands, rather than by deducing commands when facing requirements, I'd suggest to considering improving explanations of the principles learners need to deduce the commands ahead of this exercise.
My intention (as you indicated, poorly communicated) was to differentiate what to do after one has achieved a set of commands doing a thing, and that a shell script is a good way to generalise it. I absolutely agree that the language needs work.
My main concern with this PR is that this lesson requires learners to use and generalise from exercises two chapters prior which may have been skipped -- without any repetition or emphasis in the lesson itself. It probably fulfills requirements more effectively to scaffold the piped commands here (with better language, certainly) than to require people solve that and then apply the for loop.