Notes on web technologies, engineering tradeoffs, and front-end architecture.
- Why I do not use enums in TypeScript Enums add runtime behavior, work against modern TypeScript workflows, and have simpler alternatives like string literal unions and const objects.
- High coverage is not enough: mutation testing in TypeScript with Stryker Code coverage shows what your tests execute. Mutation testing shows whether your tests fail when the code is wrong, and where Stryker fits.
- Avoid truthy and falsy checks in TypeScript Truthy and falsy checks in TypeScript hide intent and can introduce bugs. Prefer explicit checks for the values you actually care about.
- Prefer Task over Promise in TypeScript Promises hide failure in an untyped rejection path. Task from true-myth makes asynchronous success and failure explicit in TypeScript.
- Avoid throwing for expected failures in TypeScript Use Result in TypeScript for expected failures, Maybe for absence, and reserve exceptions for truly exceptional situations.
- The Billion-Dollar Mistake: Avoid "null" in TypeScript Why null still causes bugs in TypeScript - and how Maybe types make absence explicit.
- Dependency injection without frameworks in TypeScript Explicit dependencies improve clarity and testability. You do not need a framework to achieve that.
- Why your unit tests feel fragile Unit tests do not feel fragile because testing is hard. They feel fragile because our design mixes business logic and side effects.
- Why I started this Blog Why I finally decided to start writing on echooff.dev and what I want this blog to be.