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

[factory-sensors] Add test for temperature of 0 degrees #2538

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

themetar
Copy link
Contributor

This exercise should reject solutions with !temperature.

  1. In the story null is a special signal that the sensor is broken. That means in-universe the sensor will needlessly be replaced if it happens to encounter temperatures of 0 degrees.

  2. In our world, the assignment requires that students make distinction between nulls and numbers. 0 is a valid number. There is no reason to have it intentionally be handled differently than -1 or 1 and lumped with null.

This is supported by the existing exemplar solution; it uses if (temperature === null)

This exercise should reject solutions with `!temperature`.

1) In the story `null` is a special signal that the sensor is
broken. That means in-universe the sensor will needlesly be
replaced if it happens to encounter temperatures of 0 degrees.

2) In our world, the assignment requires that students make
distinction between nulls and numbers. 0 is a valid number.
There is no reason to have it _intentionally_ be handled
differently than -1 or 1 and lumped with `null`.
Copy link
Contributor

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link%20In%20the%20story%20%60null%60%20is%20a%20special%20signal%20that%20the%20sensor%20is%20broken.%20That%20means%20in-universe%20the%20sensor%20will%20needlessly%20be%20replaced%20if%20it%20happens%20to%20encounter%20temperatures%20of%200%20degrees.%0D%0A%0D%0A2)%20In%20our%20world,%20the%20assignment%20requires%20that%20students%20make%20distinction%20between%20nulls%20and%20numbers.%200%20is%20a%20valid%20number.%20There%20is%20no%20reason%20to%20have%20it%20_intentionally_%20be%20handled%20differently%20than%20-1%20or%201%20and%20lumped%20with%20%60null%60.%0D%0A%0D%0AThis%20is%20supported%20by%20the%20existing%20exemplar%20solution;%20it%20uses%20%60if%20(temperature%20===%20null)%60&category=javascript ) to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Sep 12, 2024
Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@SleeplessByte SleeplessByte reopened this Sep 12, 2024
@SleeplessByte
Copy link
Member

Yah this makes a lot of sense.

@SleeplessByte SleeplessByte added the x:size/small Small amount of work label Sep 12, 2024
@SleeplessByte SleeplessByte merged commit 7dcdd63 into exercism:main Sep 12, 2024
10 checks passed
@themetar themetar deleted the improve-factory-sensors branch November 1, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:size/small Small amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants