Public viewer

The journey of every round

Every round-trip in the corpus is public. Open one to see the prompt, the zero-point index, the baseline response, the enhanced response, and how each grader read the difference. Leave a comment if a grader's reading lands — or doesn't.

#87711 May 26

Demonstrate pattern matching against a tuple (int x, int y) to classify a point as 'Origin', 'OnXAxis', 'OnYAxis', or 'Inside' the unit square.

V1BetterV2ΔLcsharp
#87611 May 26

Write a generic method 'MaxBy<T,TKey>(IEnumerable<T>, Func<T,TKey>) where TKey:IComparable<TKey>' that returns the element with the maximum key.

V1BetterV2ΔLcsharp
#87511 May 26

Define an enum with [Flags] for ANSI text styles (Bold=1, Italic=2, Underline=4, Strike=8). Show combining values and testing with HasFlag.

V1BetterV2ΔLcsharp
#87411 May 26

Write a using-block over a StreamReader that reads each line and counts occurrences of the word 'foo'. No async.

V1BetterV2ΔLcsharp
#87311 May 26

Use a Span<char> to parse an integer from a string slice without allocating. Compare to int.Parse(string) qualitatively.

V1BetterV2ΔLcsharp
#87211 May 26

Write a switch expression that maps an int status code (200, 301, 404, 500) to a string label. Use the 'when' clause for the 5xx range.

V1WorseV2ΔLcsharp
#87111 May 26

Given a List<int>, return a new list containing only the even numbers, each squared, using LINQ method syntax (Where + Select). One line.

V1SameV2ΔLcsharp
#87011 May 26

Implement a record type 'Money' with Amount (decimal) and Currency (string). Override ToString to print '€100.00 EUR'-style and show value equality with two instances.

V1BetterV2ΔLcsharp
#86911 May 26

Write a generic Swap<T> method that swaps two ref T parameters. Include an example call with two ints.

V1SameV2ΔLcsharp
#86811 May 26

Write an xUnit IClassFixture<T> that spins up a TestServer once per test class and exposes an HttpClient to the tests. Show one test using it.

V1BetterV2ΔL+0.0csharp
#86711 May 26

Build a TPL Dataflow pipeline: a TransformBlock that parses lines from a file, an ActionBlock that writes results to disk, linked with bounded capacity 100.

V1BetterV2ΔL+0.0csharp
#86611 May 26

Configure Serilog with a console sink and a file sink that rolls daily. Include a custom enricher (ILogEventEnricher) that adds the machine name to every log event.

V1WorseV2ΔL+0.1csharp
#86511 May 26

Register a typed HttpClient with IHttpClientFactory for calling a remote API, including a DelegatingHandler that adds an Authorization bearer token to every request.

V1BetterV2ΔL+0.1csharp
#86411 May 26

Implement a multitenant request-scoped ITenantInfo resolver that reads the tenant id from a custom header and falls back to subdomain.

V1BetterV2ΔL-0.3csharp
#86311 May 26

Use Microsoft.FeatureManagement feature flags to gate a new checkout flow. Show the IFeatureManager check at the controller level and the flag definition in configuration.

V1BetterV2ΔL+0.0csharp
#86211 May 26

Add OpenTelemetry tracing to an existing service. Show creating an ActivitySource, starting a child Activity around a database call, and tagging it with the query name.

V1BetterV2ΔL+0.0csharp
#86111 May 26

Build a producer-consumer pair using Channel<T>: producer emits work items at 100/sec; consumer processes them with bounded backpressure (max 50 in-flight).

V1BetterV2ΔL+0.0csharp
#86011 May 26

Define a gRPC service in protobuf with one bidirectional streaming method that echoes back messages with a server-side timestamp. Show the server-side service implementation.

V1WorseV2ΔL+0.0csharp
#85911 May 26

Build a SignalR Hub that lets clients subscribe to a 'price-tick' channel and broadcasts ticks to all subscribers on a one-second timer.

V1WorseV2ΔL+0.0csharp
#85811 May 26

Configure structured logging using ILogger<T>. Show a service that injects ILogger<MyService> and writes a log scope around a unit of work, including a correlation id.

V1BetterV2ΔL+0.0csharp
#85711 May 26

Build a Polly v8 ResiliencePipeline that retries on transient HTTP errors three times with exponential backoff, then trips a circuit breaker after five consecutive failures.

V1BetterV2ΔL+0.3csharp
#85611 May 26

Bind a 'SmtpSettings' section from configuration using the options pattern with IOptionsMonitor so values update when the config file changes at runtime.

V1BetterV2ΔL+0.0csharp
#85511 May 26

Write a FluentValidation AbstractValidator<T> for a 'RegisterUser' command: email (valid format), password (≥ 8 chars, has digit and symbol), age (18+).

V1WorseV2ΔL-0.1csharp
#85411 May 26

Implement a generic repository for read-only access to entities by id using a DbContext. Include AsNoTracking and a CancellationToken parameter.

V1BetterV2ΔL+0.0csharp