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

Gigasecond problem is confusing #1564

Closed
anthkris opened this issue Dec 14, 2021 · 5 comments · Fixed by #1571
Closed

Gigasecond problem is confusing #1564

anthkris opened this issue Dec 14, 2021 · 5 comments · Fixed by #1571
Assignees
Labels
good first issue x:action/improve Improve existing functionality/content x:knowledge/none No existing Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:size/small Small amount of work x:status/claimed Someone is working on this issue x:type/content Work on content (e.g. exercises, concepts)

Comments

@anthkris
Copy link

I spent a lot of time on the gigasecond problem in JavaScript (https://exercism.org/tracks/javascript/exercises/gigasecond), just trying to understand it. It mentions that the input is a number, but it is a string. It also doesn't have any of the hints that the learning track exercises have.

I can certainly understand scaffolding and removing the scaffold as a part of the learning process but the wording of the problem and the lack of hints or other information or even just examples of input and output made it very difficult to understand what was expected.

I'd like to suggest updating this problem at least in JS with the following:

  • Indicating that the input is a date string
  • Perhaps adding a hint or two about using the JavaScript date object and getTime as well as that getTime expects milliseconds (I got stuck here for a while trying not understanding why adding 1 bil seconds to getTime didn't have the expected effect)
  • That the output is expected to be a date object
  • A small table of example input and output
@junedev
Copy link
Member

junedev commented Dec 14, 2021

I agree the instructions should mention that the input and output is a Date object. (It is not a string even if it looks like a string when you log it.)

As for the other points you mentioned, please don't confuse practice and learning exercises. Practice exercises are deliberately a bit more about figuring out what to do yourself. Researching for a while what helpers to use etc. is also totally normally for solving a practice exercise. Those things you researched yourself are usually the ones you remember better than the things you just read in some introduction document. Practice exercises don't have hints because there are usually a lot of different ways to solve them so there is not one right answer the hints guide the student towards. If you are stuck with a practice exercise, submit it via the CLI and request mentoring for it. A mentor can then help you get un-stuck without giving away most of the solution like hints would probably do.

Additionally, for practice exercises it is recommended to look into the test file. That would e.g. tell you what type the input and output has. That is why test files are not hidden on the website for practice exercises, only for learning exercises.

As for the "table of example input and output", that is what the test cases provide for you. Practice exercises are meant to be solved TDD style. That means you would look at the output of the failed test to see what the correct output for a given input was supposed to be. Than you would make that specific test pass and look at the next failing test etc.

We are currently working on adding a learning exercise for Date (#1528). At some point in the future, the Gigasecond exercise would only unlock after a student in learning mode has completed that learning exercise. That will probably also help solving the exercise.

As for the minimal instructions of the exercise, once the information about the input and output was added, I don't see there is much more to say. It then would sum up to "Here is a date, give me a date back that is 1 Gigasecond later."

To recap, this task needs to be done to solve this issue:

  • Add a note in instructions.append.md file that the input and output of the gigasecond function is of type Date.

@junedev junedev added good first issue help wanted x:action/improve Improve existing functionality/content x:knowledge/none No existing Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts) labels Dec 14, 2021
@SleeplessByte
Copy link
Member

I fully agree with @junedev 's summary. Thanks for logging this @anthkris . We'll make it better!

@asadrjhk
Copy link
Contributor

@junedev i would like to take this one,

@junedev junedev added the x:status/claimed Someone is working on this issue label Dec 16, 2021
@junedev
Copy link
Member

junedev commented Dec 17, 2021

@asadrjhk Great, I assigned you to the issue.

@asadrjhk
Copy link
Contributor

@junedev thanks, I'll submit the PR today,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue x:action/improve Improve existing functionality/content x:knowledge/none No existing Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:size/small Small amount of work x:status/claimed Someone is working on this issue x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
4 participants