May 16, 2016

React: First Impressions

I’m a React newbie who just completed my first React web app, a rewrite of an internal tool at work. Previously the UI was written in ASP.NET plus lots of JQuery on the client side. It worked well but was starting to show its age. Actually this wasn’t my first attempt at React. I started porting a web app written in Knockout to React last October. It was a side project and a good place to start. Read more

April 6, 2016

The Open-Closed Principle and Build Systems

Most developers are familiar with the Open-closed Principle in object-oriented programming. Entities should be open for extension but closed for modification. It serves as a useful guide for software design. In object-oriented programming, the open/closed principle states “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification”; that is, such an entity can allow its behavior to be extended without modifying its source code. Read more

February 9, 2016

Convert Truthy/Falsy to True/False with !!

I’ve been primarily coding in Javascript for a couple months now, and the language’s quirks have become familiar, almost normal, to me. IIFEs, truthy/falsy, ===, and other weird language features make sense now. When I came across !! in a Javascript library, I thought I’d missed some obscure syntax. Searching online provided no clues as to what it did. I read through the list of Javascript expressions and operators and only found the familiar ! Read more

December 9, 2015

A Short and Easy Introduction to .NET's Task Class

Task.Run You can use Task.Run to schedule a delegate to run on the thread pool. The method returns a new task, and if the work is complete, the result will be available via Task.Result. If not, Task.Result will block until it is complete. 1 2 3 4 5 6 7 8 9 10 11 12 private void button_Click(object sender, EventArgs e) { Task<DateTime> task = Task.Run(() => GetDateTime()); lblDateTime.Text = task. Read more

November 14, 2015

Two Tips for Debugging Apps in IIS

If you develop web sites or services hosted in IIS, here are two tips to make debugging on your development machine easier. Disable Health Monitoring IIS application pools have health monitoring built in to ensure processes are responding to requests in a timely manner. If a process stops responding after a period of time, IIS will kill it. This is really inconvenient when you’re debugging web apps in your dev environment, and IIS ends your session. Read more

October 26, 2015

SpecFlow Tags Done Right

In a previous post, I covered scoped bindings in SpecFlow and ended with an example of how not to use tags. In this post, I’ll cover the “right way” and demonstrate how to avoid coupling features to step definitions. But first, a quick primer on tags. What Are Tags? Tags are used in Gherkin to mark features or scenarios. They begin with the @ character in Gherkin, but in step definitions the @ is removed. Read more

© Joe Buschmann 2020