Notes on software and the ideas behind it

Find the meaning
behind the code.

I’m Fred Yang. I write about software—how it works, why it behaves the way it does, and the ideas that make code easier to reason about.

Open the notebook

Working notes / 2026

Recently mapped

Architecture, reactivity, and the hidden relationships that shape frontend systems.

jquery

shadow copy in jQuery

We can use jQuery to copy(clone) an object to a new object, so the old object and the new object can evolved independently. //shadow copy object var oldObj = { name: "fred" }; var...
Follow the thread
javascript

copy array in javascript

var x = [1, 2]; var y = x.slice(0); y[0] = 100; //y --> [100, 2] alert(x[0]); //1 ​ The new copy evolve independently of the old copy.
Follow the thread
jquery

Easy Setter Functions in jquery

One of the new feature in jQuery 1.4 is setter function. For a while now, you’ve been able to pass a function into .attr() and the return value of that function is set into...
Follow the thread
javascript

how to test whether a object has member

Object.prototype.hasMember = function (memberName) { return memberName in this;
Follow the thread
jquery

how jQuery use sizzle selector

The call stack is as follow <pre data-sub="prettyprint:_">return new jQuery.fn.init( selector, context ); return (context || rootjQuery).find( selector ); jQuery.find( selector, this[i], ret ); return makeArray(context.querySelectorAll(query), extra );
Follow the thread