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

stub_template #369

Merged
merged 8 commits into from
Aug 4, 2019
Merged

stub_template #369

merged 8 commits into from
Aug 4, 2019

Conversation

guygastineau
Copy link
Contributor

@guygastineau guygastineau commented Aug 3, 2019

I moved /_template/example.sh to the less ambiguous /_template/stub_template.

I rewrote it, and I removed what I considered to be bad advice (the set options).

Please let me know what you think everyone. The name is kind of redundant, so we could make it stub if you all want.

This is related #365, but it will not close it.


Reviewer Resources:

Track Policies

@guygastineau
Copy link
Contributor Author

@kotp @glennj @IsaacG

@guygastineau guygastineau added the exercise peripherals things that accompany the tests label Aug 3, 2019
@guygastineau
Copy link
Contributor Author

It might be better for me to call it exercise_stub. I'll just wait for feedback from you all.

@kotp
Copy link
Member

kotp commented Aug 3, 2019

I agree it shouldn't be example, since it is actively the thing to be delivered... I think exercise_stub is preferred, it shows the intent via the file name.

@guygastineau
Copy link
Contributor Author

Changed.

I'd like to make sure everyone has a chance to review the contents.

@kotp
Copy link
Member

kotp commented Aug 3, 2019

3 approvals before merge, please.

@glennj
Copy link
Contributor

glennj commented Aug 3, 2019

The stub comments would be a good place to link to the style guide and perhaps other docs sites

_template/exercise_stub Outdated Show resolved Hide resolved
# The following information should help you get started:
# - Bash is flexible. You may use functions or write a raw script
#
# - Keep in mind that more complex solutions will benefit greatly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence took me a few moments to parse. Maybe simplify it.

eg "Sometimes complex code can be made much more readable by breaking it up into functions."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will work out a revision.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better now?

# # this calls main with all of the positional arguments
# main "$@"
#
# *** REMOVE THIS STUB BEFORE SUBMITTING YOUR SOLUTION FOR MENTORING ***
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move the general guidance into the bash template that shows up on the exercise description and make the stub a lot more ... stub-like? Short, sweet and simple without a repetitive wall of text that need to delete every exercise?

#!/usr/bin/env bash

main () {
  # your code here
}

main "$@"

Copy link
Contributor Author

@guygastineau guygastineau Aug 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can work on that.

With our current testing set up I don't want the student to feel pressured into using functions. That is why I commented the whole thing.

Copy link
Contributor Author

@guygastineau guygastineau Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we move to a library testing model for our exercises, then all of these will change. Then our stubs will simply give the skeleton of the API that our lib needs, and these stubs will be irrelevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we would still need to use a message telling students to delete the stub comments no matter how short the stub is.

In the example you give above at least 2 in 10 people will leave the # your code here line in their file.

Copy link
Contributor Author

@guygastineau guygastineau Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to be clear, @IsaacG, that your suggestion here is ideal. Once #366 is resolved the stubs won't be throw away anymore.

I am mostly trying to satisfy #365 in the meantime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trimmed out some of the verbosity ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 24 lines make you feel better about this than 32?

@guygastineau
Copy link
Contributor Author

guygastineau commented Aug 4, 2019

@glennj I think that is a decent idea, but as Isaac points out we also don't want the stub to be crazy long.

There might be enough space for one link, but ultimately for anyone who knows what is going on this stub is just throw away.

I think that in the end the Readme file is the best place for these resource links to go. The README.md is also an actual md file, so links seem more appropriate there to me.

_template/exercise_stub Outdated Show resolved Hide resolved
_template/exercise_stub Outdated Show resolved Hide resolved
_template/exercise_stub Outdated Show resolved Hide resolved
@guygastineau
Copy link
Contributor Author

If I make all of the changes that I just commented, then this stub should be under 25 lines.
I think that is important, so that students can just select it all in one go and delete it even with default terminal height.

I'm not worried about us. I'm sure most of us would just j -> V -> G -> x 😈

@guygastineau
Copy link
Contributor Author

I'll go ahead and put up the shorter version. If you all want this version we can just revert it.

@guygastineau
Copy link
Contributor Author

@glennj @IsaacG let me know if you guys feel comfortable with this latest commit as a compromise.
It also wont be forever.

_template/exercise_stub Outdated Show resolved Hide resolved
@kotp
Copy link
Member

kotp commented Aug 4, 2019

@glennj I think that is a decent idea, but as Isaac points out we also don't want the stub to be crazy long.

There might be enough space for one link, but ultimately for anyone who knows what is going on this stub is just throw away.

I think that in the end the Readme file is the best place for these resource links to go. The README.md is also an actual md file, so links seem more appropriate there to me.

No links in the stub file, but a reference to the README file, where there can be links instead. Yes! to "as concise and clear as possible" from me.

@guygastineau
Copy link
Contributor Author

@kotp okay, so I will remove the link.

@guygastineau
Copy link
Contributor Author

guygastineau commented Aug 4, 2019

No links in the stub file, but a reference to the README file, where the can be links instead. Yes! to "as concise and clear as possible" from me.

I replaced the link with a reference to their local copy of the README.md. I used Bash as a proper noun again.

_template/exercise_stub Outdated Show resolved Hide resolved
@IsaacG
Copy link
Member

IsaacG commented Aug 4, 2019

Looks good to me.

Copy link
Contributor

@glennj glennj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@guygastineau guygastineau merged commit d4af53f into exercism:master Aug 4, 2019
@guygastineau guygastineau deleted the stub-template branch August 4, 2019 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exercise peripherals things that accompany the tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants