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

Create skeleton files for exercises #87

Closed
budmc29 opened this issue Sep 7, 2017 · 13 comments
Closed

Create skeleton files for exercises #87

budmc29 opened this issue Sep 7, 2017 · 13 comments

Comments

@budmc29
Copy link
Member

budmc29 commented Sep 7, 2017

Do we need to create the code files for Bash? I see some languages have that implemented, and some don't.

Reference exercism/python@de66a31#diff-3ac5069a6087f5b553775a0720254dc1

@Smarticles101
Copy link
Member

I know on the java track we have a policy to only include skeleton files for the first like 20 exercises or so. We could potentially do something like this on the bash track, but the tests are just using testing against output of the script. I'm not sure that there's really much we could put in skeletons like method headers and such that would usually be in them on other tracks

@budmc29
Copy link
Member Author

budmc29 commented Sep 7, 2017

I was thinking about something along these lines:

#!/usr/bin/env bash

function main() {
  # Add your code here
}

main

But even just the file with the shebang should be enough.

@Smarticles101
Copy link
Member

That seems like a good idea. We could also include variables simply getting the input passed in. Thoughts @exercism/bash?

@kenden
Copy link
Contributor

kenden commented Sep 8, 2017

@Smarticles101 variables getting the input passed in, could you detail more what you're thinking about?

Also, I'd like some nice defaults included. This page has a few nice ones. At least the the set commands?

@Smarticles101
Copy link
Member

@kenden Like input="$1";

@budmc29
Copy link
Member Author

budmc29 commented Jan 2, 2018

@sjwarner-bp what is your opinion on this?

@sjwarner-bp
Copy link
Contributor

sjwarner-bp commented Jan 3, 2018

I think that this could be a good idea - but maybe only for the first few exercises?

On the Java track, they have chosen to put skeleton files in for all exercises under a '4' difficulty. I don't think this would work for us, because most of our exercises are below 4 (revamp and re-estimation of difficulty to come now the pending exercise PRs have been merged)!

I'd suggest maybe adding them just to core exercises. While it is useful for first-time users, part of learning to write in Bash is learning to do it from scratch 🙂

@budmc29
Copy link
Member Author

budmc29 commented Jan 29, 2018

Looks like we have reached an agreement and we are all in favor of adding a skeleton for the exercises, but only the first few of them.

I think that this could be a good idea - but maybe only for the first few exercises?
@sjwarner-bp

That's a very good idea, combining the both worlds. Getting the users familiar with a good script structure and they can decide to keep it and use it for the next exercises or just delete it and use whatever they like.

@budmc29 budmc29 closed this as completed Jan 29, 2018
@sjwarner-bp
Copy link
Contributor

@budmc29 which approach do you think we should go with then?

I think either of 'core' exercises or 'exercises under a 4 difficulty' could work. What do you prefer?

@budmc29
Copy link
Member Author

budmc29 commented Jan 29, 2018

All the core exercises would be too much, from what I see most users finish the first few exercises, so maybe the first 4-5.

I have a bunch of similar PR to do tonight, so I'll include this as well.

@sjwarner-bp
Copy link
Contributor

sjwarner-bp commented Jan 29, 2018

Which exercises should we put these on (maybe there should be a more strict policy, as other 'easy' tasks could be added, which would result in an inconsistent user experience)?

I've just thought of another thing related to this.

On the Java track, we had a few confused users ask where the skeleton files 'disappear to' on later exercises (i.e. they get confused when they are no longer supplied these files).

Might it be worth adding a hints.md to explain to a user how to make their own files in the exercises immediately after the skeleton file exercises?

@budmc29
Copy link
Member Author

budmc29 commented Jan 29, 2018

In that case we could either create a template for all the exercises, and the users that do not want to use it will delete the content and keep the file, or just create the hello_world.sh template and add a notice in there that it will not be supplied for the other exercises but they can copy it over.

@sjwarner-bp
Copy link
Contributor

or just create the hello_world.sh template and add a notice in there that it will not be supplied for the other exercises but they can copy it over.

I prefer this approach - it makes more sense in my opinion. We can add the notice in a .meta/hints.md which will automatically get pulled in when the README is regenerated using configlet.

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

No branches or pull requests

4 participants