Polyglot Programmer

I’ve been on a something of a language kick lately. Here is, in no order that I can articulate, a list of the languages that I’d like to be fluent in: Assembly Language C C++ Java C# JavaScript TypeScript F# R Go Python Ruby Lisp I’ve actually coded professionally in the following languages: Assembly Language…


To mock or not to mock, that is the question! (or, when to use dependency injection)

When unit testing, I often use the terms “mocking” and “dependency injection” interchangeably. Now, I know that they are different, however, given that a mock object assumes some sort of dependency injection is involved, I hope you’ll forgive me. However, dependency injection without mocking implies that you’re not unit testing, and that’s just plain wrong….


How to unit test the Bot Framework

Today, let’s test the Microsoft Bot Framework. One of the first things I like to do when attempting to grasp a new framework (well, new to me) is to attempt to unit test the “Hello world” version of the framework. This can give a vague level of complexity to the overall framework, or at least…


Why are we still not unit testing?

Unit testing. At least unit testing. I thought this was a solved problem, people. Agile has come out of the shadows and dominated the techie buzzword machine for years now. Everyone is doing Scrum now, right? Well, OK, they’re usually doing “ScrumBut”. “We’re doing Scrum, but we’re not demoing our software to the customer.” Or, “We’re doing…


NCrunch + Debug.Print() = Almost a REPL

I remember back in the mid-90’s when I could launch a compile cycle on my C++ program and then go to lunch.  It might be done by the time I returned.  I’m sure that SOMEWHERE in the world there are still projects like that, but they’re definitely not in the mainstream like they used to be. …


The CORRECT Way to Code a Custom Exception Class

There is a lot of advice out there on how to go about building your own custom exception classes.  A lot of these sources are at least partially correct. Some are totally wrong.  Some even advocate abandoning the base System.Exception class altogether, but that’s throwing the baby out with the bathwater, in my opinion.  None…


Starting Up with Windows Azure

I’m not new to Windows Azure, but I would definitely like to learn more.  Really, the landscape has changed a lot in the last year or so, making "knowing Azure" about as complex as "knowing Microsoft" was about 10-15 years ago. Let’s start off with some definitions. X as a Service "Software as a Service"…


How to Stop Mercurial from Complaining about SSL Cert Fingerprints

I know Mercurial is just trying to be friendly and warn me that it doesn’t know if certain SSL certs are valid or not (though I wish they’d just use the Windows cert repository when on the Microsoft platform), but the little nag warnings like… “warning: hg.codeplex.com certificate with fingerprint 1c:ef:1d:4f:55:57:5b:8c:ab:78:a1:72:2c:d2:1b:56:fd:64:03:19 not verified (check hostfingerprints…


AutoFakes Is Now Live at CodePlex

After many years of just talk, I’ve finally released my first Open Source Software project at CodePlex, called AutoFakes.  It’s meant for Visual Studio 11, though I suppose it would probably work in VS 10 if you have Pex/Moles installed, but definitely haven’t tested THAT. Basically, it’s like an auto-mocking container (minus the container –…


Why Won’t My Custom Cmdlets Appear?

Once again, I’ve been puzzled multiple times as to why my custom cmdlets sometimes don’t appear in PowerShell after I’ve added them via Add-PSSnapIn.  The last post didn’t stick with me, so a little more detail to drill it into my thick skull this time… As it turns out, Cmdlets must have a public default…