-
-
Notifications
You must be signed in to change notification settings - Fork 153
London | ITP-May-2025 | Jamal Laqdiem| Module-Data-Groups | Sprint 1 #557
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
Sprint-1/implement/dedupe.test.js
Outdated
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.
Tests passed, well done. Could your approach be more succinct? Research test.each
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.
done. thanks for reviewing.
Sprint-1/implement/max.test.js
Outdated
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.
Tests passed, well done
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.
thanks for reviewing.
Sprint-1/implement/sum.test.js
Outdated
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.
Test passed, well done
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.
thanks for reviewing.
Sprint-1/refactor/includes.js
Outdated
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.
Code works fine, just one consideration, do you really need lines 4-6. It's not an error just consider 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.
you are right, even if with an if statement will get an early exit if the list is empty does not change much as the for..of loop handle this as well. thanks for reviewing.
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.
sense checked the code - looks fine. This should work providing relevant file is available. Consider how you would code to catch and handle an error ( for example a file not being available). Just something to think about./research
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.
Thanks for reviewing, I will do.
A few points to consider, overall good work. |
… handling non-numeric values and empty inputs.
Jamal, it says that your branch has conflicts to be resolved. Have a look at this. |
I'm trying from last night to get the issue of median.test.js file who is doing this, still trying to rebase. |
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 generally looking good, but sometimes a bit more complicated than it could be. Please take a look at my comments and update your code or reply to them with thoughts!
Sprint-1/implement/max.js
Outdated
@@ -1,4 +1,27 @@ | |||
function findMax(elements) { | |||
if (elements.length === 0) { |
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.
What are you guarding against with this if
statement? If you removed it, what would break in your code?
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.
thanks for reviewing, this if statement check in case of empty array will return -infinity as requested, it would return an incorrect and misleading result for an empty array.
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.
What result would it return for an empty array, if you removed this special case? Read through the code line-by-line and try to work it out.
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.
Thanks for reviewing, after examining the code again i can clearly notice that the if condition in the line 2 is redundant, as the for loop handle that case and return -infinity.
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.
Sounds good! If you push a change fixing this, we can call this PR complete :)
Please respond to all comments before requesting review again - it's ok to respond by changing code, or by replying to them with an answer. |
Thanks for taking time to review, from my side it look like I answered to your 4 comments, I may be missing something, could you please specify what is missing. |
I had to submit the comments from file changed, as they were pending. |
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'm glad we could work that out, thanks! Just one comment left to work through :)
Sprint-1/implement/max.js
Outdated
@@ -1,4 +1,27 @@ | |||
function findMax(elements) { | |||
if (elements.length === 0) { |
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.
What result would it return for an empty array, if you removed this special case? Read through the code line-by-line and try to work it out.
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.