Giter Club home page Giter Club logo

Comments (10)

glennj avatar glennj commented on June 26, 2024 1

Hmm, maybe a refactoring-type exercise, where they're given a script loaded with bashisms and they need to make it POSIXy

from bash.

IsaacG avatar IsaacG commented on June 26, 2024 1

I feel like that's out of place on a bash track. This track is about the bash shell. We should be helping students learn bash, including all it's features. Having an exercise where students are then supposed to not use all the features and make their script work for a very different environment feels ... jarring?

If a student wants to write POSIX sh, they can simply set POSIXLY_CORRECT and do so. I don't think other students should be asked to do so as part of solving exercises on the bash track.

from bash.

glennj avatar glennj commented on June 26, 2024

I didn't mean to assign, I meant to tag: @IsaacG @kotp @guygastineau

from bash.

kotp avatar kotp commented on June 26, 2024

How would we ensure that the tests are passable given the different potential different sh'bang? Would there be a list of "target" shells?

from bash.

glennj avatar glennj commented on June 26, 2024

good point.

from bash.

IsaacG avatar IsaacG commented on June 26, 2024

I'm in favor of keeping this a bash track.

  • Some of these exercises are painful using POSIX sh.
  • If this is generic "shell of your choice", it'd be weird to have some students trying to use zsh when mentors might not be familiar. Or ksh and csh. Those are all different languages and not bash.

If a student wants to write POSIX sh and the mentor is comfortable with sh, then that's cool. But I don't think we should be going out of our way to make that the easy route.

from bash.

kotp avatar kotp commented on June 26, 2024

And the difference between invoking via bash or sh, using source and making executables is very much something that can be taught about bash shells.

from bash.

glennj avatar glennj commented on June 26, 2024

I appreciate the feedback. Closing this issue.

from bash.

kotp avatar kotp commented on June 26, 2024

There could be an exercise specifically about "portable code" and with only one or two exercises, the idea of making it executable, and writing it so that it can be loaded / sourced as a non-clobbering function. Or notes added about portability, and what approaches are POSIX and what may cause problems with different platforms and tooling.

from bash.

kotp avatar kotp commented on June 26, 2024

I am definitely one for "go where the student wants to go" as it is their learning journey. And this is one way to do that. If the student asks "But what about portability?" then they can go down that path.

from bash.

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.