Code review classics
Pull-request snippets with the problems interviewers expect you to catch: security, performance, reliability.
- Review a Laravel Orders Controller A short Laravel controller with an N+1 query, mass assignment, a missing authorization check and an unbounded query.
- Review an Express User Search Endpoint An Express route that builds SQL from the query string, returns password hashes and leaks errors.
- Review a Payment Webhook Handler A FastAPI webhook that trusts unsigned requests and credits accounts twice when the provider retries.
- Review a Sign-Up Function A registration function with a check-then-insert race, weak password hashing and an account-enumeration leak.
- 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.
- Review a React Search Component A search-as-you-type component with a request race, a leaking interval and an unstable list key.
- 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.
- Review a jQuery Shopping Cart Script Legacy jQuery that stacks event handlers on every refresh, builds HTML from server data and uses synchronous AJAX.
- Review a Python Service Client An HTTP client that logs secrets, has no timeouts, swallows every exception and retries in a tight loop.
- Review a PHP Money Transfer A balance transfer with no transaction, a lost-update race, float money and no ownership check.
- Review a Java Order Service A Spring-style singleton service with shared mutable state, a broken lazy init, leaked JDBC resources and swallowed exceptions.
- 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.
- 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.
- Review a TypeScript API Client A typed fetch wrapper that retries payments, trusts unvalidated JSON and stores tokens in localStorage.
- 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.