JSON, CSV, XML, YAML: Data Formats Compared
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
If you put $10,000 in a savings account at 7% interest, how much will you have in 30 years? Most people guess around $31,000 — after all, 7% of $10,000 is $700 per year, times 30 is $21,000, plus your original $10,000. That's simple interest. The real answer with compound interest? Over $76,000. The difference is the most powerful force in personal finance.
Simple interest is calculated only on the original principal. Deposit $10,000 at 7% simple interest and you earn exactly $700 every year, forever. The balance grows in a straight line.
Compound interest is calculated on the principal plus all previously earned interest. In year one you earn $700. In year two you earn 7% of $10,700 — that's $749. In year three, 7% of $11,449 — $801.43. Each year the interest itself earns interest, creating exponential growth.
A = P(1 + r/n)^(nt)
Where:
A = final amount
P = principal (starting amount)
r = annual interest rate (as decimal, e.g. 0.07)
n = compounding frequency per year
t = number of yearsFor $10,000 at 7% compounded annually for 30 years: A = 10000 × (1 + 0.07/1)^(1×30) = 10000 × 7.612 = $76,122.55
The variable n in the formula determines how often interest is calculated and added to your balance. More frequent compounding means interest starts earning interest sooner.
| Frequency | n | After 10 yrs | After 30 yrs |
|---|---|---|---|
| Annually | 1 | $19,671.51 | $76,122.55 |
| Quarterly | 4 | $19,897.89 | $78,427.10 |
| Monthly | 12 | $19,966.17 | $79,058.16 |
| Daily | 365 | $20,137.53 | $81,164.97 |
The jump from annual to monthly compounding is significant — nearly $3,000 extra over 30 years. But going from monthly to daily adds less. The gains from more frequent compounding follow diminishing returns.
The Rule of 72 is a logarithmic approximation. The exact formula is t = ln(2) / ln(1 + r), but dividing 72 by the rate percentage gives a fast, memorable answer that's accurate within a few months.
Banks advertise two different rates, and confusing them costs real money:
When you're saving, you want the highest APY. When you're borrowing, you want the lowest APR. Banks know this — savings accounts advertise APY, while loans advertise APR.
The same exponential force that grows investments also grows debt. A $5,000 credit card balance at 24% APR, making only minimum payments, can take over 20 years to pay off — and you'll pay more in interest than the original balance.
Mortgage interest is another common example. On a 30-year, $300,000 mortgage at 7%, you pay roughly $418,527 in total interest — more than the house itself. Early payments go almost entirely toward interest; principal paydown accelerates only in later years.
Compound interest is often attributed to Einstein as the “eighth wonder of the world.” Whether he actually said it is debatable — but the math is not. Time is the critical variable: starting 10 years earlier matters more than saving twice as much.
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
IPv4 vs IPv6, public vs private addresses, how geolocation databases map IPs to locations, and how VPNs change your visible IP.
Marginal vs effective tax rates, how US federal brackets are calculated, FICA deductions, pre-tax benefits, and sales tax models.