#Refactoring

Automating The Arrange Phase With AutoFixture

Published at November 2, 2017 ·  3 min read

In a previous article, we refactored a unit test in two ways. The builder and fixture patterns encapsulated an object’s creation, which simplified the arrange phase of a unit test. These two patterns produced a lot of boiler-plate code. It would be nice to never have to create an arrange phase in the first place. AutoFixture tries to produce unit tests with no arrange phase. As the AutoFixture GitHub page describes:...


MSBuild Maintenance Made Easy With Shared Properties

Published at October 12, 2017 ·  3 min read

The New MSBuild MSBuild is the build engine for .NET and Visual Studio. It is written in such a way to be composable, allowing you to combine project files. If you have ever used Visual Studio, then you have indirectly used MSBuild. When you open Visual Studio, it is using MSBuild to restore, build, and manage your projects. Recently, a new version of MSBuild has hit the streets. This came out along with Visual Studio 2017, and has changed design....


2 Simple Ways To Improve Your Unit Tests

Published at October 3, 2017 ·  6 min read

Over the past 20 years, testing has become a cornerstone of software development. To turn software development into a true profession, we need to create robust, secure, safe, and efficient systems. The simplest tool in our toolbox starts us on this road: the unit test. Like an accountant, the unit test is a fantastic way for us to perform double-entry bookkeeping. The unit test double checks our work is correct, and makes sure we keep it from morphing into something we did not want....


Trust Your Data, Not Your Mind

Published at September 27, 2017 ·  7 min read

When you add decor to your home, previous decor can look worse. You paint one wall a bright blue, but at the same time, the shine of the wall next to it dulls a little. Your codebase is a never-ending cycle of refactoring. Small improvements to one part, makes you see small improvements for another part. Shining a light on a piece of your code, shines problems on code around it....