Wooble FastTrack · Level 1: Foundational

Node.js debugging exercise

The checkout total is wrong, at BiteloopSimulation

Customers were charged the wrong amount on Monday. Fix the pricing against the rules and work out who's owed what.

  • You're the AI-enabled Full-Stack Developer
  • About 60 minutes, no timer
  • 5 days to hand in
  • Checked the moment you hand in
  • Free
Start this problem

Free. Sign up in a minute and you go straight to it.

The situation

Neha KulkarniEngineering Manager, Biteloop

Hi, welcome to the checkout team!

Your first job is a live one, sorry. Support has had a morning of customers saying they paid the wrong amount yesterday, Monday 19 October, and finance says Monday's takings don't match what our pricing rules should have produced.

Arjun changed the pricing code last week and he's on leave until Thursday. His tests all pass, which tells us the tests don't cover much. The download is the checkout service as it ran on Monday, with every order we took that day and what each one was charged.

I need, by end of day:

  1. The pricing fixed, so it follows PRICING.md exactly. PRICING.md is right; the code isn't.
  2. With your fix, what Monday's delivered orders should have been charged in total.
  3. How much we overcharged customers on those orders, added up: that's what support will refund.
  4. How much we undercharged, added up.
  5. How many delivered orders were charged anything other than the right amount.
  6. Every bug you found: where it is and what kind of mistake it is.
  7. A short note to me: what went wrong, and what we should change so the next one is caught before customers see it.

Use whatever you like: your editor, a quick script, AI. Send me a link to your fixed code too (a GitHub repo, or a gist of your changes). If you make an assumption, write it down.

Thanks, Neha

When you start, you get Biteloop's handbook and your own data: the same story as everyone else's, with different records, so your answers are yours alone.

What you hand in

  1. 1Monday's right total: What Monday's delivered orders should have been charged in total, with your fix (₹) (in whole rupees)
  2. 2Overcharged: What we charged above the right amount, added up over delivered orders (₹) (in whole rupees)
  3. 3Undercharged: What we charged below the right amount, added up over delivered orders (₹) (in whole rupees)
  4. 4Orders charged wrong: Delivered orders charged anything other than the right amount (a count)
  5. 5Bugs: A table with two columns, location and cause, uploaded as a CSV or pasted.
  6. 6Your working: A link to your fixed code: a GitHub repository, or a gist of your changes, shared so anyone with the link can see it.
  7. 7A note to Neha: 200 words at most.
  8. 8How you used AI: Your prompts or the chat, if you used it.

Your figures and your bugs are checked against your own code and orders the moment you hand in. The pass mark is 70 of 100, and the right total and the overcharge must both be right. Hand in as often as you need; every hand-in is counted.

What passing earns

  • A step to your AI-enabled Full-Stack Developer · Level 1 badge: 1 of the 2 passes it needs, and the next level opens with it.
  • A badge page that anyone can check, which you can add to LinkedIn as a certification.
  • A project on your Wooble profile made from your hand-in, when you choose to add it.
  • 50 points for the pass.

More in Level 1