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

Disallow a difficulty level of 0 #290

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Oct 18, 2021

Edit: updated this PR to disallow difficulty 0 instead.


See below for the list of exercises with a difficulty level of 0. It looks like there is only one (hello-world on the red track) that is not deprecated.

Click to expand
csharp/config.json
1752-        "slug": "binary",
1753-        "name": "Binary",
1754-        "uuid": "cef7deef-54ce-4201-b263-7cd2098533f8",
1755-        "practices": [],
1756-        "prerequisites": [],
1757:        "difficulty": 0,
1758-        "status": "deprecated"
1759-      },
1760-      {
1761-        "slug": "hexadecimal",
1762-        "name": "Hexadecimal",
1763-        "uuid": "5d30c5a0-0f69-4b79-8c7e-3b1fe6a5707f",
1764-        "practices": [],
1765-        "prerequisites": [],
1766:        "difficulty": 0,
1767-        "status": "deprecated"
1768-      },
1769-      {
1770-        "slug": "octal",
1771-        "name": "Octal",
1772-        "uuid": "c8555f37-9976-4f52-a5db-6a680ec8d53b",
1773-        "practices": [],
1774-        "prerequisites": [],
1775:        "difficulty": 0,
1776-        "status": "deprecated"
1777-      },
1778-      {
1779-        "slug": "trinary",
1780-        "name": "Trinary",
1781-        "uuid": "c7dd8467-87e2-4997-a96e-a04cb8b891e8",
1782-        "practices": [],
1783-        "prerequisites": [],
1784:        "difficulty": 0,
1785-        "status": "deprecated"
1786-      },

fsharp/config.json
1422-        "slug": "binary",
1423-        "name": "Binary",
1424-        "uuid": "df8f4106-c1ce-4c33-86b2-ad61ba5ccc4a",
1425-        "practices": [],
1426-        "prerequisites": [],
1427:        "difficulty": 0,
1428-        "status": "deprecated"
1429-      },
1430-      {
1431-        "slug": "hexadecimal",
1432-        "name": "Hexadecimal",
1433-        "uuid": "f4f80d57-a248-49d3-9329-587eb2643d4f",
1434-        "practices": [],
1435-        "prerequisites": [],
1436:        "difficulty": 0,
1437-        "status": "deprecated"
1438-      },
1439-      {
1440-        "slug": "octal",
1441-        "name": "Octal",
1442-        "uuid": "f29f9e56-c79b-4ae4-a0d0-29db78c677e4",
1443-        "practices": [],
1444-        "prerequisites": [],
1445:        "difficulty": 0,
1446-        "status": "deprecated"
1447-      },
1448-      {
1449-        "slug": "trinary",
1450-        "name": "Trinary",
1451-        "uuid": "81904afe-a893-45be-99f8-2e074a6f1ad5",
1452-        "practices": [],
1453-        "prerequisites": [],
1454:        "difficulty": 0,
1455-        "status": "deprecated"
1456-      },

go/config.json
1715-        "slug": "binary",
1716-        "name": "Binary",
1717-        "uuid": "bf2dcbc4-266f-4cad-9cd7-76d446360a5d",
1718-        "practices": [],
1719-        "prerequisites": [],
1720:        "difficulty": 0,
1721-        "topics": null,
1722-        "status": "deprecated"
1723-      },
1724-      {
1725-        "slug": "counter",
1726-        "name": "Counter",
1727-        "uuid": "9a06556b-a661-4329-97a1-b5d0f0c7590c",
1728-        "practices": [],
1729-        "prerequisites": [],
1730:        "difficulty": 0,
1731-        "topics": null,
1732-        "status": "deprecated"
1733-      },
1734-      {
1735-        "slug": "hexadecimal",
1736-        "name": "Hexadecimal",
1737-        "uuid": "0c9cef3d-57f6-479a-aca4-25f310426d6a",
1738-        "practices": [],
1739-        "prerequisites": [],
1740:        "difficulty": 0,
1741-        "topics": null,
1742-        "status": "deprecated"
1743-      },
1744-      {
1745-        "slug": "octal",
1746-        "name": "Octal",
1747-        "uuid": "4840c889-ebe5-4082-98c0-b9ed8618f6eb",
1748-        "practices": [],
1749-        "prerequisites": [],
1750:        "difficulty": 0,
1751-        "topics": null,
1752-        "status": "deprecated"
1753-      },
1754-      {
1755-        "slug": "trinary",
1756-        "name": "Trinary",
1757-        "uuid": "52af9f03-8b6b-4d75-a363-124f3269dccd",
1758-        "practices": [],
1759-        "prerequisites": [],
1760:        "difficulty": 0,
1761-        "topics": null,
1762-        "status": "deprecated"
1763-      },

haskell/config.json
1112-        "slug": "binary",
1113-        "name": "Binary",
1114-        "uuid": "48ca1682-ca1b-4a2c-be55-624620f336a7",
1115-        "practices": [],
1116-        "prerequisites": [],
1117:        "difficulty": 0,
1118-        "topics": null,
1119-        "status": "deprecated"
1120-      },
1121-      {
1122-        "slug": "gigasecond",
1123-        "name": "Gigasecond",
1124-        "uuid": "317ef3e7-67ce-4940-bc90-eed1c4a27c19",
1125-        "practices": [],
1126-        "prerequisites": [],
1127:        "difficulty": 0,
1128-        "topics": null,
1129-        "status": "deprecated"
1130-      },
1131-      {
1132-        "slug": "hexadecimal",
1133-        "name": "Hexadecimal",
1134-        "uuid": "964c07aa-abca-49b8-8428-1b81ee39066d",
1135-        "practices": [],
1136-        "prerequisites": [],
1137:        "difficulty": 0,
1138-        "topics": null,
1139-        "status": "deprecated"
1140-      },
1141-      {
1142-        "slug": "octal",
1143-        "name": "Octal",
1144-        "uuid": "2566f8ee-28cf-4429-9ced-42759c810d7c",
1145-        "practices": [],
1146-        "prerequisites": [],
1147:        "difficulty": 0,
1148-        "topics": null,
1149-        "status": "deprecated"
1150-      },
1151-      {
1152-        "slug": "trinary",
1153-        "name": "Trinary",
1154-        "uuid": "d5997b60-e54c-4caa-beae-8614f0da3fb3",
1155-        "practices": [],
1156-        "prerequisites": [],
1157:        "difficulty": 0,
1158-        "topics": null,
1159-        "status": "deprecated"
1160-      },

java/config.json
1750-        "slug": "accumulate",
1751-        "name": "Accumulate",
1752-        "uuid": "e58c29d2-80a7-40ef-bed0-4a184ae35f34",
1753-        "practices": [],
1754-        "prerequisites": [],
1755:        "difficulty": 0,
1756-        "topics": null,
1757-        "status": "deprecated"
1758-      },
1759-      {
1760-        "slug": "binary",
1761-        "name": "Binary",
1762-        "uuid": "9ea6e0fa-b91d-4d17-ac8f-6d2dc30fdd44",
1763-        "practices": [],
1764-        "prerequisites": [],
1765:        "difficulty": 0,
1766-        "topics": null,
1767-        "status": "deprecated"
1768-      },
1769-      {
1770-        "slug": "hexadecimal",
1771-        "name": "Hexadecimal",
1772-        "uuid": "6fe53a08-c123-465d-864a-ef18217203c4",
1773-        "practices": [],
1774-        "prerequisites": [],
1775:        "difficulty": 0,
1776-        "topics": null,
1777-        "status": "deprecated"
1778-      },
1779-      {
1780-        "slug": "octal",
1781-        "name": "Octal",
1782-        "uuid": "14a29e82-f9b1-4662-b678-06992e306c01",
1783-        "practices": [],
1784-        "prerequisites": [],
1785:        "difficulty": 0,
1786-        "topics": null,
1787-        "status": "deprecated"
1788-      },
1789-      {
1790-        "slug": "strain",
1791-        "name": "Strain",
1792-        "uuid": "2d195cd9-1814-490a-8dd6-a2c676f1d4cd",
1793-        "practices": [],
1794-        "prerequisites": [],
1795:        "difficulty": 0,
1796-        "topics": null,
1797-        "status": "deprecated"
1798-      },
1799-      {
1800-        "slug": "trinary",
1801-        "name": "Trinary",
1802-        "uuid": "ee3a8abe-6b19-4b47-9cf6-4d39ae915fb7",
1803-        "practices": [],
1804-        "prerequisites": [],
1805:        "difficulty": 0,
1806-        "topics": null,
1807-        "status": "deprecated"
1808-      },

javascript/config.json
1412-        "slug": "point-mutations",
1413-        "name": "Point Mutations",
1414-        "uuid": "6d43709b-3809-4a6a-ab41-2a5ab841b5fb",
1415-        "practices": [],
1416-        "prerequisites": [],
1417:        "difficulty": 0,
1418-        "topics": null,
1419-        "status": "deprecated"
1420-      },

