Helping out on Python Track

Hi @BethanyG, @safwansamsudeen and @carlosrevespt.

I wanted to connect you all together to explore helping out on the Python track.

@BethanyG is our Python track maintainer - she does a phenomenal job of managing everything and making sure the Python language track is up to scratch!

@safwansamsudeen as promised, please do reach out and connect with Bethany.

@carlosrevespt feel free to use this post to identify ways in which to help out.

Thanks everyone!

2 Likes

Thanks, Jonathan!

I’m glad to say that finally merged an approach for an exercise just today!

I think I’ll start work on another one - is Secret Handshake OK (it seems to be free according to the sheet)?

1 Like

@safwansamsudeen - It is free! :smile: Just be warned that Python altered the input data 2 years ago - so some community solutions are no longer accurate and the exercise has an instruction append.

I haven’t looked at it in a while, but I think it might also benefit from a hints.md file and perhaps some mentor notes as well.

1 Like

Going to park this here, as it was discussed in another thread about contributing to the Python track.

This Sheet has one tab that shows exercises that don’t have approaches being worked on, the other shows exercises that don’t have mentor notes being worked on.

Where an exercise name appears, that is an existing or being-worked-on approach/mentor note.

Since I have to review these (and there may be others who also want to work on them) - I’d prefer if you limited yourself to 1-3 at a time for reserving/submitting PRs.

2 Likes

@BethanyG actually I’ll start off with Sublist, and then do Secret Handshake.

1 Like

I checked out Secret Handshake, and I think I’ll try simpler exercises where I could do a better job before trying out something more complex (I’m bad at the binary shift thing).

As I see it, the Protein Translation exercise has neither mentoring notes nor approaches - but the sheet says it only needs mentoring notes. Am I misreading the sheet - I don’t fully understand the classification anyway - or should this be updated?

1 Like

@safwansamsudeen - the sheet shows exercises that no one is yet working on. It isn’t a record of what is published - we’ve got more approaches in process than what is live on the site.

It should be more or less up-to-date as of this weekend… although it sounds like you no longer want to work on Secret Handshake and/or Sublist? :slight_smile: If not, I will update.

The reason Protein Translation is not on the approaches list is because I have a draft in process that I’ve not yet pushed. However, I don’t have any mentor notes in process, so if you feel like you want to take those on for the exercise, please feel free.

1 Like

I don’t know why this is just occurring to me now (I can be sorta dumb about these things) – but we can also create video explainers or video walk-throughs of exercises and/or approaches. So @safwansamsudeen, if that sounds exciting or fun for you to do, that is an option for the approaches that you’ve written up (or for other approaches or exercises that you do).

@jonathanmiddleton - Apologies for the ping, but I can’t remember the details on how we make this happen. Do we have a doc written up about how to go about it?

OMG I am a real idiot today! :scream: There is a link on the site:

Sounds scary but fun at the same time!

I’ll give it a shot for Sublist whatever exercise you think is relatively simple exercise and would benefit from such a video (high number of iterations, low passed:total attempts ratio, or whatever you use to gauge this).

Ah, my bad.

I’d already published Sublist by then, so I didn’t mention it here.

OK, got it. I think I’ll work on approaches right now, more confident with those. I’ll do Secret Handshake next. Sorry for the late notification, I forgot to reply.

A separate question: there exists a document explaining recursion in Python. The breadcrumbs say that it’s part of the Syllabus, but I can’t get to it from the syllabus page. Is this because there are no exercises linked to it?

If so, I realize you said that creating an exercise is tough for you to review, but I’d like to give it a shot. I just wrote the story for Pizza Order (a recursion exercise) in JS, and while I get that writing the story and writing a whole exercise is very different, I’d still like to try, particularly as I have a week of holiday coming up.

What I thought was that I write an exercise using what you’ve said as a resource, and you give it a glance. If you think it’ll take a lot of time to review, we can forget about it for now and maybe return when the CC pause lifts. It’s not a problem either way, because the learning potential is primarily in writing the exercise itself, and that’s what I’m interested in.

What do you say?

EDIT: it seems recursion does have an exercise, Pascals Triangle, but it’s marked as medium. I’d say an easy exercise would be beneficial to introduce a notoriously confusing bit of programming, but will drop the claim if you disagree :slight_smile: . Still, why isn’t it shown in the syllabus?

That was a concept writeup that Bobahop did. There is no associated concept exercise, so that’s why it doesn’t show up on the syllabus tree. You’ll find another one Bindary-Octal-Hexadecimal that Meatball did that doesn’t (yet) have an exercise.

I am going to have to say no.

Recursion as a concept is not currently in our plan for the Syllabus. Its more a general CS topic than it is a concept for Python Fluency (especially with the lack of tail-call optimization and Python’s recursion limits). While we do have Pascal's Triangle, we don’t have plans at the moment for a recursion concept exercise.

Concepts + their associated exercises are … a LOT … so I really don’t want to go through the onboarding and reviewing process for writing one at this time.

I might be convinced if you are willing to read through all the documentation and track requirements and pick up an exercise that’s on the “critical path” – say dict methods, string-formatting (which were started by contributors but not finished) or something like datetime (newly added). But I am pretty reticent.

