Skip to content

[List Ops]: clarity about what operations we are permitted to use #3154

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

Closed
scmbradley opened this issue Aug 6, 2022 · 9 comments
Closed

Comments

@scmbradley
Copy link

The instructions ask us to implement map, filter etc "without using existing functions.". But what does that mean? For example, append can simply be return list1+list2 but that seems like cheating, and not in the spirit of the exercise. But which resources are we permitted to draw on and which not? It's not very clear what counts as a reasonable solution and what solutions are just cheating.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2022

🤖   🤖

Hi! 👋🏽 👋 Welcome to the Exercism Python Repo!

Thank you for opening an issue! 🐍  🌈 ✨


  •   If you are requesting support, we will be along shortly to help. (generally within 72 hours, often more quickly).
  •   Found a problem with tests, exercises or something else??  🎉
      ◦ We'll take a look as soon as we can & identify what work is needed to fix it. (generally within 72 hours).

​          ◦ If you'd also like to make a PR to fix the issue, please have a quick look at the Pull Requests doc.
             We  💙  PRs that follow our Exercism & Track contributing guidelines!

  •   Here because of an obvious (and small set of) spelling, grammar, or punctuation issues with one exercise,
      concept, or Python document?? 🌟 Please feel free to submit a PR, linking to this issue. 🎉
    ‼️  Please Do Not ‼️

    ​        ❗ Run checks on the whole repo & submit a bunch of PRs.
                  This creates longer review cycles & exhausts reviewers energy & time.
                  It may also conflict with ongoing changes from other contributors.
    ​        ❗ Insert only blank lines, make a closing bracket drop to the next line, change a word
                  to a synonym without obvious reason, or add trailing space that's not an EOL for the very end of text files.
            ❗ Introduce arbitrary changes "just to change things" .

            ...These sorts of things are not considered helpful, and will likely be closed by reviewers.

  • For anything complicated or ambiguous, let's discuss things -- we will likely welcome a PR from you.
  • Here to suggest a feature or new exercise?? Hooray! Please keep in mind Chesterton's Fence.
    Thoughtful suggestions will likely result faster & more enthusiastic responses from maintainers.

💛  💙  While you are here... If you decide to help out with other open issues, you have our gratitude 🙌 🙌🏽.
Anything tagged with [help wanted] and without [Claimed] is up for grabs.
Comment on the issue and we will reserve it for you. 🌈 ✨

@bobahop
Copy link
Member

bobahop commented Aug 6, 2022

It means to implement them without using the built-in functions. Some of those functions are described here. Other than that, use what makes sense to you. If the solution passes all the tests, and you'd like feedback, you can request mentoring.

@bobahop
Copy link
Member

bobahop commented Aug 6, 2022

Of course, you may use other built-in functions: just not the ones that are essentially equivalent. For instance, "how would I get the length if the len() function were not available to me?" That would involve using a function other than len(); most likely something that would count up the elements of whatever you're getting the length of.

@BethanyG BethanyG changed the title List Ops: clarity about what operations we are permitted to use [List Ops]: clarity about what operations we are permitted to use Aug 6, 2022
@scmbradley
Copy link
Author

Thanks for the replies, but I think there still needs to be more clarity on what we can and can't use. For example, appendcan be implemented just with list1+list2: is that permitted? reverseis just input_list[::-1]is that OK? Are we allowed to use range? What about list methods like append? What about list comprehension? That makes some of the functions trivial to implement...

There's maybe no hard and fast rules about what list of operations are "basic" or whatever, but it might help to have a bit more guidance.

@bobahop
Copy link
Member

bobahop commented Aug 7, 2022

Thank you for the level of conscientiousness you're bringing to this.

What is "allowed" is real constrained by only two things.

What passes the tests is what is "allowed" by Exercism.

What level of challenge to accept is what is "allowed" by yourself.

So, even if map and filter were used here, Exercism would "allow" it.

But if you feel you don't learn enough by doing that, then try to figure out another way.

The direction to not use map and filter is really a suggestion for yourself. Exercism only requires that the tests pass.

Also, you should know that the instructions are inherited from the problem-specifications repository, from which all language tracks derive. So, if this response leaves something you still want to address, you may want to open an issue at that level. If you do, please let us know so we can close this language-specific issue.

Thanks!

@scmbradley
Copy link
Author

Happy to give something back, I've learned a lot from exercism.

I think the point about setting your own level of challenge is a helpful one, and perhaps we should say something like that in the instructions.

I think the issue is that python is a very expressive language, and this exercise is actually very easy if you can use python's slicing and list comprehension constructs. Perhaps the instructions could say: "for an additional challenge, try completing the exercise using only the following methods and functions..." I don't really have a specific idea about which subset of functions would make this exercise interestingly challenging (but doable), but I thought it was worth opening up a discussion about it.

@bobahop
Copy link
Member

bobahop commented Aug 7, 2022

Setting one's one level of challenge applies to all exercises, so a place to make that more clear may be in the Getting Started doc for Exercism.

An issue with suggesting specific functions to solve an exercise is that Exercism doesn't want to give away a solution. It is up to the student to explore what approaches are available and to implement what they choose to pass the tests. After that, if the student would like to "know what they don't know" they can look at community solutions or request mentoring.

@BethanyG
Copy link
Member

Hi @scmbradley 👋🏽

Just chiming in here to say that since we've re-ordered the track, we have had a few questions on this particular exercise. See #3142, #3141, and the related #2078 in problem-specifications. It is probably due for a little going over/revising.

As discussed in #2078, there are several avenues we could take in clarifying/filling out this exercise:

  1. An instruction append, along the lines of this exercise -- not that we have to be that imperative, but we can add a few instructions/variations. As @bobahop noted in his replies, we probably don't want to do anything that might "give away" a specific solution, but we could always suggest/encourage thinking about certain modules, approaches, or functions in a hinty sort of way.
  2. A hints.md file, similar to the one for this exercise. I especially like the opening paragraph that reminds the student that there are multiple paths/strategies. We might outline useful groups of functions or modules at different "levels" of difficulty. Again, these would probably be in the form of questions like "how might x help you to not use the + operator here??" or "could y help you out with this?"
  3. A set of mentor notes (see the website-copy repo for examples for Python). In the mentor notes, we could encourage mentors to nudge students to challenge themselves with one or more variations on the exercise.
  4. Some additional Python-specfic tests that nudge a student in a particular direction. We'd want to be careful to not fish for a specific implementation, so this approach might be limited.

We'd welcome PRs connected to any of the above, and we'd be happy to help you through the PR process, if you'd like to take on any of the work. Since we've gotten multiple sets of feedback on this exercise, I was thinking of consolidating the comments into one issue for tracking purposes.

Let us know if you'd like to take a shot at improving this exercise, and I can assign the consolidated issue to you!

@BethanyG
Copy link
Member

@scmbradley - closing this in favor of the tracking issue. Please comment there if you would like to work on it and submit a PR. Many thanks for filing this!

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

No branches or pull requests

3 participants