Skip to content

Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 2 | Course-work-2 - #1546

Open
MattCarolus10 wants to merge 64 commits into
CodeYourFuture:mainfrom
MattCarolus10:coursework/sprint-2
Open

MattCarolus10 wants to merge 64 commits into
CodeYourFuture:mainfrom
MattCarolus10:coursework/sprint-2

Conversation

@MattCarolus10

@MattCarolus10 MattCarolus10 commented Sep 19, 2026 •

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1039

Changelist

  • I have completed the "1-key-exercises" and corrected the syntax errors.
  • I checked for errors in the "2-Mandatory-errors" task and completed it.
  • I interpreted every lines of code in the "3-Mandatory-interpret" task and completed it.
  • I used the DevOps tool to check and research some JavaScript functions on chrome

Questions

Most functions in this project are new to me, even though I have been able to understand their functions individually, I am not really confident to code with them. I will keep practicing and any advise would really be appreciated.

@netlify

netlify Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit f214a57
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6ab6c7896fa5b900083c6c8a
😎 Deploy Preview https://deploy-preview-1546--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 24, 2026
@hackertainment

hackertainment commented Sep 24, 2026 •

Copy link
Copy Markdown

You don't need to submit the files under the Prep folder. Therefore, I didn't read them.
Generally, there are still rooms to improve the explanation by:

  1. adding a bit more key details
  2. using correct words to describe
  3. re-organising the order of presentation

Good try, and keep it up.

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 24, 2026
@MattCarolus10

Copy link
Copy Markdown
Author

Thank you very much

Comment thread Sprint-2/1-key-exercises/3-paths.js Outdated
const dir = filePath.slice(0, lastSlashIndex);
console.log(`The dir part of ${filePath} is ${dir}`);

const ext = base.slice(4);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The file name does not necessary 4 characters long. It can be longer and shorter (e.g. considering /path/to/screenshot.png). Cutting out the first 4 characters does not necessary remain the file extension. Please fix it, thank you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for this review, I have checked and found out the right solution. Appreciate

Comment thread Sprint-2/1-key-exercises/4-random.js Outdated
Comment on lines +8 to +12
// num variable that carries the result of the expressions evaluated.
// (maximum - minimum) does basic math: 100 - 1 + 1 = 100
// Math.floor() takes out all decimal and make them an integer.
// Math.random() gives random numbers between 0 and 100.
// + minimum add 1 at the end but randomise to the value between 0 and 100 No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. Math.random() itself does not give a number between 0 to 100.
  2. + minimum would not randomise value.
  3. The explanation require a bit more details and clarity.
  4. It would be better for your breakdown to following the same order of expression evaluation.

Please fix and elaborate you answer, thank you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you, review acknowledged

Comment thread Sprint-2/2-mandatory-errors/4.js Outdated
Comment on lines +1 to +3
const HourClockTime1 = "8:53pm";
const hourClockTime2 = "20:53";
console.log(`${HourClockTime1}, ${hourClockTime2}`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While this fixed the error, can you think of better variable names? Thank you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Variable names changed, thank you


// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?

// Answer: ReplaceAll() function clears out all the commas in the strings, the number() converts the strings to numbers to help with calculation

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

JavaScript is case sensitive. It should be "The Number() converts ..."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank. you, Error corrcted.


// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer

// Answer: It will work for integer values and will give us clear and clean result using this code. However, the result would not be clean as this using float values

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One more situation that make this program won't work well even an integer value is provided. Can you think of it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will check and make research to see

Comment on lines +34 to +37
// Also, line 3-6 used the function substring(0, penceString.lrength - 1) to cut out the "p" in the "penceString" variable.
// By starting count fron 0 (beginnning) of "399p".
// "Using penceString.lenght - 1" to check the length of the value in the variable penceString = "399p" (4),
// And deducting 1 from the value (4 - 1), because length - 1 subtract 1 from the character/value count 4. leaving the value at "399"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While the result of getting "399" is correct, the explanation seems not quite accurate to me.

  1. it is not counting, it should be indexing
  2. the reason for deducting 1 is due to how the second parameter of substring() works

Please revise your answer. Thank you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

My explanation is due to my level of understanding, I need to work on my terminologies usage going forward. Thank you

// And deducting 1 from the value (4 - 1), because length - 1 subtract 1 from the character/value count 4. leaving the value at "399"

// Line 8 a variable "paddedPenceNumberString" was created and a function padStart(3, "0")
// was used to ensure the value of the variable remains at 3 and to be filled with "0" at the beginning if the value is less 3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your understanding might be correct but the presentation seems not quite right. What does the "value" in your explanation "the value of the variable remains at 3" mean? Can you revise the wording a bit please? Thank you.

p.s.: same issue with line 50-51 below, and please revise it as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you so much for all your reviews, I really appreciate them and I have taken notes of the corrections.

@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants