I keep writing up talk submissions for conferences. They get accepted. And I give talks.
Yet it occurs to me that this is the “if I build it, they will come” approach to speaking. I’m going to turn it around. This is a request for requests. Continue reading “Speaking Topics RFR”
I just published an early relese of my Simulated.FileSystem library. This library makes it easier to separate platform concerns out of my models. It works really well with a hexagonal architecture.
This library will define a set of ports for common external dependencies, with multiple adapters for each port. The initial release just includes a file system port, with two adapters: native file system and in-memory file system. Continue reading “New Simulators Library”
I was calmly reading stuffÂ when someone said something wrong on the internet. I got angry. It touched a common nerveÂ so I got angry out of all proportion. I decided to respond to my anger…by saying stupid stuff on the internet that others can use to make themselves angry.
What made me angry? In the talk about values, the author said the following:
We humans are inherently complex and, while logical thinkers, we are also led by our emotions and some inherent animalistic traits that canâ€™t reasonably be overcome.
Bullshit! I am not logical! How dare you denigrate me so! (as I said, angry.) Continue reading “Emotions vs. Logic. Round 1. Fight!”
I am looking for help.
I am project maintainer for the OData client library for iOS. I need to find iOS developers to use this library to build apps. I also need to get more contributors. Continue reading “Looking for iOS Developers”
I am giving a couple of workshops in the next few weeks on refactoring. It’ll be a guided fishbowl experience. I start the pair with code that has specific design problems, then I (and the audience) guide them in ways to refactor those problems away.
I’ve got some of my code to work with, but figured “hey! I should take some suggestions from the audience!” Continue reading “Looking for bad code”
In my character printer, at one point I had someÂ code like this monstrosity. I know it’s a monster, because testing it
- Requires at least one test double (the
- Involves running a bunch of code not related to the unit test at hand.
Many people don’t think this code is so bad. They discuss various ways to test it, usually involving more mocks.
I’m going to show another way. Since it doesn’t require mocks and this is my blog, it’s a better way. Continue reading “Mock Free Example, Part 3: Fixing Untestable Code Sequences”
I recently posted an entry about replacing mocks with Simulators. That one used a Simulator from my running example code. Here’s another example, which may make the concept more clear.
This is a file system simulator. I’m building it out as a generic simulator, re-usable across projects. Right now, I’m using it Continue reading “Simulating the File System”
One of the common uses for mocks is to replace expensive or stateful components, such as file systems, networks, GUIs, and databases.
However, I also see a cluster of other problems that arise at interfaces with these types of components, especially when they are system-level services:
- Primitive obsession. Rarely are these APIs written as methods on an abstract object that return other abstractions. Instead, people pass around a lot of strings & things, which become arguments for static methods.
- State. Partly because there isn’t a place to put it, state tracking becomes a mess. For example, you want to ask a web service for something. Are you logged in? Do you have to do something if you aren’t?
- Lack of encapsulation. Those static methods end up everywhere. And often they end up with duplicate patterns everywhere (e.g., check for login before each call).
- The API does not feel natural to the application. It doesn’t follow the project’s idioms, and doesn’t just flow into place.
For this reason, I use an entirely different sort of test double: a system simulator. And often these simulators stop being test doubles Continue reading “Mock Free Example, part 2: Simulators”
Llewellyn Falco recently posted on testing ASP.Net pages with Approval tests. His post talks about how to test the ugly pages out there: the ones thatÂ ignore all the MS guidance and just define everything in a big, ugly, page Load handler.Â I’m not sure what I’d recommend for testing well-written ASP.Net page view & templating. Perhaps something like the following? Continue reading “Testing Well-Written ASP.Net Pages”
In conversation today, we hit on an interesting idea. It’s truthy; I’m not sure whether it’s true. In the experience of the people in the room, the following two statements were identical:
- Tasks, and responsibilities, are done by individuals. Individuals are accountable for outcomes.
- Every person in the company is assigned multiple parallel tasks, stopping at the point where each person has the number of tasks which makes them ineffectual.
The places where we have not seen #2 all do team-based task ownership, responsibility, and accountability. Is this true in your experience as well?
Continue reading “Does Individual Accountability Imply Inability to Prioritize?”