Every day, every moment, is an opportunity to learn

Mocking Dependencies (silly dependency! um… not that kind of mocking)

Mocking Dependencies (silly dependency! um… not that kind of mocking)

The code in this post is also available on Github. In a mood at work the other day (after hunting down some obscure bug that would’ve been more apparent, had I had some relevant failing tests to point me in the right direction), I started back-filling old code with unit tests. That meant removing some dependencies on things I didn’t...

Review: Visual Studio 2013 Cookbook, by Jeff Martins and Richard Banks

I was recently offered a complimentary copy of Visual Studio 2013 Cookbook. This was timely, since I focus primarily on the Microsoft stack and use Visual Studio 2012 daily, and our team at work is considering upgrading soon. Before you read further, note that this book is neither an in-depth guide to Visual Studio for someone who’s never used it...

Simple environments for quickly testing .NET functionality

This post was inspired by a question on SO. It was a simple question about what the integer data type in C# does with the decimal portion of a number. The question itself is not the point, as much as the fact that it could have easily been avoided altogether by running the code and comparing the results. The astounding...

Our First “Raised Bed” Garden

Last year was the first time we really tried to put in a garden. I did no reading at all, bought some “top soil” from Lowe’s, tilled a corner of the yard tucked behind the garage under a tree and… yeah. It didn’t do great. Go figure. This year, I did some actual reading first. One topic I kept coming...

Visual Studio – Add File As Link

We have a particular project in our solution at work, serving as a data access layer. It contains classes with two purposes: A few generic classes that can accept a few interfaces and actually handle retrieving any requested data Many other classes implementing those few interfaces, which request specific data (employees, customers, etc) Then someone on the team created separate...

Relative Ordering with IComparable and CompareTo

Relative Ordering with IComparable and CompareTo

Someone asked a question on StackOverflow about the difference between the int CompareTo method and an ordinary If condition. As it turns out, the poster’s if statement is exactly how Int32 implements CompareTo. The IComparable and IComparable<T> interfaces each have only a single method, which can be used to compare two objects for the purpose of determining how they should...

Async and PLINQ

The code in this post is also available on Github. Went to the Cleveland WPF User Group last night for the first time. They have a nice room setup at DeVry University’s Seven Hills campus… wide and only a few rows deep, with two projectors and a computer setup for the presenter. No guest wi-fi access that I could get...

Code Katas and Craftsmanship

To me, software craftsmanship is about honing our craft as programmers. Kinda nebulous I suppose, but any purposeful effort to make yourself more knowledgeable, efficient, collaborative, communicative, etc can’t be a bad thing. One way to improve is through code kata exercises. The term “kata” originated with the martial arts, but in general it’s the concept of practicing the same...

Getting started with Git

Subversion has been my VCS of choice the last few years. We use it at work, and so using it at home too made me that much more comfortable with it and knowledgeable about it. If you want to try it out, check out VisualSVN. It’s small, free, and only takes a few minutes to set up. I had it...

Installing Windows 3.1 in VMware Player

Every once in awhile it’s fun interesting in a nerdy way to check out some legacy technology and… I dunno… reminisce about the old days and how far we’ve come or some crap like that. Like the fact that the pen drive in my pocket is 10x bigger than the largest hard drives 15 years ago. I decided this week...