Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 175

Databases & Architecture2 min read

Second Normal Form (2NF)

2NF ensures every non-prime attribute depends on the entire candidate key, not just part of it. It only matters when a relation has a composite key. The footgun is assuming single-attribute keys automatically satisfy 2NF.

Databases & Architecture2 min read

DML: Insert, Update, and Delete

DML is the change-focused subset of database languages like SQL that adds, modifies, and removes data. It appears in every write to a table. The footgun is assuming SELECT belongs in DML; read-only querying is sometimes split out as DQL instead.

DDL: The Blueprint for Database Objects
Databases & Architecture2 min read

DDL: The Blueprint for Database Objects

DDL is the blueprint for your database. You reach for it when spinning up new tables, indexes, or user permissions, not when querying rows. The footgun is running DROP thinking you are deleting data, not vaporizing the entire table structure.

Data Science & Analytics2 min read

Walk me through a CNN's layers for image classification

Tests hierarchical feature extraction in CNNs. Answer: conv filters learn edges-to-objects with shared weights, pooling reduces dimensions and adds invariance, fully-connected layers classify.

How do you leverage and fine-tune BERT for niche classification?
Data Science & Analytics2 min read

How do you leverage and fine-tune BERT for niche classification?

Tests transfer learning with scarce labels. Outline: pick a domain-adjacent checkpoint, add a classification head, use learning rates near 2e-5 with early stopping, and stratify tiny validation splits.

Data Science & Analytics2 min read

Describe Transformer architecture and why self-attention beats recurrence

This tests parallelization and long-range dependencies. A strong answer outlines the encoder-decoder stack with multi-head self-attention, contrasts O(1) sequential steps versus RNNs' O(n) unrolling, and warns that describing it as averaging misses key ideas.

What is a word embedding and how does it beat one-hot encoding?
Data Science & Analytics2 min read

What is a word embedding and how does it beat one-hot encoding?

Tests dense semantic vectors versus sparse one-hot representations. A good answer defines embeddings as learned real-valued vectors where similar words are close, contrasts them with orthogonal one-hot vectors lacking similarity, and names Word2Vec or GloVe.

Data Science & Analytics2 min read

What is overfitting and how does Dropout prevent it?

Tests generalization intuition: overfitting is low train error but high test error. Good answers say dropout randomly zeros hidden units during training to stop co-adaptation. Bad answers say dropout permanently deletes neurons or just reduces capacity.

Data Science & Analytics2 min read

Explain vanishing and exploding gradients and common mitigation techniques.

Why deep backpropagation causes diverging gradient magnitudes. Repeated multiplication across layers shrinks or explodes gradients; cite tanh [0,1] range; list ReLU, batch norm, and gradient clipping. Blaming activation choice alone without citing depth.

Data Science & Analytics2 min read

Explain Regression Discontinuity Design and propose a real-world scenario

Compare units just above and below a threshold for local effects; propose scenario with forcing variable.

Data Science & Analytics2 min read

How would you estimate causal impact using a quasi-experimental method?

DiD with Canada versus Australia; assert parallel trends; validate with pre-period plots and placebo tests.

What is Simpson's Paradox and how can it bias A/B tests?
Data Science & Analytics2 min read

What is Simpson's Paradox and how can it bias A/B tests?

Tests whether you recognize that aggregate trends can reverse within subgroups. A strong answer defines the paradox, gives an A/B example where treatment wins overall but loses in every segment due to skewed allocation, and prescribes stratified analysis.

How do network effects violate A/B tests and how to mitigate them?
Data Science & Analytics2 min read

How do network effects violate A/B tests and how to mitigate them?

Tests SUTVA violations and network experiment design. Answers note treated users alter control outcomes, then propose social-graph cluster randomization to isolate spillovers. Red flag: ignoring peer-to-peer spillover and using user-level randomization.

Why not stop an A/B test when it looks significant early?
Data Science & Analytics2 min read

Why not stop an A/B test when it looks significant early?

Tests whether you understand repeated looks inflate false positives. The term is peeking: checking daily can turn a 5% Type I error rate into roughly 15% by day 3. Red flag: citing "low sample size" without stating that early stopping invalidates the p-value.

Data Science & Analytics2 min read

A/B test: 0.1% lift. Statistical vs practical significance?

Statistical significance says the 0.1% is real; practical significance asks if revenue exceeds engineering cost. Frame with CIs and ROI.

P-value vs confidence interval in an A/B test
Data Science & Analytics2 min read

P-value vs confidence interval in an A/B test

A p-value gauges evidence against the null; a 95% CI shows plausible effect sizes and precision.

How do you determine required sample size for an A/B test?
Data Science & Analytics2 min read

How do you determine required sample size for an A/B test?

Tests statistical power and experimental design. Name four inputs: baseline conversion rate, minimum detectable effect, alpha (5%), and power (80%), then solve for N. Red flag: "test until significant" or fixed guesses like 1000 users without effect size.

Data Science & Analytics2 min read

K-Means vs DBSCAN: which for geospatial hotspots?

Tests matching algorithmic assumptions to data structure. K-Means needs K and assumes spheres; DBSCAN discovers arbitrary density shapes and labels noise. Choose DBSCAN for geospatial hotspots because density is irregular.

High ROC-AUC but low PR-AUC: what does this imply?
Data Science & Analytics2 min read

High ROC-AUC but low PR-AUC: what does this imply?

Tests if ROC-AUC hides imbalance while PR-AUC exposes it. Severe imbalance dilutes FPR across many negatives, inflating ROC-AUC, but precision crashes. Critical for rare positives with costly false positives. Praising the model on ROC-AUC alone fails.

What is cross-validation and why is it more robust than a holdout split?
Data Science & Analytics2 min read

What is cross-validation and why is it more robust than a holdout split?

A single split is noisy and wastes data; k-fold rotates each fold as test, averages scores, and trains on all data.