Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ep 04: Move explanation of filters to after first use of wc and sort #1157

Open
kai-lim opened this issue Nov 23, 2020 · 3 comments
Open

Ep 04: Move explanation of filters to after first use of wc and sort #1157

kai-lim opened this issue Nov 23, 2020 · 3 comments

Comments

@kai-lim
Copy link

kai-lim commented Nov 23, 2020

Hi, I have some suggestions for the Pipes and Filters episode (http://swcarpentry.github.io/shell-novice/04-pipefilter/index.html)

  1. After the exercise "Piping Commands Together", you introduced that "a filter is a program like wc or sort that transforms a stream of input into a stream of output". Perhaps moving this part to earlier sections of this episode will be more useful, maybe somewhere right after wc and sort were introduced?

  2. For the "Pipe Construction" section, perhaps we can add a hint, e.g. "remember that uniq only filters out adjacent matching so similar animal names have to be adjacent to each other before you use the uniq command". This can remind the students to remember using the sort command.

  3. For key points at the end of the episode, perhaps we can add the other commands that were covered in this episode, e.g. uniq, echo and cut? I think the key points section can help summarise what was learnt and these commands can be quite important too.

@gcapes
Copy link
Contributor

gcapes commented Sep 10, 2021

Thanks for the issues.

  1. Sounds good
  2. I think the exercise wording already covers this

    The uniq command filters out adjacent matching lines in a file

  3. These aren't really key points. They're just incidental commands used to practice the key concepts of connecting commands using pipes and filters

@gcapes gcapes changed the title Suggestions for improving Pipes and Filters episode Ep 04: Move explanation of filters to after first use of wc and sort Sep 10, 2021
@dtwwwc1e
Copy link

dtwwwc1e commented Nov 4, 2021

Hi

https://swcarpentry.github.io/shell-novice/04-pipefilter/index.html

I agree with Kai-lim this episode could do with some improvement. Introducing the episode, it would be great to explain what are pipes and filters since these words are not used till much later.

Where it says "wc is the ‘word count’ command: it counts the number of lines..." I think this should also say wc as example of a filter. Then the section "Why isn't it doing anything?" makes immediate sense in that the command is waiting for input, before it can produce output.

Then, where we introduce example of pipe ("The vertical bar, |, between the two commands is called a pipe."), it might be a good idea to say this extends "filter", where the output of the preceding command is the input of the following command.

I also think the episode should be renamed Filters and Pipes, to reflect the order.

David

@gcapes
Copy link
Contributor

gcapes commented Nov 10, 2021

I agree with most of that, except that 'pipes and filters' is a design approach, whereas 'filters and pipes' isn't a thing. At least according to google :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants