Posts
Don't Repeat Yourself x3
Don’t Repeat Yourself. DRY. It’s an oft repeated axiom among software developers but do we apply it broadly enough? Where we do apply it, do we apply it too aggressively? Today I’ll look at this fine old acronym three different ways: Avoid repeating code, Avoid making the same decisions, and avoid doing work over again.
more⇛I spoke at CNUG Tonight
I spoke at the Chicago .Net Users Group in Downer’s Grove, IL on the topic of Azure planning tonight. I didn’t get to the entire slide deck that I hoped to because there were lots of questions and there was a ton of material to get through (I could speak for a day on Azure probably).
more⇛Is it DevOps?
There is a huge amount of use and abuse of the term DevOps. This probably means that it is very near the top of the hype cycle so expect a lot voices in the next few months or year ranting about how much DevOps sucks. This doesn’t have to be so, but let’s rewind and reacquaint ourselves with the whole concept.
more⇛Pattern Matching Constructs in C# 7
I have already covered local functions and tuples in C# 7. Today, I’ll play around with pattern matching. There’s actually two separate bits of syntax being called a single new feature. One extends the
more⇛switch(){case}
construct, the other extendsis
expressions. Like local functions and tuples, I think this adds some power for communicating the intention of the code. It can also be misused (what can’t?), a little more on that later. I hoped to do this article a week ago, but it took me longer to identify even a little additional insight over the MS docs than I expected. I’ve probably spent 15 hours fiddling around to come up with a somewhat meaningful sample!Finally: Proper Exception Assertion in MSTest
As part of the overhaul of everything Visual Studio and .Net Core, there is an overhauled testing framework. Microsoft has been informally calling the MSTest V2. The most exciting part of this is the fact that we’ve finally have
more⇛Assert.ThrowsException
and its async counterpartAssert.ThrowsExceptionAsync
as part of the framework. Unfortunately, MS didn’t completely abandonExpectedException
, which was a major disappointment as its use is almost always an anti-pattern. From what I can tell, MS didn’t invent this anti-pattern, they just brought it in when they created MSTest using other frameworks as a guideline.
subscribe via RSS