Topic
Testing & Refactoring
Techniques for changing C# safely, writing tests that catch real regressions, and measuring maintainability instead of debating it.
Integration testing in .NET with Testcontainers and WebApplicationFactory
Integration testing in .NET with Testcontainers and WebApplicationFactory runs your API against real PostgreSQL, so constraints and query counts get tested.
Read article →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 cannot tell arguments apart. Value objects in modern C#, the bugs they delete, their limits.
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 like extract method and seams.
Read article →Clean code is a vibe until you measure it
Four code quality metrics you can automate in C#: cyclomatic complexity, nesting depth, method length, and duplication, with thresholds and a passing refactor.
Read article →