June 27, 2020

What Does It Mean to Pass a Reference Type Variable by Reference?

Value and Reference Types Before we get to the answer, let’s review the two basic types in .NET: value types and reference types. Variables of value types directly contain their data according to the Microsoft docs. If you assign one value type variable to another, the .NET runtime will make a copy of its data. Operations on one variable will not affect another (with one exception as we’ll see). Value types are defined as structures or enumerations, and examples include the . Read more

February 11, 2020

8 Steps to a Better Console Application

Despite its apparent simplicity, writing a good console application is more difficult than you would expect. Many developers get the basics wrong and limit the effectiveness of their software as a result. In the 1970s, Doug McIlroy first expressed the Unix Philosophy for building apps with a good CLI. It was later summarized by Peter H. Salus in A Quarter-Century of Unix (1994). The Unix Philosophy Write programs that do one thing and do it well. Read more

January 10, 2019

A Poor Man's Queue

Any sufficiently large enterprise software application is going to need a queue at some point. A queue is a good way to introduce an asynchronous process and decouple two parts of a system. For example, a user could upload a large file to a web application for processing, and instead of making the user wait for the work to complete, the application could queue up the work and return immediately. Later, when the results are ready, the user could be notified. Read more

August 31, 2018

Scaling SpecFlow

In July of 2018, I gave a talk at KCDC titled SpecFlow: Moving Beyond the Basics. Afterward, I changed the title to Scaling SpecFlow to more accurately reflect the topic. You can find the updated slide deck at https://joebuschmann.github.io/scaling-specflow. Over the next few weeks, I created a series of posts, one for each section of the talk, for those of you who perfer blog posts to slide decks. This page aggregates these pages in one place and takes you through each one in order. Read more

August 31, 2018

SpecFlow Step Definition Report

The SpecFlow runtime comes with a little known command line utility aptly named specflow.exe. You can find it in the tools directory in the SpecFlow NuGet package (ex: [project]/packages/SpecFlow.2.3.2/tools). This humble tool can be used to regenerate SpecFlow unit test classes, create test execution reports for NUnit and MSTest, and generate a step definition report. The most useful of these is the step definition report. As the number of features grows, scenarios and bindings are going to get lost in the day-to-day scrum of software development. Read more

August 24, 2018

The Joy of Public Transit

First of all, I should clarify that the title of this post is not meant to be sarcastic. I really do enjoy public transit. It has been over 17 years since I needed to commute to work by automobile. In fact, I haven’t driven to work once during that time. My daily commute consists of about two miles of walking plus a 45 minute train ride one way. I consider myself to be very lucky to have the choice not to drive. Read more

© Joe Buschmann 2020