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 notebookWorking notes / 2026
Recently mapped
Architecture, reactivity, and the hidden relationships that shape frontend systems.
jquery
jQuery object is an array like object
jQuery object is not an Array object, but it looks like an array. The following code how this is implemented? var o = {"0":1, "1": 2, length:2}; var a = [].slice.call(o, 0); alert(a); //...
Follow the thread
javascript
object toString
The memeber toString of different object is redefined in their prototype, for example, Object.prototype.toString is different from Array.prototype.toString, to apply a Object.prototype.toString to an array object, we can write the following code var toString...
Follow the thread
jquery
using each function over "for" construct
jquery.each
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
});
Follow the thread
Software Design
Semantics only works in a context
I am a believer of semantics. What is why name the domain as semanticsworks.com. But let me take a step back to explain what I mean semantics here. You may find the definition in...
Follow the thread
misc
Stop fighting
JavaScript is a amazing language, and it continues to amaze me. But I learned it in the hard way because I was trying to translate it into classic OO concept, and I failed. Douglas...
Follow the thread