`encoding/json` is the standard library JSON parser. `Marshal` produces compact JSON; `MarshalIndent` produces pretty-printed. `Unmarshal` decodes into a typed value (struct, map, or any).
Efficiently read the last N lines of a (possibly large) file by seeking to the end and walking backwards in fixed-size chunks. Avoids loading the entire file into memory.
`reduce` collapses a stream to one value: sum, product, max, min, custom accumulation. Two-arg form needs an identity (zero/seed); three-arg form supports parallel streams via a combiner.
Append to a single log file but auto-rotate to .1/.2/.3 once the file exceeds a configurable size. No external dependencies — just rename + size check.
TypeScript Retry with Exponential Backoff + Jitter
Retry an async operation up to N times, doubling the delay each attempt with random jitter to avoid thundering herd. Decide retryability via an optional predicate so 4xx errors stop immediately.
`?.` is the safe-call operator — short-circuits to `null` at the first null in a chain. Pair with `?:` (Elvis) for "this or a default". Replaces nested if-not-null ladders.
Kotlin Nullable Types — String? and the ? Operator
Kotlin distinguishes `String` (never null) from `String?` (may be null) in the type system. The compiler refuses to compile code that could deref a possibly-null value — the famous "no more NullPointerException" feature.
Go 1.23 added "range over func" — your own functions can produce values that work with `for v := range fn`. Cleaner than channels for in-process iteration without goroutine overhead.
Three common patterns: load it all into memory, iterate line-by-line, or stream bytes. Pick by file size — `read_to_string` is convenient but bad for huge files.
`WITH RECURSIVE` lets a CTE refer to itself. The standard way to walk parent/child trees (org charts, comment threads, category nestings) in a single query.
Stop concatenating `?a=1&b=2` by hand. `url.Values` (a `map[string][]string`) escapes correctly, handles repeated keys, and `url.URL.String()` renders the canonical form.
`with(x) { ... }` is `run` flipped: the receiver is the first argument. Reads naturally when you're doing several things to an existing object without chaining.
`<video>` with multiple `<source>` formats (MP4 + WebM), `controls`, `poster`, and a captions track via `<track kind="captions">`. All shipped with the browser — no JS player needed.
Validate process.env at boot-time and exit fast if anything's missing. The returned object is typed so the rest of the code reads `env.DATABASE_URL` instead of `process.env.DATABASE_URL!`.