Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Construct intermediate shell lesson. #126

Closed
gvwilson opened this issue Nov 2, 2013 · 16 comments
Closed

Construct intermediate shell lesson. #126

gvwilson opened this issue Nov 2, 2013 · 16 comments
Assignees
Labels

Comments

@gvwilson
Copy link
Contributor

gvwilson commented Nov 2, 2013

Construct lesson on the Unix shell for intermediates in bash/intermediate.

@wking
Copy link
Contributor

wking commented Nov 2, 2013

On Sat, Nov 02, 2013 at 09:01:17AM -0700, Greg Wilson wrote:

Construct lesson on the Unix shell for intermediates in bash/intermediate.

I've got the history of the hackerwithin shell lesson and associated
exercises in swc-modular-shell.git, swc-modular-shell-hello.git,
swc-modular-shell-hearing.git, swc-modular-shell-dictionary.git, and
swc-modular-shell-genotype.git, all of which are available from
git://tremily.us/$REPO. If you're looking for any of that for the
intermediate shell material, I can work up a pull request along the
lines of #114. Just let me know what parts you'd like to bring in.

@wking
Copy link
Contributor

wking commented Nov 9, 2013

In #93 a few hours ago:

On Sat, Nov 09, 2013 at 04:25:02AM -0800, Ethan White wrote:

On Nov 8, 2013 3:59 PM, "ACharbonneau" [email protected] wrote:

Without really knowing how you guys are planning to run the division, I
would say it belongs in shell/novice

I'm actually not clear myself on what shell/intermediate is going to
include. I think this will benefit from more conversation in a separate
issue.

This is probably a good place for shell/intermediate discussion ;).

Besides my earlier proposal to use my restructured hacker-withing
material (comment above), there are probably a number of other shell
introductions floating around in various SWC repositories. I haven't
done a full audit. If we're running out of ideas, I'd be happy just
using the novice shell lesson (#121) for intermediate programmers,
because I expect most SWC students will be novice shell users (even if
they have a bit of Python or other language under their belts). If
we're short of ideas and have time to burn on the finer details,
there's all sorts of fun stuff in the Advanced Bash-Scripting Guide
1, which I love dearly ;).

@ethanwhite
Copy link
Contributor

I'd be happy just using the novice shell lesson (#121) for intermediate programmers, because I expect most SWC students will be novice shell users (even if they have a bit of Python or other language under their belts).

I agree. It seems to me that 1) our traditional target audience was always folks with some programming experience but typically little to no background in shell, version control, etc. and 2) it's not clear to me that even if we could put together a bootcamp full of folks with decent shell backgrounds (and there are a few at every bootcamp I teach, so this might be possible) that we really want to be training folks in shell beyond the level already covered in #139. If others agree this would argue for just having a single set of shell material and #139 looks like a great start on that material to me.

@ethanwhite
Copy link
Contributor

I talked to @gvwilson about this and we came up with a list of things that would make for a good Intermediate Shell lesson:

  • ssh
  • find
  • grep
  • sed
  • job control
  • backquote expansion

Some of these are occasionally taught in Novice Shell, but not with any consistency. Thoughts about this list? Is there anything else that is used generally enough that it might be worth teaching in a couple of hours on Intermediate Shell?

@ahmadia
Copy link
Contributor

ahmadia commented Nov 22, 2013

Nice list. I'd replace backquote expansion with $() expansion, and will spend a bit more time thinking about this.

@jiffyclub
Copy link
Contributor

regex and xargs in conjunction with grep and find? Does job control cover for-loops?

@ethanwhite
Copy link
Contributor

Does job control cover for-loops?

I wasn't thinking of it that way. We often get to for-loops in the Novice lessons, which is why I didn't think to list it, but I think you're absolutely right that we should include it here. A lot of folks with a little bit of shell background haven't used them.

@ahmadia
Copy link
Contributor

ahmadia commented Nov 22, 2013

Advanced shell programming (function arguments, etc...), might be a decent capstone.

@gvwilson
Copy link
Contributor Author

On 2013-11-22 3:36 PM, Aron Ahmadia wrote:

Advanced shell programming (function arguments, etc...), might be a
decent capstone.

I'm -1 on that: by the time someone's doing functions in the shell, they
should have switched to Python or R. But I'd include tar and zip, and
some discussion of package managers.

@wking
Copy link
Contributor

wking commented Nov 22, 2013

On Fri, Nov 22, 2013 at 02:55:56PM -0800, Greg Wilson wrote:

On 2013-11-22 3:36 PM, Aron Ahmadia wrote:

Advanced shell programming (function arguments, etc...), might be
a decent capstone.

I'm -1 on that: by the time someone's doing functions in the shell,
they should have switched to Python or R. But I'd include tar and
zip, and some discussion of package managers.

That makes sense to me. You could think of “shell” as just the shell
(e.g. Bash), but it's probably better to follow POSIX and think of the
“shell” lessons as “shell and utilities” 1. A broad intro to
utilities is probably more useful than delving into the bowls of the
shell itself.

@ethanwhite
Copy link
Contributor

@gvwilson has seeded a bunch of material related to this in #221.

@gvwilson
Copy link
Contributor Author

Should GNU Parallel be included in intermediate shell?

@wking
Copy link
Contributor

wking commented Jan 15, 2014

On Tue, Jan 14, 2014 at 04:53:47PM -0800, Greg Wilson wrote:

Should GNU Parallel be included in intermediate shell?

That's the first I've heard of the project ;). Is it an alternative
to POSIX's qsub 1 for queuing jobs on a batch server? It looks like
it might just be an alternative interface for job control [2,3,4,5,6].

@ahmadia
Copy link
Contributor

ahmadia commented Jan 15, 2014

I have mixed feelings about parallel computing in the 2-day materials. Do we have something that looks like an introduction to working with remote and virtual machines yet? (SSH, OpenStack, possibly GNU Screen or tmux?)

@wking
Copy link
Contributor

wking commented Jan 15, 2014

On Tue, Jan 14, 2014 at 05:24:04PM -0800, Aron Ahmadia wrote:

Do we have something that looks like an introduction to working with
remote and virtual machines yet? (SSH, OpenStack, possibly GNU
Screen or tmux?)

I like the idea of a novice SSH lesson, but I think it should be an
independent lesson that assumes competency with novice/shell. An
intermediate SSH lesson could talk about port forwarding. I'm not
sure if SSH keys are novice or intermediate ;).

The usefulness of any remote-action command is going to depend
strongly on the student's situation. You'd want a short SSH module
that you can pull in for multi-host-heavy audiences, and skip for
single-host-heavy audiences.

@wking
Copy link
Contributor

wking commented Apr 19, 2014

I'm closing this now that intermediate shell content has landed with b4b56de (Seeding intermediate material on the bash shell, 2014-01-27).

@wking wking closed this as completed Apr 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants