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

Episode 4: Don't introduce sort -r when teaching piping #1027

Open
kairstenfay opened this issue Sep 2, 2019 · 3 comments
Open

Episode 4: Don't introduce sort -r when teaching piping #1027

kairstenfay opened this issue Sep 2, 2019 · 3 comments

Comments

@kairstenfay
Copy link
Contributor

@kairstenfay kairstenfay commented Sep 2, 2019

In Episode 4, Pipes and Filters, we introduce students to sort and sort -n.

My issue is with the exercise titled "Pipe Reading Comprehension". In it, we not only show students the longest command-chain they've seen, but we also ask them to interpret sort -r without any introduction or previous exercise related to it.

In my opinion, the cognitive load is high enough reading four commands piped together. Adding a new sort option to figure out is unhelpful to students' understanding of this part of the lesson.

@kairstenfay kairstenfay changed the title Episode 4: Don't introduce sort -r Episode 4: Don't introduce sort -r when teaching piping Sep 2, 2019
@colinmorris
Copy link
Contributor

@colinmorris colinmorris commented Sep 17, 2019

That sounds reasonable. Not sure if you had a specific solution in mind, but I can imagine a few:

  1. Remove the sort command from the pipeline
  2. Remove the -r flag from the sort command
  3. Introduce and explain the -r flag at the beginning of the exercise.

I think any of these would be an improvement. PR welcome!

Loading

@gcapes
Copy link
Contributor

@gcapes gcapes commented Sep 18, 2019

In #892 we have a suggestion to use ls -r instead of ls -R. While this is a different command, the concept would already have been introduced (and the option happens to be the same). This may or may not affect thoughts on this issue?

Loading

@sstevens2
Copy link
Contributor

@sstevens2 sstevens2 commented Sep 18, 2019

Piping in though I've yet to make a PR on #892. I vote for option 3. Sorting in reverse is a frequent need and being able to figure out different flags is also a useful skill so I think it is worth adding in the piping lesson. Sounds like the -r flag in sort needs a bit more introduction though. It may also help somewhat when they've seen -r use for reverse in the ls command.

Loading

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

Successfully merging a pull request may close this issue.

None yet
4 participants