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

Descriptions and tests may be misleading regarding the type of both input and expected values #671

Open
tasxatzial opened this issue Sep 13, 2024 · 1 comment

Comments

@tasxatzial
Copy link
Member

tasxatzial commented Sep 13, 2024

I'm opening a new issue to address and discuss two related, previously unresolved issues.

Problem 1

Exercise descriptions will usually mention words that mislead new learners as to what type of input is expected. Here's an example from https://github.com/exercism/problem-specifications/blob/main/exercises/sublist/description.md

If A = [1, 2, 3] and B = [], then A is a superlist of B

Here, lists are mentioned, but vector notation is used. This is not only confusing but also appears incorrect.

This issue can also manifest in the descriptions of tests if the description is copied from the problem specifications. For example:

(deftest list-equals-itself-test
  (testing "list equals itself"
    (is (= :equal (sublist/classify [1 2 3] [1 2 3])))))

Also, the function name suggests that it accepts lists. Since we can pick whatever function name we want, the naming of the functions won't be discussed here but in another issue where we'll address a template for the tests.

Previous PR/issue: #507 #628

Problem 2

Tests will typically use vectors to check for equality. Example:

(deftest list-equals-itself-test
    (is (= :equal (sublist/classify [1 2 3] [1 2 3]))))

Vectors are used as input arguments here, which may mislead new learners into thinking the input must be a vector, leading them to write solutions that work with vectors only.

Another example:

(deftest six
  (is (= [2, 3] (prime-factors/of 6))))

New learners may believe that the output should be a vector, when in fact, it could also be a list.

Previous PR/issue: #227

@tasxatzial
Copy link
Member Author

tasxatzial commented Oct 25, 2024

Current list of exercises that use terminology conflicting with Clojure terminology

all your base
allergies
anagram
binary search
binary search tree
change
flatten array
grade school
poker
prime-factors
protein translation
proverb
sieve
sublist
zipper
list-ops

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

1 participant