Skip to content

London | ITP-May-2025 | Seddiq Azam | Module-Data-Groups | Sprint 1 #549

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

sedazam
Copy link

@sedazam sedazam commented Jul 4, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

🛠️ PR Summary: Sprint 1

This pull request includes all completed work covering core kata implementations, test coverage, refactoring, and a stretch goal from Advent of Code.


✅ Completed Work

📦 Core Katas

1. dedupe.js

  • Removes duplicate elements while preserving order.
  • Tests include:
    • Empty arrays
    • Mixed types (e.g., strings, numbers)
    • Arrays with repeated elements

2. max.js

  • Returns the maximum number in an array, ignoring non-numeric values.
  • Handles:
    • Empty arrays (-Infinity)
    • Negative numbers
    • Mixed types
    • Decimal numbers

3. sum.js

  • Sums all numeric values in an array.
  • Ignores non-number values.
  • Bug fix: corrected accumulator misuse in .reduce().
  • Handles:
    • Empty arrays
    • Negative and decimal numbers
    • Non-numeric elements

4. includes.js (Refactor)

  • Refactored to use a for...of loop instead of a traditional for loop.
  • All original tests continue to pass.

🚀 Stretch Goal: Advent of Code 2018 - Day 1

solution.js

  • Implemented calculateFrequency(changes):
    • Computes resulting frequency from a list of changes (e.g., +1, -2).
    • Starts from frequency 0 and applies all deltas.
  • Fixed syntax error: calculate FrequencycalculateFrequency.

🧪 Testing

  • Comprehensive test coverage added for all implemented functions.
  • Tests cover:
    • Edge cases
    • Common scenarios
    • Robust input handling

Questions

Ask any questions you have for your reviewer.

sedazam added 10 commits June 28, 2025 15:34
created	new file called mean.test.js:   prep/mean.test.js
created new file called mean.js
	deleted:    prep/mean.test.js
	modified:   Sprint-1/implement/dedupe.test.js
	modified:   Sprint-1/implement/max.test.js
	modified:   Sprint-1/implement/sum.test.js
	modified:   Sprint-1/refactor/includes.test.js
	new file:   prep/mean.test.js
@sedazam sedazam added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Participant to add when requesting review labels Jul 4, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 18, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good work on this sprint - you built very detailed test cases. You can close this PR now.

// return false;
// }

// module.exports = includes;

Choose a reason for hiding this comment

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

be careful of committing lots of commented-out code to git if it doesn't need to be there

Copy link
Author

Choose a reason for hiding this comment

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

I agree, unnecessary information should not be included. Thank you for the information.

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and review comments have been addressed and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 18, 2025
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 review comments have been addressed 📅 Sprint 1 Assigned during Sprint 1 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants