Skip to content

Commit 308056d

Browse files
authored
Action items from retro after October run (#67)
Pairs with CodeYourFuture/curriculum#1683 Contributes to CodeYourFuture/curriculum#1678
1 parent 5abc626 commit 308056d

File tree

13 files changed

+85
-25
lines changed

13 files changed

+85
-25
lines changed

Project-Days-Calendar/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,20 @@ Your website must be hosted on the internet, and must be automatically deployed
2222

2323
You must be able to explain every line of code in your project, even ones other people in your group wrote.
2424

25+
> [!WARN]
26+
>
27+
> Date calculations can be complicated. Daylight savings time in particular can cause problems.
28+
>
29+
> Read [this guidance on handling daylight savings time and time zones](https://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices).
30+
>
31+
> Be sure to check the _exact_ dates returned when testing. Being off by one day will fail your project.
32+
2533
### Requirements for everyone
2634

2735
Regardless of your group size, you must:
2836

2937
* Create an HTML page which, when loaded, displays a calendar.
30-
* The calendar must show every day of the current month, each as a rectangle. Each row of rectangles must show one week. The first column must show Mondays. The first day of the month must be shown in the first row.
38+
* The calendar must show every day of the current month, each as a rectangle. Each row of rectangles must show one week. The first column must show Sundays. The first day of the month must be shown in the first row.
3139
* There must be two buttons which, when clicked, switch what is displayed. One button must change the display to the previous month. The other button must change the display to the next month. On repeated clicks, these buttons must keep moving back/forwards in time, one month per click.
3240
* These buttons must work on every month. There should be no first/last months beyond which you can't press previous/next and have them work.
3341
* There must be a way to jump to a particular month and year, e.g. "October 2020". For example, you could use a `<select>` tag for each of the month name and a reasonable range of years.
@@ -84,8 +92,8 @@ Note that when running locally, in order to open a web page which uses modules,
8492
* Open the calendar, it should be showing the current month.
8593
* Go to October 2024. Observe:
8694
* A grid of 5 rows x 7 columns.
87-
* The first row contains Tuesday October 1 - Sunday October 6. Monday is either labelled for September 30 or is blank.
88-
* The last row contains Monday October 28 - Thursday October 31. Friday - Sunday are either labelled for November or are blank.
95+
* The first row contains Tuesday October 1 - Sunday October 6. Sunday and Monday are either labelled for September 29/30 or are blank.
96+
* The last row contains Monday October 28 - Thursday October 31. Friday and Saturday are either labelled for November or are blank.
8997
* October 8th: Ada Lovelace Day.
9098
* October 25th: World Lemur Day.
9199
* On the web page, open October 2020. Observe:
@@ -94,14 +102,14 @@ Note that when running locally, in order to open a web page which uses modules,
94102
* On the web page, open May 2030. Observe:
95103
* May 11th: International Binturong Day.
96104
* The following months start and end on these dates, and do not have extra days or padding boxes outside of the weeks they're meant to cover:
97-
* 2025-01: Wednesday (two days before, labelled or blank) - Friday (two days after, labelled or blank)
98-
* 2025-03: Saturday (5 days before) - Monday (6 days after)
99-
* 2025-09: Monday (no empty days before) - Tuesday (5 empty days after)
100-
* 2025-11: Saturday (5 empty days before) - Sunday (no empty days after)
105+
* 2024-12: Sunday (no empty days before) - Tuesday (4 empty days after).
106+
* 2025-02: Saturday (6 days before) - Friday (1 empty day after).
107+
* 2025-05: Thursday (4 empty days before) - Saturday (no empty days after).
108+
* 2026-02: Sunday (no empty days before) - Saturday (no empty days after).
101109
* Functioning previous and next buttons including at the end-points of the month+year selector (if it has ends).
102110
* If there are end-points to the month+year selector, the previous and next buttons must work flawlessly when going beyond that limit. The UI must not e.g. show an empty string, "undefined", "null", "NaN" or similar if the "current month" or "current year" is displayed anywhere in the UI. The calendar days must be correctly shown.
103111
* A usable way of jumping to a month+year.
104-
* UI is generated by DOM manipulation, and would work if arbitrary additional days were added to the data file.
112+
* UI is generated by DOM manipulation, and day generation is dynamic. Everything would work if arbitrary additional days were added to the data file.
105113
* The website must score 100 for accessibility in Lighthouse
106114
* Unit tests must be written for at least one non-trivial function
107115

Project-Days-Calendar/days.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@
33
"name": "Ada Lovelace Day",
44
"monthName": "October",
55
"dayName": "Tuesday",
6-
"occurence": "second",
6+
"occurrence": "second",
77
"descriptionURL": "https://codeyourfuture.github.io/The-Piscine/days/ada.txt"
88
},
99
{
1010
"name": "International Binturong Day",
1111
"monthName": "May",
1212
"dayName": "Saturday",
13-
"occurence": "second",
13+
"occurrence": "second",
1414
"descriptionURL": "https://codeyourfuture.github.io/The-Piscine/days/binturongs.txt"
1515
},
1616
{
1717
"name": "International Vulture Awareness Day",
1818
"monthName": "September",
1919
"dayName": "Saturday",
20-
"occurence": "first",
20+
"occurrence": "first",
2121
"descriptionURL": "https://codeyourfuture.github.io/The-Piscine/days/vultures.txt"
2222
},
2323
{
2424
"name": "International Red Panda Day",
2525
"monthName": "September",
2626
"dayName": "Saturday",
27-
"occurence": "third",
27+
"occurrence": "third",
2828
"descriptionURL": "https://codeyourfuture.github.io/The-Piscine/days/red-pandas.txt"
2929
},
3030
{
3131
"name": "World Lemur Day",
3232
"monthName": "October",
3333
"dayName": "Friday",
34-
"occurence": "last",
34+
"occurrence": "last",
3535
"descriptionURL": "https://codeyourfuture.github.io/The-Piscine/days/lemurs.txt"
3636
}
3737
]

