A side-by-side diagram comparing C# code. The left panel, labeled "BEFORE," shows an old-style static extension method highlighted in red. The right panel, labeled "AFTER," shows the new C# 14 syntax using an extension block and a property, highlighted in green.

C# 14 Extension Members: Cleaner Code

The era of the ‘Helper Class’ is over. C# 14 introduces Extension Members, allowing you to add properties, operators, and static methods to external types. Here is how to modernize your codebase.

December 7, 2025 · 5 min
An orchestra conductor directing musicians, a metaphor for the 'Tell, Don't Ask' principle where a service tells objects what to do.

Stop Asking Your Objects Questions. Just Tell Them What to Do

The ‘Tell, Don’t Ask’ principle helps reduce behavioral dependencies in C# applications by keeping decision-making logic inside the objects that own the data. This leads to cleaner, more maintainable code with better encapsulation and reduced coupling.

November 18, 2025 · Last modified: November 25, 2025 · 15 min

Why Copy-Paste Coding Is Worse Than You Think

Copy-paste coding may seem convenient, but it often causes hidden bugs. Learn practical C# patterns to replace duplication and maintain clean, maintainable code.

October 7, 2025 · 8 min

Refactoring Code for Better Coupling and Cohesion

TL;DR: High cohesion means classes focus on one job. Low coupling means classes don’t depend too much on each other. When I refactor messy code, these two principles guide every decision I make. Why I Focus on Cohesion and Coupling When Refactoring After 10+ years of building enterprise applications, I’ve inherited my fair share of messy codebases. The pattern is always the same: tangled classes doing too much, components that break when you touch something seemingly unrelated, and tests that require half the application to run. ...

August 4, 2025 · Last modified: September 19, 2025 · 7 min

Violating SOLID for Performance: When It’s Okay and How to Isolate It

Discover when it’s justified to break SOLID principles for performance in C#. Learn how to measure, isolate, and document exceptions, see real-world trade-offs, and keep your codebase maintainable, even in the engine bay of high-throughput systems.

July 10, 2025 · 10 min
×