EraCode practice
Browse community-shared practice across technologies. These pages are teasers only — skill maintenance still happens when you attempt the full challenge inside EraCode.
Practice a small JavaScript accessibility pattern: move keyboard focus to an error summary after validation so screen reader and keyboard users get immediate context.
Quick check-in on JavaScript testing: understand when to use a spy and implement a tiny Jest assertion to verify call arguments.
Quick performance-focused drill: identify when context updates cause unnecessary renders, then fix a small Provider so its value stays referentially stable across renders unless the data actually changes.
Practice treating a SQL transaction as the “request scope” so multiple queries in one request see a consistent view of data.
Quick daily practice on AWS data structures: choose an efficient DynamoDB attribute type and implement a tiny helper that builds a compact DynamoDB item from a JS object.
Quick practice on Python testing: assert a stable snapshot of a function’s returned dict using pytest.
Practice an internationalization pattern on AWS: using CloudFront geolocation to pick a locale-specific origin path without changing your app code.
Practice a lifecycle/initialization pattern in AWS Lambda: doing expensive setup once per execution environment and reusing it across invocations.
Practice preventing accidental recursion in AWS Step Functions by using execution metadata to short-circuit loops.
Security/validation micro-practice: prevent mass-assignment by rejecting requests that include properties not defined in your DTO.
You’ll answer one advanced conceptual question about numeric validation in NestJS, then fill a single missing piece in a custom pipe that parses a route param into a finite number with bounds.
Practice iterating over a dataset to prebuild dynamic routes in the Next.js App Router using generateStaticParams.
Quick daily practice on testing Next.js client components: mock the App Router navigation hook so you can assert route changes without a real browser.
Quick practice on handling async side effects safely by making a request cancellable with AbortController.
Quick check on ES module import shapes in a React codebase: identify correct import usage and patch a single broken import so the app renders.
Practice Flask context-based dependency injection by attaching a request-scoped service to the application context and retrieving it inside a route.
Practice a small but meaningful accessibility improvement in a Next.js App Router layout: add an aria-live announcement so screen reader users get feedback when navigation completes.
Return an HTML page from a **Cloudflare Worker** where a `<style>` tag is allowed by CSP without using `unsafe-inline`. - Generate a per-request nonce and apply it to the `<style>` tag. - Set a `Content-Security-Policy` header that allows only that nonce for `style-src`. - Keep everything else simple (just return the HTML + headers).
Implement **one data-structure update** in a Cloudflare **Durable Object**. - Store a **set of unique visitor IDs** for a given day in Durable Object storage. - When a visitor ID is recorded, it should be added only once (idempotent). - Return the updated **unique count** for that day.
Practice a common SQL idiom for picking the latest record per group using a window function, plus a quick concept check about trade-offs.
Quick practice on Python data structures: understand heap behavior and implement a small top-K selection using a heap.
Practice a Flask idiom: keeping error handling scoped to a Blueprint instead of global app-wide handlers.
Quick practice on JavaScript data structures: using Map for frequency counting, plus a short concept check.
Quick practice on Next.js navigation: keep existing query params when routing to a new path.