Skip to content

Manchester | 26-ITP-JAN | Abdu Mussa | Sprint 1 | structuring and Testing Data #1058

Open
Abduhasen wants to merge 8 commits intoCodeYourFuture:mainfrom
Abduhasen:coursework/sprint-1
Open

Manchester | 26-ITP-JAN | Abdu Mussa | Sprint 1 | structuring and Testing Data #1058
Abduhasen wants to merge 8 commits intoCodeYourFuture:mainfrom
Abduhasen:coursework/sprint-1

Conversation

@Abduhasen
Copy link

@Abduhasen Abduhasen commented Feb 25, 2026

Learners, PR Template

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

Changelist

this PR is for the Structuring and Testing Data.
-working on errors identifying them and fixing the errors with explanation
-brief explanation of codes and interpret

Questions

N/A

@Abduhasen Abduhasen added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Feb 25, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Have you installed prettier VSCode extension and enable formatting on save/paste on VSCode as recommended in
https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/blob/main/readme.md ?

//This expression calculates the total full minutes in the movie by removing leftover seconds and converting seconds to minutes.

// e) What do you think the variable result represents? Can you think of a better name for this variable?
//result represent the total movie length using hours,minutes and seconds,the better name can be totalMovieLength.
Copy link
Contributor

Choose a reason for hiding this comment

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

The name totalMovieLength does not quite indicate the value the variable stores is a formatted string in the form "2:12:02".
Can you suggest a more descriptive name?

Copy link
Author

Choose a reason for hiding this comment

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

thank you for your feedback i changed it to totalMovieDuration.

Copy link
Contributor

Choose a reason for hiding this comment

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

totalMovieDuration still does not quite describe the value that is a string formatted in form "02:12:02".

Numbers such as 2.2 (hours) and 132.03 (minutes) are also valid total movie duration.

One more try?

Copy link
Author

Choose a reason for hiding this comment

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

how about movieRunTime this one can describe it more.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not much difference from movieDuration. You could try asking an AI tool for suggestion.

Comment on lines +45 to +49
/* 5. const pence = paddedPenceNumberString
.substring(paddedPenceNumberString.length - 2)
.padEnd(2, "0"); : let's break it down this code parts it have two steps first one is .substring(paddedPenceNumberString.length - 2)
Takes the last 2 characters of the string and the second is .padEnd(2, "0") Ensures the result
is at least length 2 if the length less than 2 it will add 0 at the end of the string. */
Copy link
Contributor

@cjyuan cjyuan Mar 5, 2026

Choose a reason for hiding this comment

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

Optional challenge:
Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") from the code?
In other words, do we really need .padEnd(2, "0") in this script?

Copy link
Author

Choose a reason for hiding this comment

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

thank you for the feedback, we don't need the .padEnd(2, "0") in this script because the program will work for any valid penceString even after removing the padEnd.

Copy link
Contributor

@cjyuan cjyuan Mar 5, 2026

Choose a reason for hiding this comment

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

Did you figure out why .padEnd(2, "0") is optional in this script? It is more important to understand why.

Copy link
Author

Choose a reason for hiding this comment

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

yes i understood the concept before i didn't realise it ( which is even if we didn't put the pading there will be a value of 2 character and we don't need to have extra script. )

i also want to thank you because i learned more by the feedback i got from you.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am glad you understand the concept.
Can you explain why .padEnd(2, "0") is optional in this script?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 5, 2026
@Abduhasen Abduhasen added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 8, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 8, 2026

Changes to the code look good.

Can you explain why .padEnd(2, "0") is optional in Sprint-1/3-mandatory-interpret/3-to-pounds.js?
You don't have to make any change to the file. Just respond in the comment will do.


this PR is for the Structuring and Testing Data.

This description (In the PR description) is too general. Can you give a more specific description of what you have changed?

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 8, 2026
@Abduhasen Abduhasen added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 8, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 8, 2026

Changes to the code are good.

Would be better if you can also address the comments in the two unresolved conversations.

I will mark this PR as "Complete" first.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed 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. labels Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants