C# Enum Flags: Combining Values with Bitwise Operations
C# Enum Flags: Combining Values with Bitwise Operations
A standard enum lets one variable hold exactly one value. But sometimes a variable needs to represent a combination -- a user can have Read and Write access, not just one or the other. That is where C# enum flags come in.
The [Flags] attribute turns a regular enum into a bitfield. Instead of mutually exclusive choices, each member represents an independent bit that can be switched on or off. You combine members with bitwise OR, check indivi...
Take me to this post.
April 28, 2026
More Than a Portfolio: Building a Scroll-Driven 3D World with Something to Say
A scroll-driven 3D world built from scratch with Three.js, GSAP, and WebGL — where every technical decision serves a message worth sharing....
Take me to this post.
April 28, 2026
Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore
A pot of tokens.
The post Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore appeared first on The Old New Thing....
Take me to this post.
April 28, 2026
How to Implement Facade Pattern in C#: Step-by-Step Guide
How to Implement Facade Pattern in C#: Step-by-Step Guide
Complex subsystems are everywhere in real-world C# applications. You might have an e-commerce checkout that coordinates inventory checks, payment processing, and shipping calculations -- all through separate services with their own APIs. The facade pattern gives you a single, simplified interface that hides that complexity from client code. If you want to implement facade pattern in C#, this guide walks you through every step with complet...
Take me to this post.
April 28, 2026
New features in Git 2.54: easier rebasing, hooks, and statistics
In this post I show some of the new features in Git 2.54 including simple rebases with git history, config-based hooks, and stats with git repo structure...
Take me to this post.
April 28, 2026
CodeSOD: Lint Brush Off
A few years back, C# added the concept of "primary constructors". Instead of declaring the storage for class members and then initializing them in the constructor, you can annotate the class itself with the required fields, and C# automatically generates a constructor for you. It's all very TypeScript and very Microsoft, and certainly cuts down on some boilerplate.
Esben B's team isn't really using them in many places, but they are using a linter which is opinionated about them. So this in-line...
Take me to this post.
April 28, 2026
Cypress cy.prompt Vs Recording Vs Coding
Cypress-the-company is putting a lot of effort behind its cy.prompt command (which I recreated...
Take me to this post.
April 28, 2026
Before GitHub
GitHub was not the first home of my Open Source software. SourceForge
was.
Before GitHub, I had my own Trac installation. I had Subversion repositories,
tickets, tarballs, and documentation on infrastructure I controlled. Later I
moved projects to Bitbucket, back when Bitbucket still felt like a serious
alternative place for Open Source projects, especially for people who were not
all-in on Git yet.
And then, eventually, GitHub became the place, and I moved all of it there.
It is hard for me ...
Take me to this post.
April 28, 2026
Put Localhost on HTTPS with Nginx
Put Localhost on HTTPS with Nginx...
Take me to this post.
April 28, 2026