-
Notifications
You must be signed in to change notification settings - Fork 543
leap: Updated exercise to 1.4.0 version #753
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
Conversation
77a3b4d
to
ad2a0f8
Compare
For this update to
(in addition to the 1.3.0 -> 1.4.0 update you already linked) |
ad2a0f8
to
17a62ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to give this until tomorrow for discussion, then merge if no objections have arisen.
Still not sure about the old, track-specific tests. Will they not overload the students? |
In this respect my approach differs from Exercism's official policy: I personally always immediately remove all In a professional context, assuming a well-managed project, coders deal with test suites comprising thousands of tests. If a dozen fail because of a change you made, you just have to deal with it. I therefore believe that we should encourage students not to be afraid of a bunch of test failures, but to embrace them: each one tells you about something your code needs to do. To answer your question for myself, then, I'd say no, students won't be overwhelmed: correct code will pass all tests anyway; incorrect code can always use more examples of what outputs should correspond to what inputs. To answer your question speaking ex officio as the track maintainer, I'd say that by maintaining a track policy of preferring to add tests without removing them, we are simultaneously following good project management practices and encouraging students to view tests as a bulk product for code improvement, not as individual hurdles which must be cleared. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are duplicates a concern? noting that 1800 and 2000 appear in both old and new.
I'm not really worried about them. I don't object if someone wants to
remove duplicate tests, but I don't think it's worth anyone's time to
actually do that work.
In general—and in this case in particular—the cost of any individual test
in this suite is effectively zero, so there's no penalty to adding tests.
There are suites and tests where that general rule does not hold, which
deserve more attention. Leap is a constant-time problem, though; if I could
think of a good way to do so without giving away the solution, I'd add a
parametric test macro which added a test for every year between 1582
(invention of the gregorian calendar) and 3000 (far enough in the future
that we don't care what's past that). That would of course mean long test
reports and more duplicate tests, but the key point is that we could have
lots of tests without penalty here.
…On Tue, Nov 20, 2018 at 11:14 AM Peter Tseng ***@***.***> wrote:
***@***.**** commented on this pull request.
are duplicates a concern? noting that 1800 and 2000 appear in both old and
new.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#753 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHdeTqE3rDmQVm-PoJ8O8i2NFynJEuAxks5uw9YKgaJpZM4YopWA>
.
|
This PR syncs the
leap
exercise with theproblem-specifications
repo.It introduces the following changes:
Adds all the cases from canonical data. The cases that were present in the suite were not present in the canonical version, so I added new cases in a
test_description_in_lowercase
format. The old cases were not touched (except the one that checked the 1996 year - it was present in canonical data, so I replaced it with the formatted case). Perhaps some old test cases could be deleted?Replaced
i32
argument type withu64
- no negative years are expected, so I thought it would make senseRelevent PR: exercism/problem-specifications#1359