
Claude Skills by snoodleboot-io
github.com/snoodleboot-io``` Time | Product -----> Fact Table <----- Customer | Geography ```
**Structure:** ``` dim_date | dim_product -> fact_sales <- dim_customer | dim_geography ```
Compress a wide feature space into fewer coordinates while keeping the structure that matters, and know what each method destroys in exchange.
Reduction is a trade, not an improvement. You give up interpretability and some signal in exchange for speed, decorrelation, or a picture. Reach for it when at least one of these holds:
Define how much data loss and downtime the business can survive, then choose the cheapest recovery pattern that meets those numbers — and prove it works.
Disaster recovery has exactly two quantitative inputs, and every architectural choice downstream is a consequence of them.
Add a shared cache that actually reduces load and latency, without serving stale data or collapsing the origin the moment the cache misses.
The default, because it fails open: when the cache is unavailable, reads still succeed against the source of truth, just slower.
```python from opentelemetry import trace, metrics from opentelemetry.exporter.jaeger.thrift import JaegerExporter from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor
``` User Request ↓ API Gateway (span: api-request) ├─ Authenticate (span: auth) ├─ Validate (span: validate) └─ Route to Service (span: route) ↓ Application Service (span: process-order) ├─ Database query (span: db-select) ├─ Cache lookup (span: cache-get) └─ External API call (span: payment-api) ↓ Trace contains all spans with timing ```
Separate the four kinds of documentation, generate everything that can rot, and delete the pages nobody reads.
Almost all bad documentation is well-intentioned writing in which two or more purposes have been welded into one page. The reader arrives with one need and is served three, so the page fails all three. The Diátaxis framework names the split along two axes: is the reader *learning* or *working*, and does the content serve *practice* or *understanding*?
Serve content from the edge so it is fast and cheap — which depends entirely on getting cache headers, keys, and invalidation right, not on merely turning a CDN on.
A CDN is a cache that obeys your origin's instructions. It does not guess what is cacheable — it reads `Cache-Control` (and friends) from the origin response and acts on them. Turn a CDN on in front of an origin that sends `no-store`, or sends no cache headers at all, and one of two things happens: every request still reaches origin (you added a network hop and gained nothing), or the CDN applies a conservative default that is wrong for your content. The work of a CDN is almost entirely the work
Combine multiple models so their errors cancel, choosing the combination scheme from which part of the error — variance or bias — you actually need to reduce.
Expected error decomposes into bias, variance, and irreducible noise. Each family of ensemble attacks a different term, so diagnosing first saves you from combining models in a way that cannot help.
Turn raw columns into inputs that expose the signal a model can actually use, without smuggling in information unavailable at prediction time.
Cardinality and model family jointly determine the encoding. There is no default that survives both a 3-level column and a 200,000-level user id.
Rank which inputs a model actually depends on, using methods whose biases you can name — because every importance method answers a slightly different question.
"Feature importance" is ambiguous. Name the question before picking the tool.
Plan before implementing - understand scope and approach
Plan before implementing - understand scope and approach with detailed guidance
Serve the same feature values to training and to inference, computed by the same code, so a model that scored 0.89 offline does not score 0.71 in production.
The pitch is often "a central place to store features," which undersells it into sounding like a database with a marketing team. The actual justification is narrower and sharper: **training/serving skew**.
Diagnose why a test passes and fails on identical code, and fix the cause rather than the symptom.
A flaky test is one that produces different results on unchanged code and an unchanged environment. The instinct is to treat each one as a small local annoyance. The arithmetic says otherwise, because independent failure probabilities compound across the suite:
Coordinate goroutines with channels and `context`, and choose channels vs. mutexes so concurrent code stays correct and leak-free.
A goroutine is a lightweight thread the runtime multiplexes onto OS threads. Channels are the typed conduits goroutines use to pass values and, crucially, ownership of data. The guiding maxim is "don't communicate by sharing memory; share memory by communicating."
Return errors explicitly, wrap them to preserve context and cause, and design small interfaces that keep dependencies loose.
Go has no exceptions for ordinary failures. A function that can fail returns an `error` as its last value, and the caller checks it immediately. This makes every failure path visible in the source rather than hidden in a stack unwind.
**Top Section:** Overview - Service health: Green/Red status - Key metrics at a glance (requests/sec, latency, error rate)
**Level 1: Executive Dashboard** - Single status (green/red) - Key business metrics (users, revenue, SLO %) - No drilling down
Search hyperparameter space efficiently, and get an honest estimate of how the tuned model will actually perform.
The search algorithm matters far less than the budget and the space you give it, but the choice still costs or saves hours.
Write infrastructure code that a second engineer can change safely on a Friday — versioned, reviewed, and with a plan you read before you apply.
State is the map between your code and real resources. Everything else in Terraform is downstream of it being correct, shared, and singular.
**Idempotent:** Same operation repeated = same result
**Pattern:** ```sql -- Idempotency via unique constraint CREATE TABLE orders ( customer_id INT, order_timestamp TIMESTAMP, amount DECIMAL, UNIQUE (customer_id, order_timestamp) );
Build and evaluate classifiers when the class of interest is rare, where accuracy is uninformative and the default 0.5 threshold is arbitrary.
Imbalance is not itself a problem — it is a symptom that the default loss and the default threshold are misaligned with the cost structure. Establish three numbers before touching a sampler:
Automate the mechanical parts of incident response — routing, setup, remediation, record-keeping — so responders spend their attention on diagnosis rather than logistics.
A runbook written in a wiki decays silently: the dashboard is renamed, the command changes, the service is replaced, and nobody notices until an outage. An executable runbook is exercised, reviewed, and version-controlled like the rest of the system.
Decide before the outage who does what, how severity is judged, and when to escalate — so response is a procedure to execute rather than a decision to argue about at 3am.
A severity level is a commitment about response — who wakes up, how fast, and who is told. Write the definitions so that a tired engineer can classify in under a minute, using customer impact rather than technical cause.
``` 2:00 PM - [EVENT] Database connection pool becomes exhausted 2:02 PM - [DECISION] Restart database service 2:03 PM - [METRIC CHANGE] Error rate spikes to 100% 2:05 PM - [ALERT] Automated alert fires 2:06 PM - [HUMAN ACTION] On-call engineer acknowledges 2:08 PM - [ESCALATION] Incident commander paged 2:15 PM - [ROOT CAUSE] Identified connection leak in query 2:20 PM - [REMEDIATION] Deploy fix 2:25 PM - [RESOLUTION] Service restored, error rate drops ```
**Server Logs:** ``` 2026-04-10 14:00:05 [ERROR] Connection pool exhausted (available: 0/350) 2026-04-10 14:00:07 [ERROR] Query timeout after 5000ms 2026-04-10 14:00:08 [ERROR] Database unavailable ```
Implement code one file at a time following conventions
Comprehensive guide for implementing code incrementally following established patterns, conventions, and quality standards
Find the gap between what your code says the infrastructure is and what it actually is — on a schedule, before an unrelated deploy discovers it for you.
Drift is the divergence between declared infrastructure and live infrastructure. Naming its sources matters because they call for different remedies.