kotlin/config.json
946-        "slug": "accumulate",
947-        "name": "Accumulate",
948-        "uuid": "86015770-603b-44cf-aedf-f2a7cf79c841",
949-        "practices": [],
950-        "prerequisites": [],
951:        "difficulty": 0,
952-        "topics": ["lists"],
953-        "status": "deprecated"
954-      },
955-      {
956-        "slug": "binary",
957-        "name": "Binary",
958-        "uuid": "def44955-c048-4b74-8777-2fb7d779b09e",
959-        "practices": [],
960-        "prerequisites": [],
961:        "difficulty": 0,
962-        "topics": ["strings"],
963-        "status": "deprecated"
964-      },
965-      {
966-        "slug": "hexadecimal",
967-        "name": "Hexadecimal",
968-        "uuid": "13b1a62e-8e0e-4d57-b8c9-341b41f25cf5",
969-        "practices": [],
970-        "prerequisites": [],
971:        "difficulty": 0,
972-        "topics": ["string", "integers"],
973-        "status": "deprecated"
974-      },
975-      {
976-        "slug": "strain",
977-        "name": "Strain",
978-        "uuid": "8ae8492d-620c-4446-9928-5b4d78d496d9",
979-        "practices": [],
980-        "prerequisites": [],
981:        "difficulty": 0,
982-        "topics": ["arrays", "filtering"],
983-        "status": "deprecated"
984-      },

lfe/config.json
50-        "slug": "accumulate",
51-        "name": "Accumulate",
52-        "uuid": "d706e999-482a-42de-8492-0a65e6258c19",
53-        "practices": [],
54-        "prerequisites": [],
55:        "difficulty": 0,
56-        "topics": null,
57-        "status": "deprecated"
58-      },

lua/config.json
1107-        "slug": "accumulate",
1108-        "name": "Accumulate",
1109-        "uuid": "cf3386ef-177c-41f6-8569-040d3a9c9175",
1110-        "practices": [],
1111-        "prerequisites": [],
1112:        "difficulty": 0,
1113-        "topics": null,
1114-        "status": "deprecated"
1115-      }

nim/config.json
323-        "slug": "binary",
324-        "name": "Binary",
325-        "uuid": "3acf148d-df9e-4897-8c9f-c17a3ba5e4b6",
326-        "practices": [],
327-        "prerequisites": [],
328:        "difficulty": 0,
329-        "topics": null,
330-        "status": "deprecated"
331-      },

ocaml/config.json
39-        "slug": "hexadecimal",
40-        "name": "Hexadecimal",
41-        "uuid": "d0c937ef-3c7b-40be-891d-3024129b443f",
42-        "practices": [],
43-        "prerequisites": [],
44:        "difficulty": 0,
45-        "topics": null,
46-        "status": "deprecated"
47-      },

perl5/config.json
39-        "slug": "binary",
40-        "name": "Binary",
41-        "uuid": "2e74fa26-f946-4b79-87b9-27f60f03af8f",
42-        "practices": [],
43-        "prerequisites": [],
44:        "difficulty": 0,
45-        "topics": null,
46-        "status": "deprecated"
47-      },
48-      {
49-        "slug": "hexadecimal",
50-        "name": "Hexadecimal",
51-        "uuid": "742bccfd-20f9-44f1-8935-e84384807088",
52-        "practices": [],
53-        "prerequisites": [],
54:        "difficulty": 0,
55-        "topics": null,
56-        "status": "deprecated"
57-      },
58-      {
59-        "slug": "point-mutations",
60-        "name": "Point Mutations",
61-        "uuid": "a6f46028-7334-4504-877e-eda8ebdd9ea9",
62-        "practices": [],
63-        "prerequisites": [],
64:        "difficulty": 0,
65-        "topics": null,
66-        "status": "deprecated"
67-      },
68-      {
69-        "slug": "trinary",
70-        "name": "Trinary",
71-        "uuid": "88643b77-3889-4395-81a0-c73526ce879a",
72-        "practices": [],
73-        "prerequisites": [],
74:        "difficulty": 0,
75-        "topics": null,
76-        "status": "deprecated"
77-      },

racket/config.json
205-        "slug": "accumulate",
206-        "name": "Accumulate",
207-        "uuid": "b234225c-fcde-445f-9222-f80c25d0f499",
208-        "practices": [],
209-        "prerequisites": [],
210:        "difficulty": 0,
211-        "topics": null,
212-        "status": "deprecated"
213-      },

