Tasks

Browse and filter all 110 benchmark tasks across 6 difficulty tiers and multiple languages.

Tier Breakdown

TierRangeCountSimulates
1 - TrivialP1–P1010Quick fixes
2 - EasyP11–P2515Single-file tasks
3 - MediumP26–P5025Multi-function work
4 - HardP51–P7525Complex tasks
5 - ExpertP76–P10025Real-world projects
Multi-langP101–P11010TS, Rust, Go, SQL

Task Catalog

Search, filter by tier or language, and sort by any column.

110 tasks
Tags
P1T1 TrivialFix off-by-one error in list slicing when computing the last page of paginated results.python
bugfixpagination
P2T1 TrivialReplace a hard-coded magic number with a named constant for HTTP timeout seconds.python
refactorconstants
P3T1 TrivialCorrect a typo in a log message that says 'succesful' instead of 'successful'.python
loggingtypo
P4T1 TrivialAdd missing type hint for a function parameter that currently triggers mypy warnings.python
typingmypy
P5T1 TrivialChange default argument from mutable list to None and initialize inside the function body.python
bugfixdefaults
P6T1 TrivialFix incorrect f-string brace escaping in a user-facing error template.python
stringsbugfix
P7T1 TrivialSwap two variables using tuple unpacking instead of a temporary variable for readability.python
refactorstyle
P8T1 TrivialAdd a guard clause to return early when input string is empty before processing.python
validationearly-return
P9T1 TrivialReplace deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc).python
datetimedeprecation
P10T1 TrivialFix unit test assertion that compares floats with == instead of pytest.approx.python
testingfloating-point
P11T2 EasyImplement CSV export for the user directory in a single Flask route without changing the database layer.python
flaskcsvexport
P12T2 EasyAdd input validation with pydantic for a REST request model in one module.python
pydanticvalidationapi
P13T2 EasyRefactor duplicated retry logic into a single decorator applied to three API client methods in one file.python
refactordecoratorretries
P14T2 EasyImplement exponential backoff for a synchronous HTTP client wrapper using time.sleep.python
httpbackoffresilience
P15T2 EasyAdd docstrings and doctest examples to utility functions for string normalization in utils.py.python
documentationdoctest
P16T2 EasyConvert a class-based context manager to a @contextmanager generator function.python
context-managerrefactor
P17T2 EasyWire up argparse subcommands for init, validate, and run in a single CLI entrypoint.python
cliargparse
P18T2 EasyImplement LRU cache for expensive pure function results using functools.lru_cache with maxsize.python
cachingperformance
P19T2 EasyAdd structured JSON logging with a correlation_id field propagated through request handlers.python
loggingobservability
P20T2 EasyReplace blocking socket reads with asyncio streams in one network module while keeping the public API stable.python
asyncionetworking
P21T2 EasyImplement a simple in-memory rate limiter using a sliding window counter per client IP.python
rate-limitingsecurity
P22T2 EasyAdd property-based tests with Hypothesis for a sorting helper that must be stable.python
testinghypothesis
P23T2 EasySerialize dataclass instances to JSON with a custom default encoder in one serialization module.python
jsondataclasses
P24T2 EasyFix resource leak by ensuring file handles are closed using pathlib and a with statement in a parser.python
iobugfix
P25T2 EasyImplement a tiny plugin registry: register callables by name and invoke by string key.python
patternsregistry
P26T3 MediumRefactor authentication middleware to extract JWT claims once and attach a typed user object to the request context.python
fastapijwtmiddleware
P27T3 MediumSplit an oversized views.py into blueprints for users, posts, and admin while preserving URL routes.python
djangorefactorstructure
P28T3 MediumAdd database migration to introduce a nullable deleted_at column and update ORM queries to filter soft-deleted rows.python
sqlalchemymigrationssoft-delete
P29T3 MediumImplement idempotent webhook handler with signature verification, dedupe store, and structured audit logs.python
webhookssecurityidempotency
P30T3 MediumIntroduce repository pattern between service layer and raw SQL calls without changing outward HTTP responses.python
architecturesqllayering
P31T3 MediumAdd OpenTelemetry spans around external API calls and database transactions with consistent attribute naming.python
observabilityopentelemetry
P32T3 MediumBuild a background job worker using Redis queues: enqueue, retry on failure, and dead-letter after max attempts.python
redisworkersreliability
P33T3 MediumOptimize N+1 query pattern in a list endpoint by eager-loading related entities with joinedload.python
performanceorm
P34T3 MediumImplement feature flags read from environment with safe defaults and unit tests for each flag branch.python
feature-flagstesting
P35T3 MediumAdd pagination metadata (total, next cursor) to JSON API responses while keeping backward compatibility.python
apipagination
P36T3 MediumHarden file upload endpoint: validate MIME type, size limits, and sanitize filenames before storage.python
securityuploads
P37T3 MediumIntroduce circuit breaker around flaky third-party API with metrics hooks for open/half-open states.python
resilienceintegrations
P38T3 MediumMigrate settings from os.environ scattered reads to a centralized pydantic Settings class with validation.python
configurationpydantic
P39T3 MediumAdd role-based access checks to admin endpoints with reusable dependency injection guards.python
authorizationfastapi
P40T3 MediumImplement CSV ingestion pipeline: stream rows, validate schema row-by-row, and bulk insert valid batches.python
etlcsvperformance
P41T3 MediumAdd Express middleware that attaches requestId from x-request-id header or generates UUID for tracing.javascript
expressmiddlewareobservability
P42T3 MediumRefactor duplicated DOM query logic in a vanilla JS dashboard into small pure helper functions in one bundle.javascript
refactorfrontend
P43T3 MediumFix race condition in client-side debounced search by cancelling in-flight fetch with AbortController.javascript
fetchasyncbugfix
P44T3 MediumImplement client-side form validation mirroring server rules for a signup page using a shared JSON schema.javascript
validationforms
P45T3 MediumAdd Node.js script to transform legacy CommonJS modules to ESM exports without changing runtime behavior.javascript
nodejsmodulesmigration
P46T3 MediumWire up Jest tests for a utility that parses query strings with edge cases for empty keys and arrays.javascript
testingjest
P47T3 MediumIntroduce environment-based API base URL selection for a React app built with Vite, including type-safe env access.javascript
reactviteconfiguration
P48T3 MediumAdd WebSocket client reconnection with exponential backoff and UI state for disconnected/connected modes.javascript
websocketresiliencefrontend
P49T3 MediumOptimize hot path in a Python data transformation: vectorize with NumPy where loops dominate runtime.python
numpyperformance
P50T3 MediumImplement transactional outbox pattern draft: write domain event row in same DB transaction as aggregate update.python
eventstransactionsarchitecture
P51T4 HardRefactor user authentication to use JWT access tokens plus rotating refresh tokens stored server-side.python
authjwtsecurity
P52T4 HardAdd WebSocket support to a chat server: rooms, presence, and broadcast with Redis pub/sub across instances.python
websocketredisrealtime
P53T4 HardSplit monolithic FastAPI app into packages for routers, schemas, services, and repositories with clean imports.python
fastapistructurerefactor
P54T4 HardImplement OAuth2 client credentials flow for machine-to-machine calls to an external API with token caching.python
oauth2integrations
P55T4 HardMigrate Flask session-based auth to stateless JWT while preserving logout semantics via token denylist.python
flaskauthmigration
P56T4 HardAdd full-text search using Postgres tsvector across posts and comments with ranked results API.python
postgressearchapi
P57T4 HardIntroduce Celery tasks for thumbnail generation, progress tracking, and cleanup of orphaned files on S3.python
celeryasync-jobsstorage
P58T4 HardBuild multi-tenant isolation: tenant_id scoping on queries, middleware enforcement, and integration tests.python
multi-tenantsecuritytesting
P59T4 HardImplement GraphQL resolver batching with DataLoader equivalents in Python to fix over-fetching in nested queries.python
graphqlperformance
P60T4 HardAdd canary release routing: percentage-based traffic split behind nginx config generated from a small Python tool.python
deploymentroutingtooling
P61T4 HardRefactor payment integration: separate gateway adapter, idempotency keys, and reconciliation report generator.python
paymentsarchitecturereliability
P62T4 HardIntroduce event sourcing for order state transitions with snapshots for fast rebuild and audit trail export.python
eventsdomain-modelpersistence
P63T4 HardAdd SSRF protections to a URL fetcher: DNS rebinding checks, blocklists, and scheme restrictions with tests.python
securityssrftesting
P64T4 HardMigrate from SQLite to Postgres in development and CI with docker-compose, fixtures, and parity tests.python
databasedockermigration
P65T4 HardImplement plugin system loading third-party Python modules from a sandboxed directory with capability checks.python
pluginssecurityextensibility
P66T4 HardAdd end-to-end API contract tests comparing OpenAPI spec to live responses using schemathesis in CI.python
testingopenapici
P67T4 HardSplit a large React component tree into lazy-loaded routes with error boundaries and suspense fallbacks.javascript
reactperformancerouting
P68T4 HardMigrate frontend state from prop drilling to a lightweight Zustand store with selectors and devtools logging.javascript
reactstate-managementrefactor
P69T4 HardAdd Playwright tests for critical checkout flow including network stubs and visual diff for receipt page.javascript
e2eplaywrighttesting
P70T4 HardImplement Node.js BFF layer that aggregates three microservice calls with timeouts, partial failure handling, and caching.javascript
nodejsbffresilience
P71T4 HardIntroduce TypeScript gradually to a JS codebase: enable allowJs, add types to shared utilities, fix strict errors.typescript
migrationstrictnessfrontend
P72T4 HardBuild mixed Python worker + Node.js dashboard: expose metrics via Prometheus and render charts in the UI.python
observabilityprometheusfull-stack
P73T4 HardHarden CORS and CSRF story across SPA and API: cookie settings, SameSite, and double-submit token pattern.javascript
securitycorscsrf
P74T4 HardRefactor legacy jQuery UI widgets to modular ES modules while preserving keyboard accessibility behaviors.javascript
refactora11ylegacy
P75T4 HardAdd distributed tracing correlation between Python API and Node.js worker using W3C trace context headers.python
tracingmicroservicesobservability
P76T5 ExpertDesign and implement a configurable rules engine for pricing with versioned rulesets and dry-run evaluation API.python
rules-engineapiarchitecture
P77T5 ExpertBuild a reproducible ML training pipeline: data versioning, experiment tracking, and hyperparameter sweeps on a cluster.python
mlpipelinesreproducibility
P78T5 ExpertImplement zero-downtime database migration for a large table: dual-write, backfill, cutover, and rollback plan.python
databasemigrationreliability
P79T5 ExpertAdd supply-chain style SBOM generation and license compliance report to CI for Python dependencies.python
securitycomplianceci
P80T5 ExpertIntroduce fine-grained ABAC policy checks using OPA sidecar evaluating Rego policies for each request.python
authorizationopamicroservices
P81T5 ExpertImplement a streaming CSV parser with backpressure in asyncio feeding a bounded worker pool.python
asynciostreamingperformance
P82T5 ExpertRefactor a Django monolith into modular apps with shared contracts and bounded context documentation.python
djangodddrefactor
P83T5 ExpertAdd chaos testing hooks: inject latency/faults in dev/stage for critical paths with safety guards.python
reliabilitytestingdevops
P84T5 ExpertBuild a multi-region active-active draft: conflict-free replicated data types for counters with operational runbooks.python
distributed-systemscrdtops
P85T5 ExpertImplement secure secret rotation for API keys: dual-key acceptance window, alerts, and automated rollout jobs.python
securitysecretsoperations
P86T5 ExpertAdd a code-generation step from protobuf definitions to Python clients with CI drift detection.python
grpccodegenci
P87T5 ExpertIntroduce read replicas with stale-read controls: session stickiness hints and freshness SLAs in service layer.python
databasescalingarchitecture
P88T5 ExpertImplement a pluggable storage backend (local, S3, GCS) behind a stable interface with integration tests per provider.python
storageabstractiontesting
P89T5 ExpertBuild a rate-limited public API product tier with usage metering, billing hooks, and customer dashboards.python
apibillingsaas
P90T5 ExpertAdd static analysis custom rules (semgrep) for dangerous patterns in internal frameworks with CI enforcement.python
securitystatic-analysisci
P91T5 ExpertMigrate Ruby on Rails session store to Redis with sticky sessions on load balancer and failover drills.ruby
railsredissessions
P92T5 ExpertImplement Java Spring Boot actuator security hardening and custom health indicators for downstream dependencies.java
spring-bootobservabilitysecurity
P93T5 ExpertAdd Kotlin coroutine-based batch processor replacing blocking JDBC with reactive R2DBC where appropriate.kotlin
springr2dbcperformance
P94T5 ExpertRefactor C# ASP.NET Core middleware pipeline for authentication, exception mapping, and problem details RFC7807.csharp
aspnetcoreapierrors
P95T5 ExpertIntroduce Go service for edge authentication proxy validating tokens and injecting headers to upstream Python API.go
microservicesauthproxy
P96T5 ExpertImplement Rust FFI bindings for a performance-critical codec and safe error propagation to Python via pyo3.rust
ffiperformanceinterop
P97T5 ExpertAdd Swift iOS client changes for certificate pinning and background refresh aligned with updated token lifetimes.swift
iossecuritymobile
P98T5 ExpertBuild PHP Laravel queue workers with horizon monitoring, retry policies, and idempotent job handlers.php
laravelqueuesreliability
P99T5 ExpertImplement Scala Spark job for incremental deduplication with watermarking and checkpointed state on object storage.scala
sparkdataincremental
P100T5 ExpertAdd Elixir Phoenix LiveView dashboard for ops metrics with role-based views and audit logging.elixir
phoenixrealtimeobservability
P101T6 Multi-langRefactor a Node.js codebase to strict TypeScript: enable strict, fix implicit any, and add zod runtime validation at boundaries.typescript
strictnesszodnodejs
P102T6 Multi-langImplement a TypeScript library published with dual ESM/CJS outputs, source maps, and API-extractor rolled .d.ts bundles.typescript
toolinglibrarybuild
P103T6 Multi-langAdd Rust async TCP server with tokio: graceful shutdown, connection limits, and structured tracing spans per connection.rust
tokionetworkingobservability
P104T6 Multi-langImplement a Rust CLI using clap derive, config file merge precedence, and integration tests with assert_cmd.rust
clitestingtooling
P105T6 Multi-langBuild a Go HTTP service with chi router, context timeouts, pprof endpoints guarded in non-prod, and table-driven tests.go
httpperformancetesting
P106T6 Multi-langAdd Go worker pool pattern with bounded concurrency, panic recovery per task, and prometheus metrics for queue depth.go
concurrencyobservabilityworkers
P107T6 Multi-langWrite idempotent SQL migration scripts for Postgres: add partial unique index, backfill, and validate with EXPLAIN plans.sql
postgresmigrationsperformance
P108T6 Multi-langOptimize a complex reporting query using window functions, CTEs, and appropriate indexes; document assumptions in comments.sql
analyticswindow-functionsindexing
P109T6 Multi-langImplement TypeScript React component library with Storybook, accessibility checks, and visual regression tests in CI.typescript
reactstorybooka11y
P110T6 Multi-langAdd Rust wasm module compiled to WebAssembly for client-side image resize with fallbacks and size budgets in bundler.rust
wasmfrontendperformance