You Suck at TDD #8 – Doing fewer things

Welcome back to You Suck at TDD. Today’s code will show up in the Improvements-Phase-3 branch if you would like to follow along. In our last episode, we concentrated mostly on the Employee fetching and filtering. Things are better, but we still have a problem… Well, actually, we have a number of problems, but we’ll start…

1

You Suck at TDD #5 - Homework

It is now time for me to turn the tables on you, to present you with some homework. If you take a trip to my Github account, you will find the following lovingly crafted repo. In it, you will find some yucky code. It’s not terrible code – in fact, it’s pretty average code from my…

0

Port/Adapter/Simulator: read-only and write-only dependencies…

When dealing with many external dependencies, the Port/Adapter/Simulator pattern works great. But what about dependencies that are read-only – such as consuming an information feed from another system – or write-only – such as sending a notification to a user? Can we use P/A/S in those scenarios? The answer is a qualified "yes" – we…

0

What makes a good metric?

I got into a discussion at work today about metrics – a discussion about correctness vs utility – and I wrote something that I thought would be of general interest. —— The important feature of metrics is that they are useful, which generally means the following: a) Sensitive to the actual thing that you are…

0

Port/Adapter/Simulator and UI

I’ve been working on a little utility project, and I’ve been using port/adapter/simulator on both the server-side parts and on the UI parts. It has been working nicely, though it took me a while to get there. Initially, I started with a single UI class. After a bit of extension, it looked a bit ugly,…

0

Unit test success using Ports, Adapters, & Simulators–kata walkthrough

You will probably want to read my conceptual post on this topic before this one. The kata that I’m using can be found at github here. My walkthrough is in the EricGuSolution branch, and I checked in whenever I hit a good stopping point. When you see something like: Commit: Added RecipeManager class you can…

0

Unit Test Success using Ports, Adapters, and Simulators

There is a very cool pattern called Port/Adapter/Simulator that has changed my perspective about unit testing classes with external dependencies significantly and improved the code that I’ve written quite a bit. I’ve talked obliquely about it and even wrote a kata about it, but I’ve never sat down and written something that better defines the…

4

A Programmer's Guide to C# 5.0

My author’s copies of the Fourth Edition of my book showed up today: It is significantly updated from the previous version. I especially enjoyed writing the sections on Linq and asynchronous features.      

3

Is programming a generic skill?

Came across a post by Justin Etheredge discussion whether changing between languages is just a matter of syntax. Or, to pick a specific example, can a Java programmer quickly and easily learn to write C# code? The answer is obviously “yes”. Development is about a way of thinking and approaching problems, and given the similarity…

8

Benchmarking, C++, and C# Micro-optimizations

Two posts (1 2) on C# loop optimization got me thinking recently. Thinking about what I did when I first joined Microsoft. Way back in the spring of 1995 or so (yes, we did have computers back then, but the Internet of the time really *was* just a series of tubes), I was on the…

6