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.

javascript

function overload

function.length can tell you the number of parameters defined, using this we can create overload functions
Follow the thread
javascript

later method

Object.prototype.later = function (msec, method) { var context = this, args = Array.prototype.slice.apply(arguments, [2]); if (typeof method === 'string') { method = context[method]; } setTimeout(function () { method.apply(context, args); }, msec); return context; };...
Follow the thread
javascript

fixed a closure bug

Closure refer the ability that a function can access and manipulate external variable from with a function. Sometimes, this is not good because the if a function depends on the external state. When the...
Follow the thread
javascript

efficency string operation

Because string is immutable in JavaScript, concatenation with array.join('') is much efficient. The following code use all the chinese characters. Click here to show
Follow the thread
javascript

the bind function

John Resig has page Learning Advanced JavaScript to explain how the following script works. // The .bind method from Prototype.js Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift(); return...
Follow the thread