Code review classics

Pull-request snippets with the problems interviewers expect you to catch: security, performance, reliability.

  1. Review a Laravel Orders Controller A short Laravel controller with an N+1 query, mass assignment, a missing authorization check and an unbounded query. Medium Most asked PHP
  2. Review an Express User Search Endpoint An Express route that builds SQL from the query string, returns password hashes and leaks errors. Easy Most asked Node.js
  3. Review a Payment Webhook Handler A FastAPI webhook that trusts unsigned requests and credits accounts twice when the provider retries. Medium Most asked Python
  4. Review a Sign-Up Function A registration function with a check-then-insert race, weak password hashing and an account-enumeration leak. Medium Python
  5. Review a CSV Export Endpoint An export that loads a whole table into memory, runs a query per row and builds the CSV by hand. Medium Python
  6. Review a React Search Component A search-as-you-type component with a request race, a leaking interval and an unstable list key. Medium Most asked TypeScript
  7. Review a Vue Comment List A Vue component that renders user HTML with v-html, mutates its props and combines v-if with v-for. Medium Node.js
  8. Review a jQuery Shopping Cart Script Legacy jQuery that stacks event handlers on every refresh, builds HTML from server data and uses synchronous AJAX. Easy Node.js
  9. Review a Python Service Client An HTTP client that logs secrets, has no timeouts, swallows every exception and retries in a tight loop. Medium Python
  10. Review a PHP Money Transfer A balance transfer with no transaction, a lost-update race, float money and no ownership check. Medium Most asked PHP
  11. Review a Java Order Service A Spring-style singleton service with shared mutable state, a broken lazy init, leaked JDBC resources and swallowed exceptions. Hard Java
  12. Review a Node.js Batch Processor A batch job that fires 200,000 requests at once, loads everything into memory and loses track of failures. Medium Node.js
  13. Review a Laravel Queue Job A queued job that emails every user in one run, holds the whole table in memory and double-sends on retry. Medium PHP
  14. Review a TypeScript API Client A typed fetch wrapper that retries payments, trusts unvalidated JSON and stores tokens in localStorage. Medium TypeScript
  15. Review a Python Cache-Aside Helper A Redis cache helper with no expiry, a stampede on popular keys, pickle deserialisation and stale data after writes. Hard Python

← All coding problems