raku/config.json
213-        "slug": "binary",
214-        "name": "Binary",
215-        "uuid": "1d36c4df-a1c8-454c-b4ec-7bec3c1cbca3",
216-        "practices": [],
217-        "prerequisites": [],
218:        "difficulty": 0,
219-        "topics": null,
220-        "status": "deprecated"
221-      },
222-      {
223-        "slug": "trinary",
224-        "name": "Trinary",
225-        "uuid": "eb5415a2-1342-4dcb-ac86-34240e5dead8",
226-        "practices": [],
227-        "prerequisites": [],
228:        "difficulty": 0,
229-        "topics": null,
230-        "status": "deprecated"
231-      },

red/config.json
      {
        "slug": "hello-world",
        "name": "Hello World",
        "status": "beta",
        "uuid": "1d2e9dab-d85e-4b30-b414-1ebd969475ad",
        "practices": [
          "basics",
          "script",
          "strings"
        ],
        "prerequisites": [],
        "difficulty": 0
      },
      {

ruby/config.json
1189-        "slug": "binary",
1190-        "name": "Binary",
1191-        "uuid": "43bc27ed-d2fa-4173-8665-4459b71c9a3a",
1192-        "practices": [],
1193-        "prerequisites": [],
1194:        "difficulty": 0,
1195-        "topics": null,
1196-        "status": "deprecated"
1197-      },
1198-      {
1199-        "slug": "hexadecimal",
1200-        "name": "Hexadecimal",
1201-        "uuid": "6984cc14-91f8-47a7-b7e2-4b210a5dbc5c",
1202-        "practices": [],
1203-        "prerequisites": [],
1204:        "difficulty": 0,
1205-        "topics": null,
1206-        "status": "deprecated"
1207-      },
1208-      {
1209-        "slug": "octal",
1210-        "name": "Octal",
1211-        "uuid": "cae4e000-3aac-41f7-b727-f9cce12d058d",
1212-        "practices": [],
1213-        "prerequisites": [],
1214:        "difficulty": 0,
1215-        "topics": null,
1216-        "status": "deprecated"
1217-      },
1218-      {
1219-        "slug": "point-mutations",
1220-        "name": "Point Mutations",
1221-        "uuid": "89bd3d71-000f-4cd9-9a84-ad1b22ddbd33",
1222-        "practices": [],
1223-        "prerequisites": [],
1224:        "difficulty": 0,
1225-        "topics": null,
1226-        "status": "deprecated"
1227-      },
1228-      {
1229-        "slug": "trinary",
1230-        "name": "Trinary",
1231-        "uuid": "f6735416-4be6-4eb8-b6b9-cb61671ce25e",
1232-        "practices": [],
1233-        "prerequisites": [],
1234:        "difficulty": 0,
1235-        "topics": null,
1236-        "status": "deprecated"
1237-      },

rust/config.json
1411-        "slug": "hexadecimal",
1412-        "name": "Hexadecimal",
1413-        "uuid": "496fd79f-1678-4aa2-8110-c32c6aaf545e",
1414-        "practices": [],
1415-        "prerequisites": [],
1416:        "difficulty": 0,
1417-        "topics": null,
1418-        "status": "deprecated"
1419-      },
1420-      {
1421-        "slug": "nucleotide-codons",
1422-        "name": "Nucleotide Codons",
1423-        "uuid": "8dae8f4d-368d-477d-907e-bf746921bfbf",
1424-        "practices": [],
1425-        "prerequisites": [],
1426:        "difficulty": 0,
1427-        "topics": null,
1428-        "status": "deprecated"
1429-      },

scala/config.json
660-        "slug": "binary",
661-        "name": "Binary",
662-        "uuid": "6cc53fdc-4423-47fe-abac-7688259b0ac5",
663-        "practices": [],
664-        "prerequisites": [],
665:        "difficulty": 0,
666-        "topics": null,
667-        "status": "deprecated"
668-      },
669-      {
670-        "slug": "hexadecimal",
671-        "name": "Hexadecimal",
672-        "uuid": "7c949a14-70dc-4034-874f-0c9e3217fcf8",
673-        "practices": [],
674-        "prerequisites": [],
675:        "difficulty": 0,
676-        "topics": null,
677-        "status": "deprecated"
678-      },
679-      {
680-        "slug": "octal",
681-        "name": "Octal",
682-        "uuid": "403063a8-9f29-409a-8bf4-a2400521e19b",
683-        "practices": [],
684-        "prerequisites": [],
685:        "difficulty": 0,
686-        "topics": null,
687-        "status": "deprecated"
688-      },
689-      {
690-        "slug": "trinary",
691-        "name": "Trinary",
692-        "uuid": "616e49fe-b6eb-4384-9af4-b8413d4d0eab",
693-        "practices": [],
694-        "prerequisites": [],
695:        "difficulty": 0,
696-        "topics": null,
697-        "status": "deprecated"
698-      },

