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.

typescript

Class field initialization in typescript

In typescript class, you can define your field initialization in multiple ways. Here is one typical way to do that.
Follow the thread
javascript

A JavaScript interview question which can be fixed by 'let'

A very popular JavaScript interview question on Lexical scope and closure is like the follow.
Follow the thread
angularjs

Minimize the price (not the benefit) of type in Typescript

I watched Anders Hejlsberg introducing typescript in 2012. Then I thought I don't have the problem it tries to solve. Type in Javascript has not yet caused any problem for me, as I have...
Follow the thread
typescript

TypeScript is duck typing.

When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.
Follow the thread
angularjs

Leave $rootScope alone, use AngularJs Dependency Injection.

AngularJs brings dependency injection into UI development. It works very well until it is misused. Recently, I was working on an AngularJs project. One interesting thing is that some application settings is attached to...
Follow the thread