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

difference-of-squares: Last test may be too hard for beginners #449

Closed
rbasso opened this issue Dec 2, 2016 · 5 comments
Closed

difference-of-squares: Last test may be too hard for beginners #449

rbasso opened this issue Dec 2, 2016 · 5 comments

Comments

@rbasso
Copy link
Contributor

rbasso commented Dec 2, 2016

Since I reviewed this iteration, I'm wondering if we should remove the last test case or move this exercise a little later in the track.

Most users try to solve this exercise using sum, and there is no way for that to work with a huge list.

Other comments about it:

We are certainly missing more people reviewing the exercises...

There are two paths to pass the last test:

Should we do something about it? What?

@petertseng
Copy link
Member

Let's see, looks like it was added in #255. And where was difference-of-squares before #402 moved it to be the fifth problem in the track? about 36th (I may have miscounted since I did it by hand).

What would be the benefit of keeping it? To require students to think about efficiency?

I'm about a 1/10 on the caring scale, but if you made me pick I'd vote to remove.

@abo64
Copy link
Contributor

abo64 commented Dec 2, 2016

I see two solutions:

  • We could comment it out as I did for the alphametics tests.
  • We could add more hints. I created an issue to have more hints in the Scala track, and I think the same argument holds for Haskell, too: Just think about the many times you had to write similar comments for your beloved Leap exercise, @rbasso ! ;-) (btw, I love your gitbook about it. Could we have more of this for other exercises?)

Or a combination of the two.

@rbasso
Copy link
Contributor Author

rbasso commented Dec 2, 2016

I'm usually against commenting out tests, because I think that users shouldn't have to read or edit them.

A HINTS.md would be fine, but In that case I think that the exercise should still be moved later in the track.

I agree with any of these three solutions:

  • Remove the last test.
  • Remove all the track-specific test and change the stubs to use Integer, to keep consistence with other exercises that allow multiple types.
  • Add HINTS.md and move it later in the track.

I think that the first to open a PR should choose. What about it? 😄

(btw, I love your gitbook about it. Could we have more of this for other exercises?)

I was just playing with gitbook to see how it works and also wanted to have a markdown file to play with Hakyll. Glad that you enjoyed!

I would also like to have more examples, but I think that it should be a community thing. What would be the best way to allow people to contribute with refactoring examples and also allow people commenting the code, explaining parts that are not clear? I have no idea.

@tewe
Copy link

tewe commented Dec 4, 2016

I started with a strict implementation and it locked up my machine so hard I had to do a reset. Since this is to be expected there should be a giant warning in the solution template, or smarter test code.

@rbasso
Copy link
Contributor Author

rbasso commented Dec 4, 2016

Sorry to hear that, @tewe!

In the past we had a lot of test suites that used huge numbers or really big lists to test if an implementation was reasonable, forcing people to write efficient programs to pass the tests.

Some of those tests where removed as we rewrote the test suites, but I guess you found one that is still there. 😄

In fact, we never decided if we should keep or not test cases about performance/memory.

For now I'll just comment out this test, as @abo64 suggested, and open an issue to discuss the more general problem.

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

4 participants