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

Shrink & clean up custom_set.json #232

Merged
merged 1 commit into from
May 16, 2016

Commits on May 16, 2016

  1. Shrink & clean up custom_set.json

    Discussed here: exercism/discussions#10
    
    I'm trying to improve custom_set in two ways:
    
    1. Reducing the test suite, to remove redundancy or uninteresting
    implementations.
    2. Changing test order to improve flow
    
    Reducing the test suite
    ----
    
    The previous test suite contained 74 tests, which is a lot. I haven't
    checked all the exercises, but it's the biggest test suite that I've
    come across.
    
    If all of those tests provided value (exposing corner cases, improving
    implementations, etc.) then that's fine. But I found there to be a lot
    of duplicate tests. With the subset/union/etc tests, a student's
    implementation is usually done by the 2nd or 3rd test, so the remaining
    tests didn't provide any additional value.
    
    So I have removed the tests that seemed redundant.
    
    The tests also expected methods like `size`, `delete`. I
    have removed those because
    
    - They aren't vital to the behavior of a Set
    - They are usually implemented as an alias
    - They aren't used by the set operations (diff/subset/etc)
    
    The new test suite has 37 tests. A 50% reduction.
    
    Changing test order
    ----
    
    The previous test suite started with `equal`. I found that this requires
    students to implement two things:
    
    - Creating a new element
    - Comparing two collections of elements
    
    I have chosen to start the tests with `empty`, followed by `contains`,
    since those can be passed quickly. When the student implement the later
    functions they can leverage their already-existing functions.
    whit0694 committed May 16, 2016
    Configuration menu
    Copy the full SHA
    827a3ec View commit details
    Browse the repository at this point in the history