sml/config.json
118-        "slug": "binary",
119-        "name": "Binary",
120-        "uuid": "225cfd7d-81a3-4a58-b1aa-1de2e40e7a93",
121-        "practices": [],
122-        "prerequisites": [],
123:        "difficulty": 0,
124-        "topics": null,
125-        "status": "deprecated"
126-      },

swift/config.json
187-        "slug": "binary",
188-        "name": "Binary",
189-        "uuid": "0930d019-2ccb-48f9-9ee7-467b683d9901",
190-        "practices": [],
191-        "prerequisites": [],
192:        "difficulty": 0,
193-        "topics": null,
194-        "status": "deprecated"
195-      },
196-      {
197-        "slug": "hexadecimal",
198-        "name": "Hexadecimal",
199-        "uuid": "3a9f0e4d-a569-40ea-adb8-ded8d240c949",
200-        "practices": [],
201-        "prerequisites": [],
202:        "difficulty": 0,
203-        "topics": null,
204-        "status": "deprecated"
205-      },
206-      {
207-        "slug": "octal",
208-        "name": "Octal",
209-        "uuid": "128bcbc1-18b3-45e7-9590-c71d8f57c5c1",
210-        "practices": [],
211-        "prerequisites": [],
212:        "difficulty": 0,
213-        "topics": null,
214-        "status": "deprecated"
215-      },
216-      {
217-        "slug": "trinary",
218-        "name": "Trinary",
219-        "uuid": "8b376ef9-ad94-4623-8d0f-e2d7bb6c364a",
220-        "practices": [],
221-        "prerequisites": [],
222:        "difficulty": 0,
223-        "topics": null,
224-        "status": "deprecated"
225-      },

ErikSchierboom
ErikSchierboom previously approved these changes Oct 19, 2021
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Difficulty 0 is currently interpreted as being "hard" (which is wrong): https://github.com/exercism/website/blob/main/app/models/exercise.rb#L97

Maybe we should disallow a difficulty of zero, or have it be the required value for deprecated exercises? @iHiD ?

@iHiD
Copy link
Member

iHiD commented Oct 21, 2021

Maybe we should disallow a difficulty of zero

This I think.

@ErikSchierboom
Copy link
Member

@ee7 Could you update the PR?

@ee7
Copy link
Member Author

ee7 commented Oct 22, 2021

Could you update the PR?

Like this?

Do we want configlet lint to produce an error for a deprecated exercise with a difficulty of 0? (See the list in the top post).

building/tracks/config-json.md Outdated Show resolved Hide resolved
@ee7 ee7 changed the title Fix definition of difficulty level 0 Disallow a difficulty level of 0 Oct 22, 2021
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want to make an exception for deprecated exercises, as they can still show up on the website if someone started them before they were deprecated. We'll have to submit some PRs to fix that (easy enough).

building/tracks/config-json.md Outdated Show resolved Hide resolved
@ErikSchierboom
Copy link
Member

@ee7 I'm working on a bulk update for the tracks that use difficulty 0.

ee7 pushed a commit to exercism/nim that referenced this pull request Oct 22, 2021
Previously, a difficulty value of 0 was allowed, and `configlet lint`
checked that each difficulty value was in the range from 0 to 10
inclusive.

However, a difficulty of 0 is now disallowed. Typically, exercises with
a difficulty value of 0 were deprecated exercises, but these still
appear on the website for users who started them before they were
deprecated, and so they should still have a difficulty level as normal.

With this commit, we change the difficulty of our one deprecated
exercise (`binary`) to an allowed value.

See:
- exercism/docs#290
- exercism/configlet#447
ee7 added a commit to exercism/configlet that referenced this pull request Oct 22, 2021
With this commit, `configlet lint` now produces an error if there is a
Practice Exercise in the track-level `config.json` file that has a
`difficulty` value of `0`.

Typically, exercises with such a value were deprecated exercises.
However, a deprecated exercise still appears on the website for a user
who started that exercise before it was deprecated, and therefore an
exercise's difficulty level should not be changed when it is deprecated.

We have created a PR on every track that had at least one exercise with
a `difficulty` of `0`, updating them to use an allowed value.

See: exercism/docs#290
@ee7
Copy link
Member Author

ee7 commented Jan 17, 2022

@ErikSchierboom Can we merge this?

We made configlet lint produce an error for a difficulty level of 0 (exercism/configlet@36a07d8).

@ErikSchierboom ErikSchierboom merged commit 8fe5ca9 into exercism:main Jan 19, 2022
@ee7 ee7 deleted the difficulty-level-0 branch January 19, 2022 11:43
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

Successfully merging this pull request may close these issues.

3 participants