Project-Days-Calendar/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "project-days-calendar",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"test": "node common.test.mjs"
6+
}
7+
}

Project-Music-Data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Make a small HTML + JavaScript frontend which displays the answers to several qu
88

99
Some principles to remember throughout this project:
1010

11-
1. This is a project about data processing, not UI. You should make a simple frontend to show the data in valid semantic HTML. No credit will be given for making prettier or more complicated frontend. Do not write any CSS.
11+
1. This is a project about data processing, not UI. You should make a simple frontend to show the data in valid semantic HTML. No credit will be given for making prettier or more complicated frontend. You are allowed to use CSS, but you are strongly advised to focus on the logic, and only add styling when you are finished. You will not get any credit for styling.
1212
2. You should assume the data will change in the future, but will have the same schema. So you shouldn't pre-compute anything. Your code should always read the data and calculate results from scratch.
1313

1414
We have provided a `data.js` file, which contains three functions to provide data for you to analyse. `data.js` is a file containing four functions:

Project-Music-Data/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "project-music-data",
3+
"version": "1.0.0",
4+
"main": "script.js",
5+
"scripts": {
6+
"test": "node common.test.mjs"
7+
}
8+
}

Project-Shared-Bookmarks/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Here are some examples of bookmark sites:
1111

1212
Your task is to write code which allows a user to save a link with a short description and share them with others.
1313

14-
You should make a frontend, which displays a list of bookmarked links and the users description. A user can create new bookmarks by submitting a form with the URL and the description. You should use **HTML and JavaScript only**. You should **not** use CSS. We want to focus on your ability to create the correct logic and not spend time on creating the perfect UI.
14+
You should make a frontend, which displays a list of bookmarked links and the user's description. A user can create new bookmarks by submitting a form with the URL and the description. You should use HTML and JavaScript for this. We want to focus on your ability to create the correct logic and not spend time on creating the perfect UI. You are allowed to use CSS, but you are strongly advised to focus on the logic, and only add styling when you are finished. You will not get any credit for styling.
1515

1616
## Supplied scaffolding
1717

@@ -40,7 +40,11 @@ You **must not** implement any kind of authentication. Just a drop-down to choos
4040

4141
After picking a user, your website should display the list of bookmarks in reverse chronological order. For each bookmark, it should display the title and description of the bookmark. The title should be hyperlink to the URL of the bookmark. The timestamp at which the bookmark was created should be displayed.
4242

43-
Your website must include a form with text inputs for the URL and title, a textarea for the description and submit button that allows a user to add a new topic. This form must be accessible, so for example, hitting the Enter key will also submit the topic name, the same as clicking the submit button.
43+
Each bookmark should also have:
44+
- A button which, when clicked, copies the URL to the clipboard.
45+
- A like counter/button. When a bookmark is first saved, its like count should be 0. Each time a user clicks the like button, that number should go up by one, and be displayed. This like count should be persisted such that closing the page and coming back to it, it is preserved.
46+
47+
Your website must include a form with text inputs for the URL, title, and description, and submit button that allows a user to add a new topic. This form must be accessible, so for example, a user using the keyboard should be able to submit it without using a mouse.
4448

4549
After the new data has been stored, the updated list of bookmarks must be displayed (including the new bookmark) for the relevant user.
4650

