Articles

Reference guides and explainers on investing, software, genetics, and the apps.

Investing

Reference

Common Sources of Error in Trading Backtests

The issues that quietly make a backtest look better than the real thing.

Reference

The Wash-Sale Rule and Finding a Replacement

Sell the loss, keep the exposure, stay out of trouble. The 61-day window, what 'substantially identical' means, and how people actually pick a substitute.

Reference

Beta vs Correlation: Two Numbers People Keep Confusing

One says how closely things move together. The other says how far. Measured values for real securities show why the difference matters.

Reference

Reading a Form 4: Which Insider Trades Mean Anything

Most filed transactions are not decisions. The code letter tells you which ones are — and open-market buying is under a tenth of the total.

Reference

Dollar-Cost Averaging: The Case For and the Case Against

Buying at fixed intervals lowers your average cost per share. It also, on average, lowers your return — both are true.

Reference

Risk-Adjusted Returns: The Arithmetic and the Catch

Sharpe, Sortino and the ratios built on them — what each divides by, and why a high one is not a recommendation.

Reference

Rebalancing: What It Costs and What It Buys

Selling what went up to buy what went down. The arithmetic, the tax bill, and why calendar rules beat instinct.

Reference

Index Funds and ETFs: What Actually Differs

Three S&P 500 funds track at 0.999 to each other. Since the exposure is identical, the decision is about everything else.

Reference

Compound Interest, and the Two Things That Break It

The formula, the Rule of 72, and why the real-world result is always below the projection.

Reference

Asset Allocation: Correlation Does the Work

Diversification is not owning many things. It is owning things that do not move together — which is measurable.

Reference

Order Types: What Each One Guarantees

A market order guarantees execution, a limit order guarantees price. No order type guarantees both, and that is the whole subject.

Reference

Volatility, and What the Number Actually Tells You

The arithmetic behind the figure, measured values for real securities, and the two readings people get wrong.

Development

Reference

UUIDs: Which Version to Use, and Why v4 Is Usually Wrong for a Primary Key

The versions that matter, the collision maths, and the index fragmentation nobody warns you about.

Reference

Base64: What It Is For, and the 33% You Pay

Not encryption, not compression. A way to move binary through channels that only accept text — at a measurable cost.

Reference

Hashing: Which Algorithm for Which Job

Checksums, digital signatures and password storage need three different families. Using one for another is how breaches happen.

Reference

JWTs: What They Prove, and the Mistakes That Undo It

Signed, not encrypted. Readable by anyone holding one, and hard to revoke — which decides where they belong.

Reference

Cron: The Five Fields, and What Bites in Production

The syntax takes ten minutes. The environment, the overlap and the missing hour take longer.

Reference

JSON: The Spec Is Small, the Edge Cases Are Not

Numbers that lose precision, duplicate keys, and why you cannot store a date.

Reference

URL Encoding: Which Function, and Where

Different parts of a URL have different rules. Using one escaping function everywhere is how links break.

Reference

Regular Expressions: The Parts Worth Knowing

Greedy versus lazy, capture groups, and the catastrophic backtracking that takes a server down.

Reference

Unix Time: Seconds Since 1970, and Where It Goes Wrong

Leap seconds, the 2038 problem, milliseconds versus seconds, and why a timestamp alone is not a time.

Reference

HEX, RGB, HSL and the Colours You Cannot Mix in Them

Why #808080 is not half as bright as white, and why HSL lightness lies about lightness.

Reference

Character Encoding: Why Text Arrives Broken

Mojibake, the BOM, and why a string's length depends on what you mean by a character.