MARYAN
MATS
.
Creative Engineer & TypeScript Devotee. I craft web interfaces with obsessive attention to detail and write about what I learn along the way.
click to explore
Latest article
View all →Why `.length` Is Wrong for Strings in JavaScript — and How Intl.Segmenter Fixes It
JavaScript's .length, .split(''), and [...str] return three different lengths for the same string — and for any text with emoji, accents, or non-Latin scripts, all three are wrong for users. Intl.Segmenter, now in every browser, splits strings the way humans actually read them.
More articles
Why Zustand Breaks in Next.js — And What the Fix Actually Is
Hydration mismatches, persist bugs, and leaked state aren't Zustand bugs. They're the natural result of using a client-only pattern inside a server-rendered framework. Here's the mental model I use and the setup I actually ship.
Most Startup Ideas Are Backwards — I Search for Products People Already Resent
I don't brainstorm startup ideas. I look for products people already depend on and increasingly dislike — fragmented workflows, decaying trust, pricing that stopped making sense. Here's the lens I actually use.
Stop Writing try/catch — Your TypeScript Errors Deserve Types
Your function signatures only show the happy path. TypeScript is blind to errors — by design. Here's why the man who designed TypeScript rejected typed exceptions, and what to use instead.
Stop Using Booleans Everywhere — Use Union Types Instead
Three booleans create 8 possible states — most of them impossible. Here's how Boolean Blindness causes real bugs in every language, and why union types eliminate entire categories of bugs.
Selected projects
View all →Secure Swiss file transfer and decentralized Web3 storage platform. The world's first gateway to decentralized storage networks — serving 3.6M+ active users across 180+ countries. Features encrypted file transfer, Web3 storage integration via Storj, and token-based reward system.
Personal blog built from scratch with Astro, Tailwind CSS 4, and Canvas API. Features a 3D wireframe character, dark/light themes, editorial typography, and perfect Lighthouse scores.
A tiny, type-safe Result<Value, Error> type for TypeScript. Handle errors as values, not exceptions. Zero dependencies, under 1KB, fully tree-shakable. Features ok/err constructors, map, flatMap, match, tap, tryCatch, tryAsync, and more.
A tiny, type-safe alternative to TypeScript enums. Built on plain objects with full inference, type guards, validation, and reverse lookup. No 'as const' needed, no runtime surprises. 536 bytes.