Skip to content

Exercises

Pick a diff.

Each one is a change to a file, with the tests that ship alongside it. Most carry exactly one defect. Some carry none at all, and saying so is worth points.

Every exercise, by domain and difficulty
SubjectDomainDifficultyStatus
Config loader1 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loader2 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loader3 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loader4 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loader5 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing2not attempted
Config loader6 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing2not attempted
Config loader7 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
Config loader8 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
Config loader9 of 9Reads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
CSV parserParses delimited text with quoted fields, escaped quotes and a header rowParsing3not attempted
Currency formatterRenders an amount in minor units as text, per currency and localeMoney1not attempted
Date range overlap1 of 5Decides whether two half-open date ranges overlap, and merges the ones that doDates1not attempted
Date range overlap2 of 5Decides whether two half-open date ranges overlap, and merges the ones that doDates1not attempted
Date range overlap3 of 5Decides whether two half-open date ranges overlap, and merges the ones that doDates2not attempted
Date range overlap4 of 5Decides whether two half-open date ranges overlap, and merges the ones that doDates2not attempted
Date range overlap5 of 5Decides whether two half-open date ranges overlap, and merges the ones that doDates3not attempted
Directory sort1 of 2Orders a list of people for display, grouping them by initialCollections1not attempted
Directory sort2 of 2Orders a list of people for display, grouping them by initialCollections2not attempted
Line diff1 of 3Computes a line-by-line diff from the longest common subsequence of two textsCollections3not attempted
Line diff2 of 3Computes a line-by-line diff from the longest common subsequence of two textsCollections4not attempted
Line diff3 of 3Computes a line-by-line diff from the longest common subsequence of two textsCollections4not attempted
LRU cache1 of 2Caches values up to a capacity, evicting whichever was used least recentlyCache2not attempted
LRU cache2 of 2Caches values up to a capacity, evicting whichever was used least recentlyCache4not attempted
Notification outbox1 of 2Drains a queue of pending notifications, releasing its lease whatever happensAsync1not attempted
Notification outbox2 of 2Drains a queue of pending notifications, releasing its lease whatever happensAsync3not attempted
Order pricing1 of 4Totals a basket in minor units, applying tiered discounts and taxMoney1not attempted
Order pricing2 of 4Totals a basket in minor units, applying tiered discounts and taxMoney1not attempted
Order pricing3 of 4Totals a basket in minor units, applying tiered discounts and taxMoney2not attempted
Order pricing4 of 4Totals a basket in minor units, applying tiered discounts and taxMoney3not attempted
Paginated list endpointServes a page of records with a cursor, a limit and a total countAPI handlers3not attempted
Permission middleware1 of 2Decides whether a principal may perform an action on a resourceAuth1not attempted
Permission middleware2 of 2Decides whether a principal may perform an action on a resourceAuth2not attempted
Query builder1 of 3Assembles a parameterised select statement with sorting and pagingAPI handlers2not attempted
Query builder2 of 3Assembles a parameterised select statement with sorting and pagingAPI handlers2not attempted
Query builder3 of 3Assembles a parameterised select statement with sorting and pagingAPI handlers3not attempted
Recurring schedule1 of 3Expands a daily or weekly rule into the instants a job should runDates2not attempted
Recurring schedule2 of 3Expands a daily or weekly rule into the instants a job should runDates2not attempted
Recurring schedule3 of 3Expands a daily or weekly rule into the instants a job should runDates4not attempted
Retry wrapperRetries a failing operation with exponential backoff and a jittered delayAsync2not attempted
Session validatorChecks a session token for expiry, revocation and binding before trusting itAuth3not attempted
Sign-in handler1 of 6Verifies a password and returns a result the caller can act on safelyAuth1not attempted
Sign-in handler2 of 6Verifies a password and returns a result the caller can act on safelyAuth1not attempted
Sign-in handler3 of 6Verifies a password and returns a result the caller can act on safelyAuth2not attempted
Sign-in handler4 of 6Verifies a password and returns a result the caller can act on safelyAuth2not attempted
Sign-in handler5 of 6Verifies a password and returns a result the caller can act on safelyAuth3not attempted
Sign-in handler6 of 6Verifies a password and returns a result the caller can act on safelyAuth3not attempted
Slug generator1 of 3Turns a title into a url-safe slug, keeping them unique within a collectionParsing1not attempted
Slug generator2 of 3Turns a title into a url-safe slug, keeping them unique within a collectionParsing2not attempted
Slug generator3 of 3Turns a title into a url-safe slug, keeping them unique within a collectionParsing2not attempted
Stock levels1 of 5Aggregates stock across warehouses and decides what needs reorderingCollections1not attempted
Stock levels2 of 5Aggregates stock across warehouses and decides what needs reorderingCollections2not attempted
Stock levels3 of 5Aggregates stock across warehouses and decides what needs reorderingCollections2not attempted
Stock levels4 of 5Aggregates stock across warehouses and decides what needs reorderingCollections3not attempted
Stock levels5 of 5Aggregates stock across warehouses and decides what needs reorderingCollections3not attempted
Token bucket rate limiter1 of 2Allows a burst of requests per client and refills the allowance over timeAsync1not attempted
Token bucket rate limiter2 of 2Allows a burst of requests per client and refills the allowance over timeAsync2not attempted

56 exercises across 8 domains.