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

Suggest changing list example to string example in 02-loops.md, sect… #414

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

wpk-nist-gov
Copy link
Contributor

@wpk-nist-gov wpk-nist-gov commented Oct 4, 2017

Suggest changing list example to string example in 02-loops.md, section "What's in a name"

The original 02-loop section "What's in a name" uses an example using a for loop over a list.
As lists aren't introduced until section 03-lists, I suggest changing this example to a loop over
a string. Note that there is an excercise "Computing the Value of a Polynomial" in 02-loops that also
uses a list, that may be moved to 03-lists as well.

…on "What's in a name"

The original 02-loops section "What's in a name" uses an example using a for loop over a list.
As lists aren't introduced until section 03-lists, I suggest changing this example to a loop over
a string.  Note that there is an excercise "Computing the Value of a Polynomial" in 02-loops that also
uses a list, that may be moved to 03-lists as well.
@tbekolay
Copy link
Contributor

tbekolay commented Oct 4, 2017

Hm. So, the PR as it is now doesn't make much sense because the callout in which the example resides explicitly talks about how you can loop over a list just as you can a string -- looping over the string 'oxygen' is already done earlier in this episode, so doing it a second time doesn't seem to add much.

You could argue that the callout should therefore be moved from this episode to 03-lists. I think that would be okay, but it doesn't flow as well as it does here. I'm okay with moving it if it can still flow well in the other episode, but that will require some thought about where to put it and how to transition to it.

While I agree that the ideal case is that we do not use something that has not yet been introduced, I feel that we can be a little more relaxed on that ideal within callouts. I do not think of callouts as being core elements of each episode; I might not say them out loud when teaching. I see them as useful tidbits of extra information or additional context. Given that interpretation, I'm okay with the callout referencing something that will be more fully introduced in a later episode, assuming that the example is not super confusing without the introduction. In this case, I think it's relatively easy to see what's going on, but like I said, if the consensus agrees that this is confusing then I would support moving it to episode 03-lists.

Fixed text to reflect code change
@wpk-nist-gov
Copy link
Contributor Author

Sorry, I failed to change the text above the first example in the callout. I fixed this.

Right now, the callout introduces two ideas:

  1. looping over lists pulls out items of the list
  2. the name of the the loop variable is up to the user.

I'd argue that (2) is the important point in this section. (1) is introduced at the beginning of 03-lists already.

@tbekolay
Copy link
Contributor

tbekolay commented Oct 4, 2017

Right you are, I like shortening this callout. Merging now, thanks!

@tbekolay tbekolay merged commit 792ddb9 into swcarpentry:gh-pages Oct 4, 2017
@wpk-nist-gov
Copy link
Contributor Author

Thank you!

@wpk-nist-gov wpk-nist-gov deleted the wpk_edits branch October 4, 2017 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants