Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Matthew Parker

Posts By

LABS
How to Talk To Your Friends About MicroServices

Hey Matt! My company has gone all-in on microservices. Cool, right?

Wait – you mean your company plans to build all applications with microservices from the get go?

Yes! We’re starting with an ambitious new development project, but we’re already planning to rewrite a lot of our existing applications with microservices too.

Read more »

LABS
Be Evil

In the fourth “Is TDD Dead?” debate, DHH, Martin Fowler, and Kent Beck discuss the cost of tests. DHH points out that well written tests don’t have to change when you’re refactoring – but he finds that he spends far more time changing behavior, not refactoring code, which, of course, necessitates changes to the tests.

Read more »

LABS
Tests Are An Implementation Detail

I want to go fast forever.

Let me back up. My client wants a new feature for their software. I’ve been doing this long enough to know that there’s a good chance they’ll want to change what they see, once they see it.

Read more »

LABS
Hexagonal Rails and The Ludicrous Terminal Application

In the second “Is TDD Dead” hangout, DHH says that developers justify hexagonal architectures by arguing that it gives them the freedom to swap out the GUI for a terminal application, or to swap out the database layer with an in memory store.

Read more »

LABS
Spec "Helper"

I spent years writing tests for my Rails apps, and every single test file began with this one, seemingly innocuous line:

require 'spec_helper'

When I first started writing tests, I had no idea why I wrote this line – other than that’s what the README said to do.

Read more »

LABS
RSpec formats and the Single Responsibility Principle

For years, my unit tests have largely followed the “method spec” format:

describe SomeObject do describe "#some_method" do context "in some context" do it "does something" end context "in some other context" do it "does something else" end end describe "#some_other_method" do context "in some context" do it "does something" end context "in some other context" do it "does something else" end end end

But I have a theory: this approach to testing encourages violations of the single responsibility principle.

Read more »

LABS
Acceptance Testing with Page Objects

An acceptance test suite goes through stages of complexity. Our first acceptance tests started off using a browser DSL like capybara directly:

fill_in "tweet", with: "hi!" click_button "Tweet"

(Note: For the purposes of this article, I’m going to pretend I’m working with a team to build Twitter.

Read more »

LABS
Rails route helpers are brittle

TL;DR: Use the resource itself instead of a route helper when representing urls in your Rails application. Route helpers hard code knowledge of model names, making refactoring to polymorphism harder.

This is a story about a widely used, and potentially very brittle Rails feature.

Read more »

LABS
Logically Negating an ActiveRecord scope

If you simply want to know how to negate an ActiveRecord scope, and you don’t care how it works, here’s the TL;DR:

scope(:not), ->(scope) { where(scope.where_values.reduce(:and).not) }

Arel is the powerful library that powers the Rails ActiveRecord library. It’s also black magic (and largely undocumented black magic at that).

Read more »

LABS
Oh, the programs you'll DRY!

Someone just told you your code isn’t DRY, and you have no idea what they’re talking about. You’re fresh out of college, and you’re starting to fear that your Computer Science degree left you woefully unprepared for the challenge of real-world software engineering.

Read more »