Code Monkey home page Code Monkey logo

Comments (12)

drjwbaker avatar drjwbaker commented on August 23, 2024

Hmm. I was thinking about this yesterday when I taught the shell lesson for the first time in over a year! I use this here because my narrative is: by the end of the session you'll feel comfortable describing what is going on here. I know that SWC avoids "big bang" openings such as this, but I like it as it a) offers a clear use case for the shell b) offers a sense of direction and learning outcomes c) means that - I hope - people are less likely to get disillusioned during the opening bit on pwd, ls, cd et cetera which is pretty dull and uninspiring! (by necessity).

from library-shell-deprecated.

ccronje avatar ccronje commented on August 23, 2024

Well done at DST4L! I agree with your reasons - it does help to see the potential. It's a great example to illustrate the the concept of piping input and output. The memory side of things gets a bit complicated https://brandonwamboldt.ca/how-linux-pipes-work-under-the-hood-1518/

from library-shell-deprecated.

weaverbel avatar weaverbel commented on August 23, 2024

@drjwbaker I agree - I like to give people something 'aspirational' - dread word - to inspire them. It helps if you can show them something that will be amazing. I also demo the name counts from Little Women - the speed with which the shell returns the answer always gets them in ...

from library-shell-deprecated.

drjwbaker avatar drjwbaker commented on August 23, 2024

@weaverbel Can you sketch out the Little Women example please (when you get a minute!) so we can work it up as an alternative pathway through the lesson?

from library-shell-deprecated.

weaverbel avatar weaverbel commented on August 23, 2024

sure thing @drjwbaker - it's just a word count thing (using a loop) but it impresses people as it's so fast and people think "I could look for the number of times a politician says X in a speech' and other uses. Just in the absolute thick of prepping for Software Carpentry instructor training which concludes tomorrow afternoon and then I can look at it. I promised it to @ccronje too and am conscious of not having given it to her, but I just have really been smashed getting things done ....

from library-shell-deprecated.

weaverbel avatar weaverbel commented on August 23, 2024

@drjwbaker @ccronje
Found it on an etherpad:

For loop:

for name in "Jo" "Meg" "Amy" "Beth"; do echo $name; grep $name littlew.txt  | wc -w; done

Get the file here: 
    http://www.gutenberg.org/cache/epub/514/pg514.txt and Save As littlew.txt (or you will need to change the filename in your loop)

There would be other ways of doing this - this was just one way. It would need to be reworked if you wanted to redirect output to a file.

from library-shell-deprecated.

danmichaelo avatar danmichaelo commented on August 23, 2024

While I do think it's important to say some inspiring words about why we're learning to use the shell in the beginning, I'm afraid such a complex example might be anything but scary to many newcomers. They might even think that it's normal having to write such long commands when working in the shell! ("How can I ever remember all of this?")

Also, my experience is that participants completely new to the shell do not necessarily find the first part dull. This depends a lot on the audience of course, but for people with no or almost no experience working with any kind of command line, it can actually be quite cool and powerful just to type in any kind of command and see what happens, without having to be afraid that they destroy their computer or something. Also, it opens up a completely new way of navigating the computer without using Finder/Explorer. And finally, it's not dull when you know that this is preparing you for running all kinds of cool scripts in the future!

(not to say it's not a cool example :))

from library-shell-deprecated.

drjwbaker avatar drjwbaker commented on August 23, 2024

Okay. I'm happy to concede this one (I know, for example, that SWC dislikes similar flash bang openings). I guess I'm just keen to keep people onside who are learning cd, mv, ls, et cetera - the bit at the beginning which I'm pretty sure is boring.. - and I wondering why bother, why am I here, what am I going to get out of all this. In the other teaching I do (undergraduate history and art history) we work on the principle that you tell people the learning outcomes at the beginning, you show them where they will be at the end of the course, module, class. The opening example, then, is my attempt to do that for LC. Maybe, instead of a canonical example written into the lesson, the lesson could/should start with a prompt to the instructor to tell the audience something they did with the shell this week/month that was a) simple b) powerful c) achievable with a little learning (I also work on https://datapraxis.github.io/sourcecaster/ where we collect examples of these)

from library-shell-deprecated.

weaverbel avatar weaverbel commented on August 23, 2024

I am with @drjwbaker here. I have just taught a Software Carpentry Python class for Brisbane Resbaz and I think both shell and Python AND Git would have benefited from an initial, early 'this will save you time/make things more efficient/isn't this awesome' moment? If we are going to lead people into the promised land, we need an early sighting of some milk and honey before they start to trudge across the stony desert that is the command line to many ;-) I really think we need to inspire people about where they will end up - doing something quickly and cleverly (and easily) that they couldn't do before.

from library-shell-deprecated.

drjwbaker avatar drjwbaker commented on August 23, 2024

So as a compromise does this..

Maybe, instead of a canonical example written into the lesson, the lesson could/should start with a prompt to the instructor to tell the audience something they did with the shell this week/month that was a) simple b) powerful c) achievable with a little learning

..work for you @weaverbel?

from library-shell-deprecated.

weaverbel avatar weaverbel commented on August 23, 2024

Yes, that should be fine @drjwbaker (and I guess there is always leeway for people to do that anyway).

from library-shell-deprecated.

drjwbaker avatar drjwbaker commented on August 23, 2024

Superseded so closing.

from library-shell-deprecated.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.