-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
stub_template #369
Conversation
It might be better for me to call it |
I agree it shouldn't be example, since it is actively the thing to be delivered... I think |
Changed. I'd like to make sure everyone has a chance to review the contents. |
3 approvals before merge, please. |
The stub comments would be a good place to link to the style guide and perhaps other docs sites |
_template/exercise_stub
Outdated
# 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 |
There was a problem hiding this comment.
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."
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 *** |
There was a problem hiding this comment.
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 "$@"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
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?
@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 |
If I make all of the changes that I just commented, then this stub should be under 25 lines. I'm not worried about us. I'm sure most of us would just |
I'll go ahead and put up the shorter version. If you all want this version we can just revert it. |
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. |
@kotp okay, so I will remove the link. |
I replaced the link with a reference to their local copy of the |
Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
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