Most Popular Articles

A Rails testing “hello world” using RSpec and Capybara
If you’ve never written a test in Rails before, this guide will make it easy to write your first one. Includes video.

A repeatable, step-by-step process for writing Rails integration tests with Capybara
Perhaps the hardest part of writing a test is just figuring out how to get started. This guide provides an easy step-by-step process to follow so that you never get stuck before you start.

RSpec/Capybara integration tests: the ultimate guide
If you’ve written a few RSpec/Capybara integration tests but you want to understand integration tests more deeply, this guide will help. This guide will also help if you’re confused about testing terminology.

Technical Articles

Ruby/Rails Testing

Ruby Testing Micro-Course
How to get started with Rails testing
A Rails testing “hello world” using RSpec and Capybara
A Rails model test “hello world”
How I set up a Rails application for testing
My general approach to Rails testing
What kinds of Rails tests I write and what kinds I don’t
RSpec/Capybara integration tests: the ultimate guide
A repeatable, step-by-step process for writing Rails integration tests with Capybara
How to write a test when the test implementation isn’t obvious
How to deal with complex Factory Bot associations in RSpec tests
Examples of pointless types of RSpec tests
The difference between let, let! and instance variables in RSpec
Why I don’t use Shoulda matchers
Ruby/Rails testing glossary
Rails testing resource roundup
Factories and fixtures in Rails
How I set up Factory Bot on a fresh Rails project
Why use Factory Bot instead of creating test data manually?
How I write characterization tests
Refactoring to POROs (using tests)
How to clear up obscure Rails tests using Page Objects
Test smell: Obscure Test
Code smell: long, procedural background jobs (and how to fix it)
Testing private methods
How I test JavaScript-heavy Rails applications
RSpec mocks and stubs in plain English
How to test methods that involve puts or gets
Mystified by RSpec’s DSL? Some parentheses can add clarity
Sometimes it’s better for tests to hit the real API
Common causes of flickering/flapping/flaky tests
How dependency injection can make Rails tests easier
How to pick a testing framework for your Rails project
Things you can ignore when getting started with Rails testing
Taming legacy Ruby code using the “Sprout Method” technique, example 1
Taming legacy Ruby code using the “Sprout Method” technique, example 2
When I use controller/request specs in Rails and when I don’t
The difference between integration tests and controller tests in Rails
The difference between RSpec, Capybara and Cucumber
The difference between system specs and feature specs
How to get RSpec to skip view specs when you generate scaffolds
RSpec hello world
Testing anti-pattern: setup data leak
Achieving blur in capybara
Capybara: expect field to have value
Logging the user in before Capybara feature specs
Why I recommend against using Cucumber
How to see your feature specs run in the browser
How to run feature specs headlessly or not headlessly at will
Avoiding network calls in Rails tests without using mocks, stubs or VCR
Rails scaffolding and TDD are incompatible (but that’s okay)
In which I dissect and improve a Rails test file I found on Reddit
Reader Q&A: Tommy’s question about testing legacy code

General testing

Using tests as a tool to wrangle legacy projects
How I make testing a habit
How I approach test coverage metrics
The five benefits of automated testing
What if I want to do test-first but I find it easier to do test-after?
Deploy to production on day one
What a “walking skeleton” is and why I always start projects with one
What exactly makes “bad” code bad?
Why “users don’t care about code” is a bad saying
“We don’t have time to write tests”
Atomic commits and testing
All code eventually gets tested, it’s just a question of when and by whom
Continuous integration
How do you tell which areas of a project’s test suite need attention?
Where to start with introducing TDD to a new Rails app


Where to put Rails modules
Understanding Ruby blocks
How to restart Sidekiq automatically for each deployment
How to Dockerize a Sinatra application
Understanding Rails secrets/credentials
Extracting a tidy PORO from a messy Active Record model
Beware of “service objects” in Rails
When used intelligently, Rails concerns are great
Lessons I learned converting all my database IDs to UUIDs
My top five Rails performance tips for performance noobs
My vim setup for Rails


Getting started with Angular CLI
How to delete an item from a list in AngularJS
How to add a test coverage report to an Angular CLI project

Angular + Rails

Get started with Angular 4 and Rails 5
How to deploy an Angular CLI webpack project to Heroku
How to deploy an Angular 2/Aails 5 app to Heroku
How to deploy an Angularjs/Rails single-page application to Heroku
How to deploy a Rails application with an Angular CLI Webpack front-end

General programming

All my best programming tips
When to refactor
Stuck on a programming problem? These tactics will get you unstuck about 99% of the time
Variable name anti-patterns
Logical arguments for programmers
Common legacy project challenges and how to address them
Unlike real debt, technical debt is unavoidable
The difference between domains, domain models, object models and domain objects
Who’s to blame for bad code? Coders.
“Perfect is the enemy of the good” is a false dichotomy
“It’s ugly but it works”
How I make sure I really understand a feature before building it
Why small stories are better than big ones
Refactorings should be atomic
How to perform hotfixes without side effects or extra stress
Why the boy scout rule is insufficient
My favorite debugging techniques
My Git aliases
Git workflow anti-patterns
My first attempt at a genetic algorithm
My second attempt at a genetic algorithm


How to deploy a Ruby on Rails application to AWS
How to deploy a Ruby on Rails application to AWS Elastic Beanstalk
How to launch an EC2 instance using Ansible
How I wrote a command-line Ruby program to manage EC2 instances for me

Non-Technical Articles

How to get traffic for a technical blog
How to make your organization attractive to engineering talent
How to get a team to get behind an engineering project
My experience speaking at 7 tech conferences in 9 months including RailsConf, RubyHACK and RubyConf India


RailsConf 2019 – Coding with an Organized Mind
RubyHACK – Using Tests as a Tool to Wrangle Legacy Projects
RubyConf India – Using Tests as a Tool to Wrangle Legacy Projects
Chicago Angular Meetup – Introduction to Angular 2