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

Swapping the order of episodes on lists and loops #496

Open
maxim-belkin opened this issue Apr 12, 2018 · 18 comments
Open

Swapping the order of episodes on lists and loops #496

maxim-belkin opened this issue Apr 12, 2018 · 18 comments

Comments

@maxim-belkin
Copy link
Contributor

@maxim-belkin maxim-belkin commented Apr 12, 2018

It has been decided (see #453) that lists should be introduced before loops.

Because this change might take some time to implement, it was decided to first pursue this effort in a separate branch and later merge this branch into the main gh-pages branch.

This special branch has been created and is called lists-loops. We, therefore, ask anyone who is interested in contributing to this effort to submit Pull Requests against this lists-loops branch.

How to contribute

Start by fetching and checking out the lists-loops branch into your current repository

git fetch https://github.com/swcarpentry/python-novice-inflammation.git lists-loops
git checkout lists-loops

Now, you can start working on it as usual:

git checkout -b my-changes lists-loops
# ... make changes...
git add -u
git commit
git push <your-fork>

... and submit a PR! When you submit a pull request related to swapping the order of episodes on loops and lists, make sure to select lists-loops branch of this repository as the base branch.

That's it!

We hope to see your Pull Request soon!

@bhickson
Copy link

@bhickson bhickson commented Aug 8, 2018

@maxim-belkin
For a carpentries lesson this last February I did some reorg and partial rewrite of the python lesson into Jupyter notebooks that follows this idea. Basically introducing variables, data types, structures, statements, conditionals, loops, etc in that order. Would this order be worth considering for this issue/branch?

https://github.com/UA-Carpentries-Workshops/2018-02-10-Tucson/blob/master/python_lessons/01%20-%20Introduction%20to%20Programming%20with%20Python.ipynb

If so, I'd be happy bring them back out of the notebook to the branch.

@maxim-belkin
Copy link
Contributor Author

@maxim-belkin maxim-belkin commented Aug 13, 2018

@bhickson, thanks for offering your help! The notebook you reference has changes that might be appropriate for both branches (gh-pages and lists-loops) so please feel free to suggest your changes via pull requests.

@kekoziar
Copy link
Contributor

@kekoziar kekoziar commented Mar 15, 2019

@maxim-belkin Is there anything else that needs to be worked on for this branch?

@biokcb
Copy link

@biokcb biokcb commented Apr 5, 2019

Hi, I looked over the changes in these lessons a bit. I agree that it makes sense to introduce lists before loops and the transition to looping is a lot clearer now. However, around line 195 in 03-loop.md it jumps straight into iterating over the characters in a string again, without mentioning that characters in a string can be accessed by indexing like we've done with lists. The old lesson had this in it to provide some context. It does explain later that "vowel" will refer to each character, but it might be worth mentioning that you can access string characters by index as well before jumping into this loop. Alternatively, removing the iteration over strings altogether might be a good idea as well so as to not introduce too many new ideas at once.

@maxim-belkin
Copy link
Contributor Author

@maxim-belkin maxim-belkin commented Apr 5, 2019

Thanks, Kristen. I agree that jumping from iterating over lists to iterating over strings might be a bit odd (heh). If you'd like to propose any changes with a pull request -- that would be very much appreciated.

@kekoziar, apologies for not replying to your question but in order to answer it I have to re-read the first 3 episodes together and I wasn't able to find time for this exercise yet...

@kekoziar
Copy link
Contributor

@kekoziar kekoziar commented Apr 5, 2019

I also welcome any clarifications for that section. I agree it's a little clunky. While strings can be read using index notation, they can't be accessed using read/write like lists. I usually note when teaching the loop examples that use strings that while characters in strings can be read using index notation, there are other, faster, more powerful methods for working with strings.

@biokcb
Copy link

@biokcb biokcb commented Apr 5, 2019

@kekoziar Yeah, explaining that strings can be treated similarly to lists in some ways, but not all might be too confusing at this stage. I'm leaning toward just not introducing this string iteration concept at all, thoughts?

I can certainly make some proposed changes via a pull request! I can work on this sometime tomorrow and will tag you both for feedback if that's ok.

@bhickson
Copy link

@bhickson bhickson commented Apr 5, 2019

@ewinge
Copy link

@ewinge ewinge commented Sep 1, 2020

Is anyone working on this issue? In my opinion, this should be a priority. Iterating over the characters in a string is obscure for an introductory course.
Unfortunately, the lists-loops branch has fallen behind.

@ldko
Copy link
Contributor

@ldko ldko commented Sep 2, 2020

Hi Erik, as far as I know, no one is actively working on this. If you would like to take it up (i.e. getting the branch up-to-date, resolving any conflicts, checking for references that no long make sense, etc.), please do! Thank you!

maxim-belkin pushed a commit that referenced this issue Oct 23, 2020
@ewinge
Copy link

@ewinge ewinge commented Dec 19, 2020

Hi, I have made PR #896, please have a look:
https://ewinge.github.io/python-novice-inflammation/

@biokcb
Copy link

@biokcb biokcb commented Dec 19, 2020

Hi @ewinge - thanks for pushing these changes up! I hadn't kept up with the progress of my changes in the list-loops branch being taken to main. Out of curiosity are you pulling in the list-loops branch or did you just re-write it? I'm just wondering if there was something wrong with the changes I made/how I rewrote it?

@biokcb
Copy link

@biokcb biokcb commented Dec 19, 2020

For context @ewinge @maxim-belkin: I was waiting for someone to want to merge my changes into the main branch (seems to have fallen off the radar and now the branch is out-of-date), we worked in the list-loops branch since it was a major change. Would you mind if we tried to update the list-loops branch instead as @ldko mentioned? I'm kind of sad now that my changes won't get merged and was busy at the time this first got pinged again...

@ewinge
Copy link

@ewinge ewinge commented Dec 19, 2020

Hi @biokcb, the list-loops branch had fallen behind, so it was easier to start from scratch.
I don’t really care who’s PR gets merged.
Edit: I just hope this issue gets resolved whichever way :)

@biokcb
Copy link

@biokcb biokcb commented Dec 19, 2020

Hi @ewinge I agree it would be nice to have the lesson finally implement this change in the gh-pages branch. I didn't realize it wasn't til I saw this email.

I don’t really care who’s PR gets merged. However, this issue will soon have been open for three years.
Isn’t it time to get it resolved?

I feel like this comment is a bit hostile and unnecessary. I only mentioned my feelings on it for context behind my request for it since I don't have an official role on the repository. In the original issue statement from @maxim-belkin it specifically asks to work in the list-loops branch & make any pull requests against that branch, where others made PRs that were merged. I mentioned the context to reiterate this point and imagine that's why @ldko mentioned it too, but I am not trying to enforce anything. I just wanted to ask in case we could update it this way or just if you'd even consider it. I apologize if it came off as an annoying request, but no need to be rude about it. I understand it is easier to work in gh-pages due to the number of updates that have not been kept in list-loops and it would have taken a little more time to update the branch so a simple "no, I think it is quicker/better this way because of the number of commits to merge" would have sufficed.

@ewinge
Copy link

@ewinge ewinge commented Dec 19, 2020

Hi @biokcb, I apologize, it was not my intention to be rude :)

@maxim-belkin
Copy link
Contributor Author

@maxim-belkin maxim-belkin commented Dec 22, 2020

Hi @biokcb and @ewinge.
Yes, it did fell off my radar for a number of reasons -- my apologies. Let's proceed with the fastest approach, which I think is to:

  1. Update the lists-loops branch with the changes from gh-pages (this might require a rebase or a merge). This is necessary because we split the first episode into three about a year ago. This will preserve all contributions to the lists-loops branch.
  2. (In case of a rebase in step 1): Force-push the updated lists-loops branch. Because of this, all contributors who have previously checked out the lists-loops branch locally would have to hard-reset their local lists-loops branch like so:
    git fetch origin lists-loops 
    git checkout lists-loops
    git reset --hard origin/lists-loops
    
  3. After that we can review the changes remaining in #896 that still apply. But as @biokcb said, it has to be submitted against the lists-loops branch because we'd have to announce this change on our mailing list before merging it into gh-pages.

Thanks all for your patience!

@maxim-belkin
Copy link
Contributor Author

@maxim-belkin maxim-belkin commented Apr 7, 2021

I've rebased the lists-loops branch on top of gh-pages and opened a pull request (#926). We need to double check everything and, when things look good, announce the change on The Carpentries' Discuss channel. Right now I see one issue there -- the sentence that begins with In the first episode, we wrote Python code that has to be updated to reflect the fact that the first episode was split into three.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Lists-Loops
  
To do
Codename "Py"
  
In progress
Linked pull requests

Successfully merging a pull request may close this issue.

8 participants