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.
Convert a Guid to a base64 url-safe string (no padding, '+' → '-', '/' → '_') and back. Round-trip test.
Use a yield return iterator method to lazily enumerate Fibonacci numbers up to a given limit. Show the caller using foreach with a take of 10.
Write a custom equality comparer (IEqualityComparer<Person>) that treats two Person records as equal when Email lowercased matches. Include GetHashCode.
Implement nullable reference type annotations on a 'Person' class with FirstName (non-null), MiddleName (nullable), LastName (non-null). Show a constructor that enforces non-nullness.
Show typeof(T) vs T.GetType() inside a generic method. Demonstrate typeof(T) is the static declared type and GetType() is the runtime type for boxed values.
Use Random.Shared to pick a random element from a List<T> in a generic Pick<T>(List<T>) extension method.
Convert a List<string> to a Dictionary<string,int> mapping each string to its length, using LINQ's ToDictionary.
Demonstrate pattern matching against a tuple (int x, int y) to classify a point as 'Origin', 'OnXAxis', 'OnYAxis', or 'Inside' the unit square.
Write a generic method 'MaxBy<T,TKey>(IEnumerable<T>, Func<T,TKey>) where TKey:IComparable<TKey>' that returns the element with the maximum key.
Define an enum with [Flags] for ANSI text styles (Bold=1, Italic=2, Underline=4, Strike=8). Show combining values and testing with HasFlag.
Write a using-block over a StreamReader that reads each line and counts occurrences of the word 'foo'. No async.
Use a Span<char> to parse an integer from a string slice without allocating. Compare to int.Parse(string) qualitatively.
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.
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.
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.
Register a typed HttpClient with IHttpClientFactory for calling a remote API, including a DelegatingHandler that adds an Authorization bearer token to every request.
Implement a multitenant request-scoped ITenantInfo resolver that reads the tenant id from a custom header and falls back to subdomain.
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.
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.
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).
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.
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.
Bind a 'SmtpSettings' section from configuration using the options pattern with IOptionsMonitor so values update when the config file changes at runtime.
Implement a generic repository for read-only access to entities by id using a DbContext. Include AsNoTracking and a CancellationToken parameter.