28 notes2012 — 2026JS · 20

Writing

No. 28 · Jan 28, 2026JS · Concurrency · Node.js

Worker Pool

A WorkerPool implementation using Node.js worker_threads: fixed-size pool, job queue, in-flight tracking, and graceful error handling when a worker crashes mid-job.

No. 27 · Jan 28, 2026JS · Concurrency · Async

Consumer Pool

Multiple workers pulling from a shared queue — with variants for blocking producers when the queue gets too full and deduplicating work at enqueue time to keep the queue from blowing up.

No. 26 · Jan 28, 2026JS · Concurrency · Async

Bounded Concurrency

Launching unlimited async tasks is easy; not crashing from it is the hard part. A walkthrough of three patterns for bounded concurrency in JavaScript: worker pools, a fill-and-race loop, and the producer/consumer model.

No. 25 · Jan 28, 2026JS · Concurrency · Async

Simple Semaphores

A minimal Semaphore class in JavaScript: acquire blocks when no permits are available, release hands permits directly to waiting callers, and a run helper wraps both with try/finally.

No. 24 · Sep 30, 2020Đám Hỏi · Engagement Ceremony · Tea Ceremony

Đám Hỏi - A Vietnamese Engagement Ceremony

My fiancée and I aren't particularly traditional, but we wanted to faithfully honor the Vietnamese đám hỏi. A walkthrough of the procession, gifts, ceremony, jewelry, and what we learned planning it from scratch.

No. 23 · Apr 28, 2017JS · ES6

Common ES6 Mistakes

Two ES6 gotchas worth knowing: destructuring defaults don't kick in for null (only undefined), and strings are iterables, so new Set('555') gives you a set with one element.

No. 22 · Nov 12, 2015JS

A Byte of JS

How does 'J' become 01001010? A conversation-style walkthrough of charCodeAt, ASCII, binary conversion, bytes, and the surrogate pair edge case that makes String.prototype.length quietly wrong.

No. 21 · Jun 10, 2015Wedding

My Fiancée's Wedding Shoes

My fiancée's custom Christian Louboutin wedding shoes arrived, and I might be more excited about them than she is. A look at the custom order process, the blue insoles, and the Cinderella effect they pull off.

No. 20 · May 28, 2015JS · Promises

10 Things I Learned About Promises

Promise chaining only works if your fulfillment handlers actually return promises. Three patterns where that's easy to get wrong, and what happens when you don't.

No. 19 · Mar 12, 2015JS

Quirky Behavior with Array.prototype.Reduce

Array.prototype.reduce silently skips the callback when the array has only one element — which means if your object ever has a single key, your reduce-based flattening breaks without warning.

No. 18 · Jan 28, 2015Performance

Measuring First Paint Time in Chrome

WebPageTest captures first paint time, but Chrome's window.chrome.loadTimes() gets you close. Here's how to combine firstPaintTime and navigationStart into a usable millisecond metric.

No. 17 · Nov 01, 2014JS

Iterating Over Object Values

for...in gives you keys, not values — which trips up anyone iterating arrays for the first time. A comparison of for...in, forEach, for...of, and why plain objects need special treatment.

No. 16 · Oct 02, 2014Wedding · DIY

Making a Jewelry Box

I needed a jewelry box for a 10-inch Vietnamese gold kien — nothing on the shelf fit. So I woodburned her initials onto a Michaels box and built the interior myself with foam board, foam core, and microsuede.

No. 15 · May 20, 2014JS

Prototypical Inheritance with Object.create

A practical look at prototypical inheritance in JavaScript using Object.create — how the prototype chain works and how to set it up correctly without constructor functions.

No. 14 · May 01, 2014JS

DefineProperty: Data Properties and Accessor Properties

Object.defineProperty lets you go beyond key/value pairs — controlling whether a property is writable, enumerable, or configurable, and swapping in custom getters and setters via accessor properties.

No. 12 · Mar 14, 2014CSS

CSS3 Animation: Highlight on Click

A CSS3 animation that flashes a highlight on an element when clicked — no JavaScript required. Uses a keyframe animation triggered via the :active pseudo-class.

No. 11 · Mar 12, 2014JS · underscore.js

Unpacking Underscore: Clone and Extend

Underscore's _.clone and _.extend are both shallow — and the difference between a shallow and deep copy is exactly where bugs hide. A look at what each method actually does under the hood, plus a deepExtend pattern.

No. 10 · Mar 05, 2014JS · Data Structures

JS101: Linked Lists

Implementing a linked list in JavaScript was less about learning data structures and more about figuring out what object-oriented programming actually looks like without classes. Here's what I built and what surprised me.

No. 09 · Jan 28, 2014JS

Defining Undefined

Comparing to undefined directly is fine for local variables, but global undefined can be reassigned in some engines. A look at typeof vs strict equality, idiomatic JS patterns, and why IIFEs guard against it.

No. 08 · Jan 23, 2014JS

Arrays: Slice vs. Splice

slice and splice sound identical, do opposite things, and return different objects. One mutates the original array; the other doesn't. Here's a plain comparison before you mix them up again.

No. 06 · Mar 05, 2013CSS

Animation with CSS3 Transitions

CSS transitions let elements animate smoothly between states without JavaScript — swapping jQuery's fadeIn/fadeOut for a .fade class and opacity transition takes maybe 10 lines of CSS.

No. 05 · Feb 12, 2013Career

I'm [in]

Two things: the views in this blog are mine alone and don't reflect my employer's. Also, I'm now a web developer at LinkedIn.

No. 04 · Oct 18, 2012JS

Digesting JavaScript Good Parts: Arguments

JavaScript can't do function overloading the way C++ can, so handling variable arguments means picking between the arguments object, optional parameters, or passing an object literal. Each has real trade-offs.

No. 03 · Sep 20, 2012JS

Digesting JavaScript Good Parts: Memoization

Recursive functions recalculate the same values over and over. Memoization caches results by index so fibonacci(n) is only computed once — a small change with a significant impact on recursive performance.

No. 02 · Mar 20, 2012JS · jQuery · PHP

List and Delete Files with jQuery, JSON, PHP

How to build a file cache viewer and cleaner: PHP reads a directory and returns JSON, jQuery renders the list, and a second PHP script deletes everything. A practical example of client-server JSON exchange.

No. 01JS · Async

Async Mistakes

forEach silently discards promise return values, which means your async callbacks are running but nobody's waiting on them. Use map plus Promise.all, or for...of if order matters.