Matthew Parker

Matt Parker is Head of Engineering for Pivotal Labs

  • What is a Unit Test? (The Answer Might Surprise You)

    What is a Unit Test? (The Answer Might Surprise You)

    There’s a rumor circulating in agile engineering circles that the “unit” referred to in “unit test” is the unit of production code isolated for testing. This rumor is false. And it’s hurting us.

    Read More
  • React License Woes: How to Protect Your Codebases From Churn

    React License Woes: How to Protect Your Codebases From Churn

    Are you worried your company will force you to switch from React to another framework because of React's license? Follow these two simple tips to minimize the pain of switching frontend frameworks.

    Read More
  • Agile Architecture

    Agile Architecture

    Can architecture be agile? If so, when do agile engineers "architect"?

    Read More
  • How to Talk To Your Friends About Microservices

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

    Read More
  • Be Evil

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

    Read More
  • Tests Are An Implementation Detail

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

    Read More
  • Hexagonal Rails and The Ludicrous Terminal Application

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

    Read More
  • Spec "Helper"

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

    Read More
  • RSpec formats and the Single Responsibility Principle

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

    Read More
  • Acceptance Testing with Page Objects

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

    Read More
  • Rails route helpers are brittle

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

    Read More
  • Logically Negating an ActiveRecord scope

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

    Read More
  • Oh, the programs you'll DRY!

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

    Read More
  • Spying on Your Tests with VCR

    Spying on Your Tests with VCR

    VCR is a great tool for recording http requests during a test suite so that you can play them back later when the external server is not running or available. However, I’d like to show you how to...

    Read More
  • WE HAVE MORE CI THAN YOU

    WE HAVE MORE CI THAN YOU

    On my current project, we’ve built two applications: a shrinkwap virtual appliance that a user installs into their virtualized datacenter, and a phone-home application that the virtual appliance...

    Read More
  • Deploying a Rails App to CloudFoundry

    Deploying a Rails App to CloudFoundry

    CloudFoundry has launched a private beta, and if you’re lucky enough to have access to it, you can get free hosting and services for the next 2 months. I recently gained access to it and deployed...

    Read More
  • Roll With The Punches

    Roll With The Punches

    You’re a product owner, and you have an idea. In your mind, it’s pure, simple, and beautiful. You want to hold onto that idea, to nurture it, cherish it. Reality, however, has other plans. You’ve...

    Read More
  • A 1 minute test suite, 6 months in

    A 1 minute test suite, 6 months in

    “Rails is slow, but Rails tests are slower.” Rails may be slow, but I’m here tell you that it’s likely you have only yourself to blame for your slow test suite. I’ve seen some bad test suites in...

    Read More
  • Dumb Controllers, Layered Models

    Dumb Controllers, Layered Models

    “I like to make my views so dumb, there’s no reason to test them.” Uncle Bob Martin said that at some point, or something very close to it. I’d like to take that a step further: I like to make …...

    Read More
  • Building Crash-Proof Applications the YAGNI Way

    Building Crash-Proof Applications the YAGNI Way

    I’m a YAGNI’ist. I’m vigilant against over-engineering. I will seek out and destroy over-engineered, anticipatory, predictive designs. This wasn’t always the case; early on in my career, I was...

    Read More
  • loading
    Loading More...