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.

#85311 May 26

Define a DbContext with two entities (Order and Customer) related one-to-many. Show the OnModelCreating configuration and a simple query that loads orders with their customer.

V1BetterV2ΔL+0.2csharp
#85211 May 26

Set up a RabbitMQ consumer that subscribes to an 'orders.created' queue. Show the publish call from the order service side.

V1BetterV2ΔL+0.7csharp
#85111 May 26

Write a MediatR IRequestHandler<TRequest,TResponse> for a 'GetUserById' query, plus an IPipelineBehavior that writes the request type name to console before invoking the next handler.

V1BetterV2ΔL+0.0csharp
#85011 May 26

Implement cache-aside using IDistributedCache backed by Redis to memoise an expensive lookup that returns a customer profile.

V1BetterV2ΔL+0.0csharp
#84911 May 26

Write a BackgroundService that reads work items from an in-memory queue and processes each one with a small delay, with graceful shutdown handling.

V1BetterV2ΔL+0.0csharp
#84811 May 26

Configure JwtBearer authentication so tokens are accepted from either the Authorization header or a query string parameter. Include the validation parameters.

V1BetterV2ΔL+0.0csharp
#84711 May 26

Implement an IAuthorizationHandler for a 'CanEditOwn' permission that checks the current user owns the resource being modified.

V1BetterV2ΔL-0.2csharp
#84611 May 26

Implement an IHealthCheck that returns Healthy when a TCP socket on a remote host responds within 500ms, and Unhealthy otherwise.

V1WorseV2ΔL+0.0csharp
#84511 May 26

Create an ApiController class with a single GET ActionResult that returns a product or NotFound when no product matches the route id.

V1BetterV2ΔL+0.0csharp
#84411 May 26

Write an IMiddleware implementation that adds an X-Request-ID header to every response. Show it being registered in the request pipeline.

V1BetterV2ΔL+0.5csharp
#84310 May 26

Write a custom equality comparer (IEqualityComparer<Person>) that treats two Person records as equal when Email lowercased matches. Include GetHashCode.

V1BetterV2ΔLcsharp
#84210 May 26

Write a Regex that matches IPv4 addresses in the form '1.2.3.4' (each octet 0–255). Use Regex.Match on a sample string.

V1WorseV2ΔLcsharp
#84110 May 26

Write a ReadOnlySpan<byte>-based UTF-8 BOM check: return true if the span starts with the bytes 0xEF 0xBB 0xBF.

V1WorseV2ΔLcsharp
#84010 May 26

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

V1BetterV2ΔLcsharp
#83910 May 26

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

V1SameV2ΔLcsharp
#83810 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
#83710 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
#83610 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
#83510 May 26

Write a BackgroundService that reads work items from an in-memory queue and processes each one with a small delay, with graceful shutdown handling.

V1BetterV2ΔL+0.0csharp
#83410 May 26

Write an IMiddleware implementation that adds an X-Request-ID header to every response. Show it being registered in the request pipeline.

V1BetterV2ΔL+0.5csharp
#83310 May 26

The retailer is asking me to wait 4 weeks for a repair on a faulty appliance. Is that reasonable?

V1BetterV2ΔLhr-law
#83210 May 26

I bought clothing that didn't fit and the shop says they don't accept returns. Are my rights limited because it's a fitting issue?

V1BetterV2ΔLhr-law
#83110 May 26

A retailer is refusing to honour a price advertised on its website, claiming it was a mistake. Can I insist?

V1BetterV2ΔLhr-law
#83010 May 26

Goods I bought are not as described in the advertisement. What rights do I have?

V1BetterV2ΔLhr-law