A vendor-neutral reference for mobile and web developers. Every page ships a runnable snippet, a short why it works, and the trade-off worth knowing — across Swift, Kotlin, JavaScript, React and more.
// Swift · Kotlin · JavaScript · React · Python — real, runnable, checked against the toolchain.
Every page ships a real, copy-paste snippet checked against the language or framework it targets. Secrets always show as placeholders like YOUR_API_KEY.
We write like a senior engineer on a PR review — a stated reason for the approach and the trade-off to watch, never cargo-cult "always do X" rules.
No hype, no fabricated benchmarks, no year-in-the-title bait. Version notes are dated so you can verify against your own toolchain.
Turn a datetime into a string with strftime and parse strings back with strptime.
View the snippet → How-toLoad data on mount inside useEffect, storing the result in state and cleaning up to avoid setting state after unmount.
View the snippet → How-toFetch JSON from an API using the requests library, raising on error status codes.
View the snippet → How-toConvert a JSON string into Python dicts and lists with the standard-library json module.
View the snippet → How-toFetch JSON from an API in the browser or Node using the async fetch API.
View the snippet → How-toReverse a string with the extended slice [::-1], the idiomatic one-liner in Python.
View the snippet →Jump straight into the reference for the language or framework you're working in today.
A type-level way to represent the presence or absence of a value, forcing you to handle nil explicitly.
Read the explainer → ConceptA type system that distinguishes nullable from non-nullable references to eliminate most null-pointer exceptions.
Read the explainer →Type the task or paste the error message. Every page targets one concrete, high-intent query — no filler tutorials.
Grab a runnable block that's been parsed against its language. Placeholders like YOUR_API_KEY mark anything you need to swap in.
Read the short "why it works" and the trade-off, then follow related pages and concepts to go deeper on your terms.
A precise, vendor-neutral reference for the task in front of you — runnable, explained, and honest about the trade-offs.
Every snippet is written to be runnable and is checked against the language or framework it targets. We state a reason and a trade-off for each approach rather than cargo-cult rules, secrets are always shown as placeholders like YOUR_API_KEY, and any affiliate link to a tool or course is labelled. Language and framework versions move, so treat version notes as of the date shown and verify against your own toolchain. Read our method →