Speaking of datetime - we do have a need for more practice exercises around dates/time/and calendars (see meetup and clock for existing examples) - not just on the Python track, but in general. See this post and this one in problem specs.

Oh. But how do users get to and use it, then?

That makes sense, OK.

Any specific links to an exercise on dict-methods (which sounds interesting to me), or can I come up with a story on my own?

Or if you feel concept exercises are too tough too start out with, I can implement Global Meetup - should I submit a PR to problem-specs, or shall we start out by making it a Python-only exercise?

TL;DR - Either option works, but I really would caution you to read through the docs on concept exercises, so you understand all of the details. There is a lot, and we also have some particular rules with how tests are written, what topics are covered, and what syntax to use.

Checking again, I see that the concept docs have at least been written for dict-methods, but I am not seeing an exercise start in the repo – so I might be wrong there. Let me dig a bit. I will link anything I find here.

You can totally come up with a story if you’d like. :smile: I know some folx like to pull from Shared Exercise Stories or other tracks – I have a preference for creating new stories or exercises (and you get a badge for creating an exercise story). Also - many of the dictionary related stories use High Scores – but we’ve implemented that as a practice exercise, so can’t reuse it for a concept exercise. Although we can use the scoring scenario - but it needs to then have a different focus than that practice exercise does.

The exercise on dicts uses a basic story of keeping inventory, and I wouldn’t be opposed to extending or riffing on that or any other similar-type tasks. Other ideas that I’ve had in the past include:

  • “Explosion at the Paint Factory” (I use color names and hex values in the concept docs), where you need to re-arrange or create different colors sets from chaos.
  • “Paint by Numbers” where you need to figure out which colors should be packed with which paint-by-numbers painting in a box for sale.
  • “Coloring Book Conundrum” - which is essentially the same thing - you are an app developer (or coloring book author) that needs to assign color palettes to different coloring book/app pictures.
  • “Webmaster Woes” where you need to figure out which hex values to use on a website, but the product manager has given you a list of seemingly random color names.
  • “Recipe Recon” or “Menu Maven” where you create a Menu from different dishes that require different ingredients (see Cater Waiter for easy pre-assembled data/ideas).

Again - only random ideas, and you can come up with your own. But you do need to cover specific dict-methods, and also have a limited set of tasks and allowable syntax - but I will let you read through the docs for the requirement details.


Global Meetup (I think) would be met with great enthusiasm by Erik. My suggestion would be to create the exercise in Python track at first, and we can go through it and test it out.

Once we have good tests and data, you can then draft up a PR to problem specs. It will take a bit to go through that and make it generalizable cross-track and get all the syntax and everything nailed down (and three maintainers approving).

Test cases may also change. Once that process is complete, we can double back and adjust the Python exercise accordingly. If you are not completely terrorized by that whole process, you can tackle making a Python test generation template for it (or not!) :wink:

Since I’d like to avoid the recent furor that has taken place in problem specs, I’d also suggest making a comment in the Global Meetup issue on problem specs laying out that you are going to implement the exercise for Python and then PR to prob-specs.

WHEW!! Let me know if that all makes sense, and if you have further questions or issues.

OMG that was detailed. Thanks!

I like the ideas for dict-methods, but Global Meetup sounds even better. I’ll get started on that - I’m assuming it’s a practice exercise.

For now, you can free the Secret Handshake approach, if you’d like.

I don’t know what you’re referring to, but sure, and thanks for the opportunity!

Yup! Global Meetup would be a practice exercise. :smile: Feel free to open an issue on the Python repo as a holding bin for questions and ideas, or ping me if you have questions or issues.

Edited to add: Forgot to say that I’ll update the approaches doc. Meatball and I will work the dict-methods concept exercise for now.

@BethanyG as previously mentioned, I can’t get the tooling right: that is, I can’t install the requirements.

The conflict is caused by:
    The user requested astroid<=2.12.0
    pylint 2.17.4 depends on astroid<=2.17.0-dev0 and >=2.15.4
    The user requested astroid<=2.12.0
    pylint 2.17.3 depends on astroid<=2.17.0-dev0 and >=2.15.4
    The user requested astroid<=2.12.0
    pylint 2.17.2 depends on astroid<=2.17.0-dev0 and >=2.15.2
    The user requested astroid<=2.12.0
    pylint 2.17.1 depends on astroid<=2.17.0-dev0 and >=2.15.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

When I use venv… but I normally use pipenv - I assume that’s fine? That too doesn’t work, raising a RuntimeError: Failed to lock Pipfile.lock! error.

@safwansamsudeen could you please open an issue on the repo? I will take a look in the morning. Thanks.

@BethanyG, bagging the Robot Name approach for now, as we work through the exercise. I’m quite free this week, so I’ll submit, but feel free to review as you have time. (I really mean it, please don’t feel bad if you take a week or two).

@BethanyG Next: Nth Prime and Atbash cipher. That’ll be it for now :slightly_smiling_face:.

@BethanyG If no one else has reserved them, I’ll take up Flatten Array, Secret Handshake, and Difference of Squares.