EraCode practice

Public coding challenges

Browse community-shared practice across technologies. These pages are teasers only — skill maintenance still happens when you attempt the full challenge inside EraCode.

Compose props with intersection types

intermediateMulti-PartTypeScript

Practice composing object shapes in TypeScript using structural typing. One quiz + one tiny coding gap.

Env config: validate and default a feature flag

intermediateMulti-PartZod

Quick Zod practice on environment/config parsing: interpret env strings safely and provide a sensible default.

Path Aliases: Clean Imports in a Next.js App

intermediateMulti-PartNext.js

Practice a focused Next.js modules/imports skill: using a TypeScript path alias to avoid brittle relative imports.

Fast conditional GETs with ETag (Express optimization)

intermediateMulti-PartExpress

Practice an optimization pattern in Express: let clients reuse cached responses by supporting conditional GETs with ETags.

Daily Routing: Match URL Paths with a Compiled Pattern

intermediateMulti-PartPython

Practice a small routing/navigational pattern: choosing the right handler for a URL path using a compiled route table.

Schema-qualified calls to functions in other modules

intermediateMulti-PartSQL

Practice using SQL module-like organization via schemas by calling a function from a different schema safely and explicitly.

Bucket rows with CASE in PostgreSQL

intermediateMulti-PartPostgreSQL

Practice PostgreSQL conditional logic by classifying rows into a small set of status labels using CASE, and sanity-checking the results with simple queries.

Accessible Focus Rings with `focus-visible`

intermediateMulti-PartTailwind CSS

Practice Tailwind CSS accessibility by applying a keyboard-only focus indicator using the `focus-visible` variant—without adding noisy focus styles for mouse users.

Daily Git: Quickly ignore a build artifact (without editing .gitignore)

intermediateMulti-PartGit

Practice Git file I/O hygiene by marking a tracked or untracked build artifact as locally ignored using Git’s index/info exclude mechanism.

ANSI Styling: Safely Wrap Text with Color Codes

intermediateMulti-PartC

Practice a small UI/styling pattern in C: emitting ANSI escape sequences to color terminal output without breaking resets.

Build Context Minimization via .dockerignore

intermediateMulti-PartDocker

Practice a fast, real-world Docker dependency-injection pattern: keep the build context clean so only the intended dependency manifests get sent to the daemon and used for caching.

Route a container through a custom Docker network

intermediateMulti-PartDocker

Practice container-to-container routing by attaching a running container to a user-defined bridge network and verifying name-based reachability.

Canonicalize a slug for a Next.js dynamic route

intermediateMulti-PartNext.js

Quick practice on string normalization for SEO-friendly routing in Next.js: understand when to redirect and implement a tiny slug canonicalizer.

Type-safe API error handling with discriminated unions

intermediateMulti-PartThird-party APIs

Practice designing and consuming a typed response shape from a third-party API using a discriminated union so callers can safely branch on success vs error.

Iterate Object Entries Safely with Typed Keys

intermediateMulti-PartTypeScript

Practice iterating over an object’s key/value pairs while preserving key types in TypeScript.

Inject request-scoped data into templates with a context processor

intermediateMulti-PartDjango

Practice Django dependency injection via template context processors: identify the right hook and implement a tiny request-aware injector.

SushiSwap Routing: Stable URL State for Swap

advancedMulti-PartSushiswap

Practice advanced routing/navigation by encoding a swap state into a canonical URL querystring and ensuring it round-trips reliably.

Toggle DRF Renderers by Environment

intermediateMulti-PartDjango REST Framework

Practice a small but real-world DRF configuration task: enable the Browsable API only in development while keeping production JSON-only.

Daily Flask: Return a 204 No Content correctly

intermediateMulti-PartFlask

Practice a small but common Flask core API detail: returning an empty response with the correct status code (and no accidental body).

Per-request Sequelize transactions in Express middleware

intermediateMulti-PartSequelize

Practice wiring Sequelize into request flow: start a transaction in middleware, make it available to downstream handlers, and ensure it commits/rolls back correctly.

Fast counts: avoid extra JOIN work with `subQuery: false`

intermediateMulti-PartSequelize

Practice a small Sequelize optimization: make `findAndCountAll` generate a leaner count query when you have includes that can inflate work.

Lifecycle: deterministic package initialization with .onLoad

advancedMulti-PartR

Practice R package lifecycle/initialization by wiring a one-time setup hook correctly and reasoning about when it runs.

Config Snapshot: Read an Env Var with a Safe Default

advancedMulti-PartR

Practice a small but nuanced environment/config pattern in R: reliably reading a configuration value from an environment variable while providing a deterministic default.

LIBOR Modules: Safe Optional Imports via Lazy Loading

advancedMulti-PartLIBOR

Quick check + one small coding gap on module/import patterns: choosing a strategy for optional dependencies and implementing a lazy import fallback.

Browse by technology