Topic
Testing & Refactoring
Techniques for changing C# safely, writing tests that catch real regressions, and measuring maintainability instead of debating it.
Mutation Testing in C# with Stryker.NET
Mutation testing in C# plants controlled bugs and asks whether your tests notice. Learn Stryker.NET, triage survivors, and set useful CI gates.
Read article →Code smells: a working catalog of six, with C# examples
Code smells are symptoms, not verdicts. Six worth knowing, with C# examples: the tell for each, why it hurts, and the refactoring move that clears it.
Read article →Cyclomatic complexity: what the number actually tells you
Cyclomatic complexity counts the independent paths through a method. How to compute it by eye, what a score of 10 predicts, and how to reduce it for real.
Read article →Unit testing best practices: test behavior, not implementation
Unit testing best practices that survive refactoring: AAA structure, behavior-first assertions, a healthy test pyramid, and determinism over flakiness.
Read article →Primitive obsession: the bug the compiler was begging to catch
When everything is a string, a decimal, or a Guid, the type system can't tell your arguments apart. Value objects in modern C#, the bugs they delete, and when they're overkill.
Read article →A test-first playbook for refactoring legacy C# safely
How to refactor legacy C# without breaking it: write characterization tests first, then take small behavior-preserving steps (extract method, introduce a seam, replace conditional with polymorphism).
Read article →Clean code is a vibe until you measure it
Four code quality metrics you can actually automate in C#: cyclomatic complexity, nesting depth, method length, and duplication, with reasonable thresholds and a refactor that passes them.
Read article →