Skip to main content

Code Katas and Evidence

Use the offline lab package and guided sequence. Its six learner functions replace open-ended coding prompts with executable contracts and an independent public checker.

KataBefore codingWhat the check catches
posteriorExpected count tableReversed conditioning and zero-probability evidence
retry_summaryTerminal paths or indicatorsCounting unattempted requests and final backoffs
defect_pmfUniform unordered samplesReplacement mistakes, impossible counts, empty sample
wilson_intervalSupplied formula and endpoint casesWald substitution, out-of-range endpoints, roundoff at zero
exact_coverageWeighted sum over possible countsUnweighted averaging of counts and hardcoded .95
standardized_meanTarget workload distributionDifferent comparison weights and missing groups

Work in starter.py; run python check.py --module starter. Use the reference implementation after attempting a derivation, and record any consultation. The simulation harness is supplied so learners can focus on models rather than CSV plumbing.

For a debugging exercise, temporarily replace your retry expected-attempt count with the maximum allowed count. Predict the failing case, run the checker, then repair the change. Repeat with a binomial PMF substituted for the without-replacement experiment. Explain why a test of the mean alone would miss the latter error.

Completion includes the written assessment, reproducible reports for two seeds, and a changed transfer case. Code checks cannot establish that a production population is independent or that its workload matches the fixture.