Skip to content

Sheffield | 26-Jan-ITP | Karim M'hamdi| Sprint 2 | Book library#459

Closed
KKtech06 wants to merge 4 commits intoCodeYourFuture:mainfrom
KKtech06:Book-lilbrary
Closed

Sheffield | 26-Jan-ITP | Karim M'hamdi| Sprint 2 | Book library#459
KKtech06 wants to merge 4 commits intoCodeYourFuture:mainfrom
KKtech06:Book-lilbrary

Conversation

@KKtech06
Copy link
Copy Markdown

@KKtech06 KKtech06 commented Apr 19, 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: I used the general feedback link to improve the code - fixed HTML errors using the W3C validator and cleaned up script.js by fixing variable names and removing unnecessary code.

Questions: N/A

@KKtech06 KKtech06 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 19, 2026
Copy link
Copy Markdown
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.

Can you check if any of this general feedback can help you further improve your code?
https://github.com/CodeYourFuture/Module-Data-Flows/blob/general-review-feedback/debugging/book-library/feedback.md

Doing so can help me speed up the review process. Thanks.

@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 Apr 20, 2026
@KKtech06
Copy link
Copy Markdown
Author

Hey CJ, I went through the general feedback link you shared and used the W3C validator to find and fix the errors in my HTML. I also went through my script.js and sorted out a few small things like the variable names and some unnecessary code.

Thank you :)

@KKtech06 KKtech06 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 21, 2026
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
@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 Apr 21, 2026
@KKtech06 KKtech06 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 22, 2026
Comment thread debugging/book-library/script.js Outdated
true
);
const book1 = new Book("Robison Crusoe", "Daniel Defoe", 252, true);
const book2 = new Book( "The Old Man and the Sea", "Ernest Hemingway",127,true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Spacing not consistent. Have you enabled "Format on save" and selected "Prettier" as your default JS Formatter on your VSCode?

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.

Hey CJ, I turned on Prettier in VSCode so it now automatically fixes the spacing every time I save the file

Comment on lines +35 to +40
const book = new Book(
titleInput.value,
authorInput.value,
Number(pagesInput.value),
checkInput.checked
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • The code checks the trimmed value but it uses the untrimmed values.
  • Repeatedly convert string to number can affect performance.

A better and safer approach to deal with user input is to first store the preprocessed input in variables,
then use those cleaned values consistently throughout the rest of the code.

@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 Apr 22, 2026
@KKtech06 KKtech06 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 22, 2026
@cjyuan
Copy link
Copy Markdown
Contributor

cjyuan commented Apr 22, 2026

Changes look good.

@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. labels Apr 22, 2026
@illicitonion
Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants