Caleb Thompson

D&D Race Options

Class options for Dungeons and Dragons 5e for all published books, Unearthed Arcana, and the Elemental Evil Players Companion.

Call to Adventure

This is a handout I've lovingly researched and prepared for my players in a Dungeons & Dragons (D&D) campaign I'll be starting soon.

Need a Slug?

Rails provides its own slug generator, so you may not need another gem.

Don't Get Distracted

Salary Social Club

Caleb Thompson

Stabby Stubbing

Service objects are those concerned with a specific use-case in a system. A common example I’ve written time and again is Registration. Registration handles things like creating a User and its related objects, sending welcome emails, kicking off background jobs, etc. My applications are filled with them, and I love them all. They take complexity and isolate it so that it can be ignored when thinking about other objects, considered a “black box” when it’s working, and stubbed out in tests.

Advanced Postgres Performance Tips

What do you do when indexes aren't enough?

Literate Vim

Vim commands are terse and arcane, but very expressive. See a complex command broken down by clause.

Reading a Postgres EXPLAIN ANALYZE Query Plan

Take a guided tour through a query plan for a "simple" SQL query.

Painting a Picture of Mental Health

People with hobbies are generally healthier. They're also at a lower risk for some mental health issues.

Interface With Your Database in Go Tests

Go's interface provides a way to abstract away things like your database for testing.

PGP and You

Learn not only how to use PGP, but why each step is important and how to make decisions when interacting with PGP.

Flash messages with :target

Use fragment identifier to display "flash messages" after form submissions to give users closure.

What Free Speech Isn’t

The Constitution of the United States limits Congress from making laws to limit the freedom of speech of United States citizens.

Use One Field to Store Names or Addresses

Collect personal information from users, such as their names or addresses, in a single field rather than multiple fields.

Form Filling is Formulaic

Filling out a form with Capybara can be very tedious. With Formulaic, we aim to make the process less repetitive and more fun.

Don’t Talk to (Just) Me

Company chatrooms aid communication, especially across multiple locations; they provide an archive for past conversations for those who were not around; and they can serve to refresh the memory of those who were.

Come for the Git Commits, Stay for the Power

I have a confession to make: I wasn't always a Vim user. There was a time when I used such editors as Aptana Studio 3 and Sublime Text 2.

Implementing Multi-Table Full Text Search with Postgres in Rails

Easily searching across an application’s data is a pervasive need. If you are lucky, you can get away with simple sorting or searching on a single column, but it is more likely that you need full text search across multiple models, all from a single search field.

Use RSpec.vim with tmux and Dispatch

As you may know, there are quite a few of us now working at thoughtbot. While we share a lot of the same opinions, we all work a little differently. Most of us are running specs from Vim using RSpec.vim. Some of us use RSpec.vim with tslime. I enjoy a different setup with Dispatch.

Iceberg Classes

An “Iceberg Class” is loosely defined as a class with more private than public methods, but we will be specifically talking about those classes with only one or two public methods (other than an initializer).

External Posts in Jekyll

If you contribute to more than one blog, you may want to have all of your posts show up in a single stream, even if they aren’t hosted on that same site.

Store Page Titles in I18n

While the <title> element is one of the only required tags in HTML, it is often overlooked by developers and designers alike until the end of the development process.

Apples and Oranges

This is probably the best cocktail concoction I have ever created.

Solving crontab: temp file must be edited in place

Solution for error crontab: temp file must be edited in place

Google Authorship on Giant Robots

You may have noticed a recent addition to thoughtbot’s blog posts. We concluded an experiment to add a “Written by ” byline and link the author’s name to their Google+ profile.

Sandi Metz’ Rules for Developers

Back in January, Sandi Metz introduced her rules for developers in a Ruby Rogues podcast episode episode. Around the time Sandi’s rules were published, the team I am on was starting a new project. This post details the experience of that team applying Sandi’s rules to the new application.

It’s for the Orphans!

Too often, I come across GitHub Pages branches (gh-pages) branches that are simply forks from the master branch of the repository. This is not ideal.

5 Useful Tips for a Better Commit Message

You’re already writing decent commit messages. Let’s see if we can level you up to awesome. Other developers, especially you-in-two-weeks and you-from-next-year, will thank you for your forethought and verbosity when they run git blame to see why that conditional is there.

Love Your Eyes

If you are a developer or designer, you spend a good portion of your day writing, reading, and generally looking at code. Unless you are psychotic, you do so in a monospaced typeface which aids in legibility of code by giving each character the same width as every other character.

Wrong, Sir, Wrong!

You are wrong about a few things, and that is okay. All of history's smartest people have been wrong, so you are in good company. Being wrong is a great way to learn something new, but first you have to be willing to acknowledge your mistake.

How to Write a README

There is a science and an art to writing an effective README for an open source project.

Strong Parameters as Documentation

Besides moving attribute whitelisting to the controller rather than the model, Rails 4’s move to Strong Parameters over attr_accessible provides great documentation about the data with which records are being created.

Stop Counting Hours

An Open Letter To the Management of (Generally) Small Companies with Internal Software Teams

Piracy is a Service Problem

Not that I ever pirated anything in my life, but if I allegedly had, I would have stopped when I realized how much value Valve’s Steam service provides for gaming.

Thoughts on the Google Reader Redesign

I was one of the power users. I fucking loved Google Reader.