Quantcast
Channel: design – Arlo Being Bloody Stupid
Browsing all 29 articles
Browse latest View live

Decoupled Design

Recently, I’ve had a large number of discussions around the use of mocks for testing, probably because I keep saying that Mocks are Evil. As a result, I’ve had to articulate how I design systems. This...

View Article



How I Learned to Stop Worrying and Love the Mock

I learned something very useful from Marty Nelson’s blog entry on the proficinecy levels of TDD. It was the first time that I saw a construction which included mock objects as a good thing and that...

View Article

Mock Free Example, Part 1: Project Intro

Previously, I presented mocks as nuclear weapons. Unsurprisingly, commenters wanted examples. I exist to serve. This series will discuss a partly-completed project that I have lying around. The project...

View Article

Mock Free Example, part 2: Simulators

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...

View Article

Simulating the File System

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...

View Article


Mock Free Example, Part 3: Fixing Untestable Code Sequences

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 _character field). Involves running a bunch...

View Article

Agile vs Design

An overheard conversation at work got me thinking while I was headed home. I’ve now got to send some of those thoughts your way. The one guy was arguing against agile on the basis that it “throws the...

View Article

Easily Eliminate Most Mocks

In previous discussions about mock-free unit testing, I’ve shown techniques that I use to eliminate the hard-to-eliminate test doubles. I’ve skipped the simple techniques that I apply all the time....

View Article


Mock Free Example 4: Everything’s Better with Async

In the previous post in this series (“last week” to those who didn’t read it over a year ago), I made simple code complicated in the effort to make it unit testable. It was all going along fine, until...

View Article


The No Mocks Book

Recently on twitter, Clayton asked for a good book about unit testing without mocks. I don’t believe such a thing can be written, so I’ll try to write it in one blog post. First, here it is in one...

View Article

Architecture – Scaling Design

My position on architecture is different from most peoples’. My view works really well at scale (much better than the traditional view, in my experience), but it is very different. I start with one...

View Article

Good naming is a process, not a single step

Many people try to come up with a great name all at once. This is hard and rarely works well. The problem is that naming is design: it is picking the correct place for each thing and creating the right...

View Article

Naming is a Process, part 2: Missing to Nonsense

In part 1, we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article


Naming is a process, part 3: Nonsense to Honest

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article

Naming is a Process, part 4: Honest to Honest and Complete

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article


Naming is a Process, part 5: Honest and Complete to Does the Right Thing

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article

Naming is a Process, Part 6: Does the Right Thing to Intent

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article


New code is legacy code

My series about naming as a process is really about design. It focuses on design in legacy code. That has sparked people to ask about new code. What about new code? Why not start with intent? I was...

View Article

Naming is a Process, Part 7: Intent to Domain Abstraction

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working...

View Article

The No Mocks Book

Recently on twitter, Clayton asked for a good book about unit testing without mocks. I don’t believe such a thing can be written, so I’ll try to write it in one blog post. First, here it is in one...

View Article
Browsing all 29 articles
Browse latest View live


Latest Images