-
-
Notifications
You must be signed in to change notification settings - Fork 193
West Midlands | ITP-Sept-2025 | Ali Naru | Sprint 3 | Alarm Clock #880
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
base: main
Are you sure you want to change the base?
Conversation
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
1 similar comment
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
bp7968h
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent work, I have left some comments and there is a bug in your code as well. Please fix those and it should be good to go!
Sprint-3/alarmclock/alarmclock.js
Outdated
| if (intervalId) clearInterval(intervalId); | ||
| remaining = value; | ||
| updateHeading(); | ||
| intervalId = setInterval(tick, 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here 1000 have meaning and these are called magic numbers, explore a bit on handling magic numbers in your code. Would it be more readable if you extract this? How would you do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have implemented these fixes, I have also reviewed magic numbers for this exercise and decided to use a constant instead, please review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I can see your pushed the fixes for minutes and second, however I cannot see the constant on this file for 1000!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies I added it to the wrong sprint I have now reverted that file and committed it now, please review.
Sprint-3/alarmclock/alarmclock.js
Outdated
| function format(seconds) { | ||
| const minute = String(Math.floor(seconds / 60)).padStart(2, "0"); | ||
| const second = String(seconds % 60).padStart(2, "0"); | ||
| return `${minute}:${second}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the timer could be more descriptive. Something like 10m : 22s , because the user is just putting numbers in seconds, and you do the conversion in the background. Then in your HTML input field, use a placeholder to specify the number being inputted, should be in seconds.
bp7968h
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Alarm clock Pull Request
Self checklist
Changelist
Amended files, added html file to meet task requirements, tests cases are successful.
Questions
No questions for reviewer.