All posts
JavaScript
5 posts
- Why Do AI Agents Still Write 2019 JavaScript? 'Modern Web Guidance 1.0' Setup GuideEven when Claude Code and Cursor know modern CSS and HTML APIs by name, they fail 45% of the time and default to legacy 2019 JavaScript. Learn how to install Modern Web Guidance 1.0 without telemetry and scan your codebase with legacy-scan.
- The `==` Trap and Type Coercion in JavaScriptWhy is `"" == 0` true? Why is `[] == false` true? Yet why is `NaN == NaN` false? We break down JavaScript's most confusing mechanism—type coercion—and the only foolproof way to escape the mess.
- What's the Difference Between Debounce and Throttle?Typing "istanbul" into a search box sends 8 requests to the server. For 10,000 users, that means 80,000 requests. Debouncing drops this to 1, while throttling drops it to 4 — but they aren't the same thing, and using the right one matters.
- Why 0.1 + 0.2 Doesn't Equal 0.3Type `0.1 + 0.2` into your console, and you won't get `0.3`. It's not a JavaScript bug — you'll get the exact same result in Python, Java, or Go. IEEE 754, mantissas, and why you should never store money as a float.
- Where Does TypeScript Type Safety End?Just because the compiler passes doesn't mean your program is correct. Five places where you can lie to the type system without ever writing any, what strict mode misses, and how to plug the holes at the boundary.