Skip to content

Exercise asks developer to write a function #2396

Closed

Description

@kotp

Having an exercise direct a student to write a function or write a
method or write "some specific structure" can be confusing when the
language they are solving the exercise in does not have that structure.

Where we say things like "Create a function" or "Write a function" we
could be indicating that we need a solution instead. This will
encourage the student to determine what that solution is,
rather than us telling them to specifically create a function.

Unless the exercise is a concept exercise about functions, of course,
then the student should be told to create a function.

The exercises that mention "create a function" are:

  • exercises/parallel-letter-frequency/description.md

And the exercises that mention "Write a function" are:

  • exercises/sublist/metadata.toml
  • exercises/flatten-array/description.md
  • exercises/nucleotide-codons/metadata.toml
  • exercises/nucleotide-codons/description.md
  • exercises/alphametics/metadata.toml
  • exercises/alphametics/description.md
  • exercises/go-counting/description.md
  • exercises/darts/description.md
  • exercises/darts/metadata.toml

ref: exercism/ruby#1638-comment

Activity

  1. glaxxie commented on Mar 3, 2024

    @glaxxie
    Contributor

    I accidentally clicked on the checkbox, I apologize if it triggers anything.

  2. BNAndras commented on Mar 3, 2024

    @BNAndras
    Member

    Sigh. I didn’t mean to close the issue. Stupid thumbs on a small screen.

  3. jiegillet commented on Mar 4, 2024

    @jiegillet
    Contributor

    Has this been linked to students actually being confused?
    The semantic difference seems so small to me, I wouldn't want to spend time and energy on a non-issue.

  4. kotp commented on Mar 4, 2024

    @kotp
    MemberAuthor

    Has this been linked to students actually being confused? The semantic difference seems so small to me, I wouldn't want to spend time and energy on a non-issue.

    Yes, I can see how the meaning shift can be small for someone that is used to hearing it misused as often as I can imagine someone with your experience as having. We learn to "you mean this, but said that, I will not mention the difference in meaning" and we can definitely function like that. That is not really kind, but it is something that happens fairly often. They will continue to say things that they really do not mean to say, and it will likely not cause a problem.

    But when someone is looking at how to make a function in a language that does not have them, how do they find what they can not find? They have to, a bit clumsily, choose to ignore the meaning of the word and find the closest thing they can to do what was asked of them.

    Semantics are all we have at the end of the day, the meaning of words. So even small differences make a big difference, especially when it is something that is at the very core of certain languages, and non-existent in others.

  5. jiegillet commented on Mar 4, 2024

    @jiegillet
    Contributor

    In general, I agree with you, but has this specific case been linked to students actually being confused?

  6. kotp commented on Mar 4, 2024

    @kotp
    MemberAuthor

    In general, I agree with you, but has this specific case been linked to students actually being confused?

    This specific case? I listed 10, and that covers 65 languages, some of which do not have functions, so I am just as confused this second time reading that as I was the first time it was asked.

    So no, this is not a specific case being brought up.

  7. MatthijsBlom commented on Mar 4, 2024

    @MatthijsBlom
    Contributor

    has this specific case been linked to students actually being confused?

    This forum thread looks like an instance: Is a string value in Haskell a function? I vaguely remember this having come up other times as well. Also, there once was #1850.

  8. DazSanchez commented on Apr 1, 2024

    @DazSanchez

    @kotp Could you update the status of this issue to Close if the related PR addresses the original problem?

  9. kotp commented on Apr 2, 2024

    @kotp
    MemberAuthor

    @kotp Could you update the status of this issue to Close if the related PR addresses the original problem?

    I could, but there are still more to address. Some of them have been. (Not sure why none of them are checked off from the checkboxes, though, I think that is not reserved just for me to do).

    But if Isaac is happy to close this issue that is fine, as that does not mean that we can not address the rest of them that are still pending.

    Definitely an improvement though! Thank you for the work and improvements!

  10. IsaacG commented on Apr 2, 2024

    @IsaacG
    Member

    My bad. I thought we got them all. From a quick glance over the grep output, the sublist looks like it might be the only remaining exercise with obvious room for rewriting.

  11. reopened this on Apr 2, 2024
  12. BNAndras commented on Sep 22, 2026

    @BNAndras
    Member

    I believe this issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions