Skip to content

Feat: add prototype for workshop-sensor-burst-analyzer#1071

Open
sebacodes wants to merge 9 commits intofreeCodeCamp:mainfrom
sebacodes:prototype/workshop-sensor-burst-analyzer
Open

Feat: add prototype for workshop-sensor-burst-analyzer#1071
sebacodes wants to merge 9 commits intofreeCodeCamp:mainfrom
sebacodes:prototype/workshop-sensor-burst-analyzer

Conversation

@sebacodes
Copy link

@sebacodes sebacodes commented Dec 12, 2025

Checklist:

relates to freeCodeCamp/freeCodeCamp#64114

@jdwilkin4
Copy link
Contributor

Is this ready for review?
Or is this still being worked on?

If it is ready, please bring it out of draft status

- Change summarizedData from array `[[],[],[]]` to object `{"min":[],"max":[],"avg":[]}`
  to match prototype specifications
- Round average values in summarizeSensorData for cleaner output
- Use object property notation (summarizedData.min.push, and so on.) instead of array indices
- Fix minor typos and improve comments
@sebacodes sebacodes marked this pull request as ready for review January 29, 2026 03:32
@sebacodes
Copy link
Author

Status changed, ready for review

Copy link
Contributor

@jdwilkin4 jdwilkin4 left a comment

Choose a reason for hiding this comment

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

I am not sure I understand the learning objectives in this workshop.

Is it to practice arrays?
working with loops?
something else?

where is this supposed to go in the curriculum?

I am going to tag Naomi to review this 👍🏾

- file do not belongs to the root directory
- file goes on fullstack-cert/js-projects/sensor-burst-analyzer/ directory but is not being use
@jdwilkin4
Copy link
Contributor

@sebacodes

Are there answers for my questions here?

#1071 (review)

@naomi-freecodecamp
Copy link

Hey @sebacodes! Thanks for your patience on this one — I've been reviewing everything and I owe you some clarity. 🙂

After looking at where this workshop sits in the curriculum, I realised the original user stories were asking for map, reduce, some, and every — but those methods aren't taught until later. This workshop is the first hands-on practice after the "Working with Common Array Methods" lecture, which covers indexOf, splice, includes, concat, slice, and spread. So I've revised the scope to match.

The new user stories are:

  • getWindow(burst, start, windowSize) — uses slice to extract a window of readings from a burst (this is actually a cleaner approach to windowed analysis than the sliding window loop, and fits the curriculum perfectly!)
  • detectSilence(burst) — uses includes to check if a burst contains any zero reading
  • findReading(burst, value) — uses indexOf to locate a specific reading, returning -1 if not found
  • replaceFaultyReading(burst, index, newValue) — uses splice to replace a reading (pair this with spread to create a copy first, keeping with the no-mutation rule)
  • mergeSensorData(dataset1, dataset2) — uses concat to combine two datasets

Your confusion about the approach makes complete sense given the original spec wasn't aligned with the curriculum — that was on me, not you. The good news is the rework is fairly focused: swap out the existing functions for these five, each built around one of the lecture methods.

Happy to answer any questions in Discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants