Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
The JavaScript Prototype Chain: How Objects Inherit from Each Other
We untangle the [[Prototype]] link, property lookup along the chain, __proto__ versus Object.getPrototypeOf, constructor functions, Object.create and the prototype machinery underneath class, step by step in the console.
JavaScript Object Protection and Immutability: Property Descriptors, seal and freeze
We look at property descriptors, the sneaky defaults of Object.defineProperty, the difference between preventExtensions, seal and freeze, shallow versus deep freezing, and patterns for updating objects without mutating them.
JavaScript OOP Patterns: Inheritance or Composition? Factory Functions and Mixins
We talk about the cost of inheritance, combining behavior with composition, factory functions and mixins, choosing between closures and #private, the SOLID principles that fit JavaScript, and when a class is worth writing.
The JavaScript Event Loop in Depth: Tasks, Microtasks and Rendering Order
We work through output-order puzzles to see the task and microtask queues, where promises and queueMicrotask fit, when requestAnimationFrame runs in the rendering step, and why long tasks freeze the page.
Advanced JavaScript Async Patterns: The Promise.all Family, Cancellation, Retry and Timeouts
We look at the differences between Promise.all, allSettled, any and race, ES2024's Promise.withResolvers, ES2025's Promise.try, supporting AbortSignal in your own functions, retry, timeouts and concurrency limits.
JavaScript Iterators and Generators: Symbol.iterator, yield and Iterator Helpers
We cover the iterable and iterator protocols, writing your own iterable with Symbol.iterator, how generators and yield pause and resume, infinite sequences, ES2025 iterator helpers and ES2026's Iterator.concat.
JavaScript Async Iterators: for await...of, Async Generators and Array.fromAsync
We walk through data that arrives over time with Symbol.asyncIterator and async generators, learn for await...of and ES2026's Array.fromAsync, read a paginated API as a stream and meet ReadableStream.
JavaScript Proxy and Reflect: Traps, Validation and Reactivity
We intercept reads, writes and deletes on an object with Proxy and keep default behavior with Reflect, then build validation, default values and a reactive UI while covering the pitfalls and the cost.
JavaScript Memory Management: Garbage Collection, Memory Leaks and WeakRef
We look at the stack and heap, reachability and garbage collection, then cover leaks from forgotten listeners, timers, closures and detached DOM, plus WeakMap, WeakRef and heap snapshots in DevTools.
JavaScript Performance Tips: Debounce, Throttle and Layout Thrashing
We learn to measure with performance.now, mark and measure, write our own debounce and throttle, and cover requestAnimationFrame, layout thrashing, lazy loading and the DevTools Performance tab.
JavaScript Web Workers: postMessage, Transferable Objects and Module Workers
We move heavy work off the main thread with Web Workers and learn postMessage and structured clone, single-file Blob URL workers, transferable objects, module workers and life without the DOM.
JavaScript Observer APIs: Intersection, Mutation and Resize Observer
We build lazy loading and infinite scroll with IntersectionObserver, watch DOM changes with MutationObserver and element size with ResizeObserver, and learn how to clean observers up properly.