May 2026 // engineering
csharp
// Execute code only once
Action once = null!;
once = () =>
{
    Console.WriteLine("This runs once.");
    once = () => { };
};

once();
once();
once();

A self-mutating lambda trick in C# to ensure execution exactly once without flags.

Mar 2026 // engineering
csharp
// Tiny dependency injector
var services = new Dictionary<Type, object>
{
    [typeof(Random)] = Random.Shared,
    [typeof(HttpClient)] = new HttpClient()
};

T Get<T>() => (T)services[typeof(T)];

A dictionary-backed dependency lookup utility for one-window WPF projects.

May 2026 // misc
“The seed never looks like the forest.”
Apr 2026 // misc
“The river does not argue with the stone.”
Back to home