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

Create mentoring.md #2366

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Create mentoring.md #2366

wants to merge 4 commits into from

Conversation

j-abed
Copy link

@j-abed j-abed commented Jan 20, 2025

Create a mentoring.md file for the python practice exercise: "Poker"

This pull request includes the creation of/ a comprehensive update to the tracks/python/exercises/poker/poker/mentoring.md file. The changes focus on explaining the key components of the poker hand evaluation code, detailing the logic and efficiency improvements, and providing a summary of the overall approach.

Key components and improvements explained:

  • Card Values: Introduced a dictionary CARD_VALUES to map card ranks to numerical values for easier comparisons.
  • Parsing Hands: Added the parse_hand function to process a poker hand, extracting sorted values and checking for a flush.
  • Checking for Straight: Implemented the is_straight function to check if card values form a consecutive sequence.
  • Ranking Hands: Detailed the rank function, which assigns a rank and relevant details to a hand using a match-case statement for different hand combinations.
  • Determining the Best Hand(s): Explained the best_poker_hands function to identify the highest-ranking hand(s) among a list of hands.

Efficiency and optimization improvements:

  • Consolidated Parsing: Combined common operations in parse_hand to improve efficiency.
  • Reduced Repetition: Reused computed values, flush, and straight checks to minimize redundant calculations.
  • **poker"

@github-actions github-actions bot added the track/python Python track label Jan 20, 2025
@IsaacG
Copy link
Member

IsaacG commented Jan 20, 2025

You may want to review other mentoring notes. This PR looks like a walk through of one specific implementation. The mentor notes are supposed to contain notes mentors can use when mentoring solutions; it is not a place to show off any one specific solution.

@j-abed
Copy link
Author

j-abed commented Jan 20, 2025 via email

@IsaacG
Copy link
Member

IsaacG commented Jan 20, 2025

The mentoring notes aren't about helping mentors solve the exercise, either :) It's fair to assume mentors already know how to solve the exercise and probably have solved it.

@j-abed j-abed marked this pull request as draft February 1, 2025 23:05
@j-abed
Copy link
Author

j-abed commented Feb 1, 2025

@IsaacG, thanks - re-created based on a sample mentoring request. Please let me know what you think

@j-abed j-abed marked this pull request as ready for review February 1, 2025 23:07
@BethanyG
Copy link
Member

BethanyG commented Feb 1, 2025

Hi @j-abed 👋🏽

Python track maintainer here.

Thanks for your work on this! As a point of reference, take a look at these mentoring notes for the high-scores practice exercise. Note that the first section is titled Mentoring, and that the first section is Problem Summary and Challenges. While mentors already know what mentoring guides are for, they might very well need a refresher on the goals of a particular exercise.

I will leave it to @IsaacG to go through more of the details as he sees fit, but here is some general feedback:

  • I suggest losing the Mentor’s Guide to Supporting Students on Poker Hand Evaluation section and adding a Problem Summary and Challenges instead.
  • Please also remove the Change Guide section. We use GitHub for that, and having a section in the doc runs the risk of it getting out of date.
  • I would also remove the numbers from sections - they're not really aligned with the style we use for mentoring notes.
  • I think at least one more "reasonable solution" is warranted here, with a rundown of how each reasonable solution "works".
  • I think that links to things like the docs for collections would be a really good addition here (in a resources section), so that mentors could copy that link(or other links) for students if needed.

Thanks again for the PR. 🙂

@j-abed
Copy link
Author

j-abed commented Feb 2, 2025

Thanks @BethanyG this is all great feedback. Allow me a bit of time to build an alternate example of the solution to poker in python and I will resubmit with these updates.

P.S. i did a quick repo search for a mentoring.md file, and it yielded a readme with the below post. That was where I had gotten the change guide section from, though i could not agree with you more re: version control. I don't know if that file is worth updating, or if its just bad luck that I grabbed a page no longer being used:

Here's an example for Ruby's Isogram.

@j-abed j-abed marked this pull request as draft February 2, 2025 01:29
additional changes based on guidance
@BethanyG
Copy link
Member

BethanyG commented Feb 2, 2025

P.S. i did a quick repo search for a mentoring.md file, and it yielded a readme with the below post. That was where I had gotten the change guide section from, though i could not agree with you more re: version control. I don't know if that file is worth updating, or if its just bad luck that I grabbed a page no longer being used:

I am not sure what the convention is on the Ruby track, you will have to ask the Ruby maintainers about what they prefer and whether or not they want to keep the the changelog section. I did a quick look at the files here for Ruby exercises, and the Ruby track does indeed have changelogs for many of the files.

The preference for the Python track is to not have a changelog section. Python's mentoring notes can be found here for Python exercises, and none have changelogs. Some are missing the Problem Summary and Challenges section and a few are missing alternate solutions, but for the most part they're fairly consistent. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track/python Python track
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants