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
Directory sortOrders a list of people for display, grouping them by initialCollections2not attempted
Directory sortOrders a list of people for display, grouping them by initialCollections1not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing2not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing2not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing1not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing3not attempted
Config loaderReads a JSON config, fills in defaults and reports what could not be parsedParsing1not 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 overlapDecides whether two half-open date ranges overlap, and merges the ones that doDates1not attempted
Date range overlapDecides whether two half-open date ranges overlap, and merges the ones that doDates2not attempted
Date range overlapDecides whether two half-open date ranges overlap, and merges the ones that doDates1not attempted
Date range overlapDecides whether two half-open date ranges overlap, and merges the ones that doDates3not attempted
Date range overlapDecides whether two half-open date ranges overlap, and merges the ones that doDates2not attempted
Stock levelsAggregates stock across warehouses and decides what needs reorderingCollections3not attempted
Stock levelsAggregates stock across warehouses and decides what needs reorderingCollections2not attempted
Stock levelsAggregates stock across warehouses and decides what needs reorderingCollections3not attempted
Stock levelsAggregates stock across warehouses and decides what needs reorderingCollections2not attempted
Stock levelsAggregates stock across warehouses and decides what needs reorderingCollections1not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth1not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth2not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth2not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth3not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth3not attempted
Sign-in handlerVerifies a password and returns a result the caller can act on safelyAuth1not attempted
LRU cacheCaches values up to a capacity, evicting whichever was used least recentlyCache2not attempted
LRU cacheCaches values up to a capacity, evicting whichever was used least recentlyCache4not attempted
Notification outboxDrains a queue of pending notifications, releasing its lease whatever happensAsync3not attempted
Notification outboxDrains a queue of pending notifications, releasing its lease whatever happensAsync1not attempted
Paginated list endpointServes a page of records with a cursor, a limit and a total countAPI handlers3not attempted
Permission middlewareDecides whether a principal may perform an action on a resourceAuth1not attempted
Permission middlewareDecides whether a principal may perform an action on a resourceAuth2not attempted
Order pricingTotals a basket in minor units, applying tiered discounts and taxMoney1not attempted
Order pricingTotals a basket in minor units, applying tiered discounts and taxMoney2not attempted
Order pricingTotals a basket in minor units, applying tiered discounts and taxMoney3not attempted
Order pricingTotals a basket in minor units, applying tiered discounts and taxMoney1not attempted
Query builderAssembles a parameterised select statement with sorting and pagingAPI handlers2not attempted
Query builderAssembles a parameterised select statement with sorting and pagingAPI handlers2not attempted
Query builderAssembles a parameterised select statement with sorting and pagingAPI handlers3not attempted
Token bucket rate limiterAllows a burst of requests per client and refills the allowance over timeAsync1not attempted
Token bucket rate limiterAllows a burst of requests per client and refills the allowance over timeAsync2not attempted
Recurring scheduleExpands a daily or weekly rule into the instants a job should runDates2not attempted
Recurring scheduleExpands a daily or weekly rule into the instants a job should runDates2not attempted
Recurring scheduleExpands 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
Slug generatorTurns a title into a url-safe slug, keeping them unique within a collectionParsing2not attempted
Slug generatorTurns a title into a url-safe slug, keeping them unique within a collectionParsing1not attempted
Slug generatorTurns a title into a url-safe slug, keeping them unique within a collectionParsing2not attempted
Line diffComputes a line-by-line diff from the longest common subsequence of two textsCollections4not attempted
Line diffComputes a line-by-line diff from the longest common subsequence of two textsCollections3not attempted
Line diffComputes a line-by-line diff from the longest common subsequence of two textsCollections4not attempted

56 exercises across 8 domains.