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

page event beforeunload vs unload

<p>beforeunload happend before unload. beforeunload can give user a message, asking user if want to contine or not, if yes, unload event will trigger and unload can show user a message, but can not...
Follow the thread
javascript

Animation

<h4>Slide In</h4> <p>A Function for Slowly Revealing a Hidden Element by Increasing Its Height Over a Matter of One Second.</p>
Follow the thread
javascript

Javascript and Postion

<p> In CSS, elements are positioned using offsets. The measurement used is the amount of offset from the top-left corner of an element’s parent. </p>
Follow the thread
css

Finding the actual computed value of a CSS Style Property on an Element

<pre data-sub="prettyprint:_"> // Get a style property (name) of a specific element (elem) function getStyle( elem, name ) { // If the property exists in style[], then it's been set // recently (and is...
Follow the thread
javascript

Unobtrusive DOM Scripting

<p>Everything that you’ve learned up to this point comes to one incredibly important goal: writing your JavaScript so that it interacts with your users unobtrusively and naturally. The driving force behind this style of...
Follow the thread