@@ -58,6 +62,8 @@ All of the below requirements must be met for the project to be considered compl
5862
- The list of bookmarks must be shown in reverse chronological order
5963
- Each bookmark has a title, description and created at timestamp displayed
6064
- Each bookmark’s title is a link to the bookmark’s URL
65+
- Each bookmark's "Copy to clipboard" button must copy the URL of the bookmark
66+
- Each bookmark's like counter works independently, and persists data across sessions
6167
- The website must contain a form with inputs for a URL, a title, and a description. The form should have a submit button.
6268
- Submitting the form adds a new bookmark for the relevant user only
6369
- After creating a new bookmark, the list of bookmarks for the current user is shown, including the new bookmark
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import assert from "node:assert";
2+
import test from "node:test";
3+
import { getUserIds } from "./storage.js";
4+
5+
test("User count is correct", () => {
6+
assert.equal(getUserIds().length, 5);
7+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "project-shared-bookmarks",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"test": "node example.test.js"
6+
}
7+
}

Project-Spaced-Repetition-Tracker/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ At Code Your Future, we like to use a learning technique called spaced repetitio
44

55
One of the difficulties of this approach is tracking which topic should be revised at what time. Your task is to write code which allows a user to track topics and then understand which topic they should revise next.
66

7-
You should make a frontend, which displays an agenda of topics to revise on specific dates. You should use **HTML and JavaScript only**. You should **not** use CSS. We want to focus on your ability to create the correct logic and not spend time on creating the perfect UI.
7+
You should make a frontend, which displays an agenda of topics to revise on specific dates. You should use HTML and JavaScript for this. We want to focus on your ability to create the correct logic and not spend time on creating the perfect UI. You are allowed to use CSS, but you are strongly advised to focus on the logic, and only add styling when you are finished. You will not get any credit for styling.
88

99
## Supplied scaffolding
1010

@@ -22,7 +22,7 @@ We have also provided a `storage.js` file, which contains three functions to hel
2222

2323
## Requirements
2424

25-
This is intended to be a group project - your class leaders will tell you how the groups will work.
25+
This may be an individual or a team project - your class leaders will tell you which you are doing. If it is a team project, they will also tell you how the groups will work.
2626

2727
You must submit both a link to your GitHub repo, and a link to the deployed website.
2828

@@ -38,7 +38,7 @@ When a user is selected, you must get the stored data for that user and use it t
3838

3939
If there is an agenda, your website should display a list of topics and the revision date when the user should revise in _chronological order_. For each revision date, it should display the date and the name of the topic to revise. Revision dates in the past should not be displayed.
4040

41-
Your website must include a form with a text input, a date picker and submit button that allows a user to add a new topic. This form must be accessible, so for example, hitting the Enter key will also submit the topic name, the same as clicking the submit button. The form should validate that the topic name and date have be set by the user.
41+
Your website must include a form with a text input, a date picker and submit button that allows a user to add a new topic. This form must be accessible, so for example, a user using the keyboard should be able to submit it without using a mouse. The form should validate that the topic name and date have be set by the user.
4242

4343
The date picker should default to today’s date, but allow selection of another date. You should use the built-in date picker for browsers, unless attempted as a bonus task. **No credit** is given for using an alternative date picker.
4444

@@ -54,17 +54,20 @@ Every view of your website must be accessible (i.e. for each user, with any numb
5454
>
5555
> Date calculations can be complicated. Daylight savings time in particular can cause problems.
5656
>
57-
> Make sure your date calculations work as you expect, even if adding an interval means that a date crosses a daylight savings boundary.
57+
> Read [this guidance on handling daylight savings time and time zones](https://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices).
58+
>
59+
> Be sure to check the _exact_ dates returned when testing, even if adding an interval means that a date crosses a daylight savings boundary. Being off by one day will fail your project.
5860
>
5961
> A tip here is to either only be adding dates and not times, or to make sure all dates are in UTC.
6062
63+
6164
## Rubric
6265

6366
All of the below requirements must be met for the project to be considered complete:
6467

6568
- The website must contain a drop-down which lists exactly 5 users
6669
- No user is selected on page load
67-
- All of the users must have no agenda when starting from a "clean state" with no stored data
70+
- All of the users must have no agenda when first loading (i.e. with clear `localStorage`). Data should be persisted across page loads (which is handled by the code in `storage.mjs`).
6871
- Selecting a user must load the relevant user's agenda from storage
6972
- Selecting a user must display the agenda for the relevant user (see manual testing below)
7073
- If there is no agenda for the selected user, a message is displayed to explain this
@@ -76,7 +79,7 @@ All of the below requirements must be met for the project to be considered compl
7679
- The website must score 100 for accessibility in Lighthouse
7780
- Unit tests must be written for at least one non-trivial function
7881

79-
Below are some manual testing steps and expected results, which will be run on all websites to fairly assess them.
82+
Below are some manual testing steps and expected results, which will be run on all websites to fairly assess them. All of the dates are intended to be exact - if dates are off by one day, that counts as a failure.
8083

8184
Pick the year after the current one (e.g. in 2025, pick 2026).
8285

Project-Spaced-Repetition-Tracker/common.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getUserIDs } from "./common.mjs";
1+
import { getUserIds } from "./common.mjs";
22
import assert from "node:assert";
33
import test from "node:test";
44

0 commit comments

Comments
 (0)