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.
T4
Debugging T4
1. add "template debug="true""
2. cd %temp%, and find the latest generated cs file
3. Add System.Diagnostics.Debugger.Break() in you template file, below is example of simple template.
Follow the thread
vs.net
vs.net template
User' template location
C:\Documents and Settings\[user_name]\My Documents\Visual Studio 2010\Templates\ItemTemplates
C:\Documents and Settings\[user_name]\My Documents\Visual Studio 2010\Templates\ProjectTemplates
Follow the thread
Entity Framework
The "OnDelete" property of navigation in Entity Framework
This property affects the the behavior of entity framework when delete an entity. Here are two scenario.
[Fact]
public void can_delete_order_with_lines_loaded()
{
TestEntities db = new TestEntities();
Order o1 = db.Orders.Include("OrderLines").First();
db.DeleteObject(o1);
db.SaveChanges();
Follow the thread
jquery
jQuery.globalEval
$.globalEval utility is a useful function, because it is preferred compare with eval in calling ajax script. What it does is adding script tag to document, then remove it later. globalEval: function( data )...
Follow the thread
jquery
jQuery event binding internal
The event binding in jQuery is very interesting. It is designed with several goals. 1. It should works consistently across browsers. 2. It should allows attaching more than one handler function to a event....
Follow the thread