Caleb Hearth
  • Engineering Blog
  • Conference Talks
  • TTRPG
  • Linktree
2023
  • Running a Single-User Mastodon Instance

    How I use my domain in my Mastodon username, settings I recommend for single-user servers, and migrating to a new instance.

  • Work with Me

    I’m a developer, conference speaker and organizer, technical blogger, and mentor with over 11 years of experience in Ruby on Rails and Postgres. I’ve recently been learning iOS development with Swift and SwiftUI. Across my career I’ve also worked in Go and Node.js projects.

  • The Decree Design Pattern

    The Decree pattern helps developers write single-purpose service objects that have a predictable API contract, are composable, are easily tested, and isolate the core logic of your app.

  • This Gem is Mentionable

    Mentionable is a gem that provides support for inbound Webmentions and microformats in Rails apps.

  • The Rescue: Cadet's Log

    Cadet’s log, Stardate 48211.4: My Star Trek Adventures character Eater-of-Grass looks forward to his assignment aboard the USS Rio Grande.

  • Read Ruby's Enumerable Docs

    Become familiar with Enumerable to grow as Rubyist and write clearer, more performant code.

2022
  • Painting and Proficiency With Your Tools

    Musings on collaboration, adaptability, and learning focused through my hobby of painting miniatures.

  • Chesterton's Fence

    We should heed Chesterton’s Fence and be careful to consider why our teammates wrote the code that they did before we look at it and think “there is a better way”.

  • The Five Minute Standup

    I’ve been experimenting with a 5 minute standup meeting rather than allowing standups to run long. Scheduling them at 5 minutes before the hour and allowing them to go a little long if necessary has been really effective at keeping the team on track.

  • RSpec: The Bad Parts

    RSpec is good, but it’s even better with less of it. We’ll first look through a heavily obfuscated real-world example, learning why parts of RSpec like let, subject, before, shared_examples, and behaves like can make your tests hard to read, difficult to navigate, and more complex. We’ll discuss...

  • Ignore RuboCop Changes in git blame

    Have you ever run git blame, looked at the commit for a line, and seen some big refactoring or formatting commit? It’s so frustrating not to be able to find the useful context on changes when this happens. When adding StandardRB or RuboCop, or when making changes to your .rubocop.yml...

  • has_few :god_objects

    We can achieve better object design and smaller interfaces by defining associations in one direction only.

  • Design Your Codebase with Low Fan-out, High Fan-in Classes

    Smaller, simpler classes are easier to reason about than larger, more complex ones. Building low fan-out, high fan-in classes helps in designing simple systems.

  • The Law of Demeter

    Talk to your neighbors, but don’t go into their garages—what is the Law of Demeter, how can we follow it in our code, and when should we make exceptions.

  • Avoid Test Delays And Speed Up Your Development Cycle by Mocking Callbacks

    It takes a bit more work to mock a method that has a callback block than one without, but it’s worth it.

  • Review: The Silent Patient

    Alicia is the silent patient, a successful painter who seemingly killed her loving husband of a happy marriage and tried to commit suicide, and who has been unable or unwilling to speak ever since. Theo Fabre is a psychotherapist who wants to help and understand his patient. To do this, he seeks...

  • Custom Hexagon Shape in SwiftUI

    Creating custom shapes in SwiftUI is pretty easy. At a high level, to satisfy the Shape protocol you just need to define path(in rect: CGRect) -> Path. Shape itself conforms to View, so you can even get a preview in XCode of your shape while you build it.

  • Classic Sangria Recipe

    This recipe was originally posted to Serious Eats, but at some point was lost to their redesigns. The original author was Helen Jane.

2021
  • Signing Git Commits with Your SSH Key

    You may already be signing your Git commits with a GPG key, but as of today you can instead choose to sign with your SSH key! Signing in SSH is a relatively new feature that lets you use your private SSH key to sign arbitrary text and others to verify that signature with your public key.

  • Mixing it up with Mocktail

    Mocktail is a new testing library from the lovely folks at Test Double. It seeks to provide a more modern, less intrusive, and friendlier interface for using test doubles.

2020
  • clamp() for Responsive Design

    CSS clamp() provides a method for setting numerical values with a minimum, maximum, and a calculated value between the two. The syntax is calc([min], [calculated], [max]) and it’s useful for times when you want to scale some value based on the size of the screen by using the vw length unit.

  • 5th Edition Adventure Elevator Pitches

    A mostly spoiler-free collection of “elevator pitch” descriptions of D&D 5e’s officially published adventure books.

  • Flowing Text Around Images

    Magazines, books, and other print layouts sometimes use images that overlap with the text, and have that text wrap around the shape of the image. It can make for an interesting effect, bringing a feeling of motion into a static medium. Done right, the text and image become conceptually closer in...

  • CSS-only Submenu Navigation with Post Tags

    Our posts have categories, which I’ve used as a “collection” or “series” of posts that are on related topics. Recently, I’ve been writing up campaign notes for my D&D session as the characters themselves in a category simply called Campaign Logs. I’m also hoping to continue to write this type...

  • A Site Reborn

    I’ve moved my Jekyll site into a Rails app, and I’ve done just enough work to have every post render without errors and added just enough style to make things readable. Some of the site still looks pretty bad, and none of it looks good yet. But that’s ok, because my plan is to rebuild and...

  • QD&D Sildar & Phandalin

    Lirazel prays to Marthammor Duin, thanking him for the safe journey to Phandalin and praising the welcome of the Phandalin people.

  • QD&D Yeemik & Klaarg

    Duke Rutledge recalls the final events in the Cragmaw Hideout.

  • QD&D Cragmaw Hideout

    Dionisia records the events so far with the Cragmaw in her spellbook.

  • Come Find Me in the Hallway

    As a speaker, you shouldn’t be taking questions on stage after your talk.

  • Q D&D Goblin Ambush

    Mel writes to his brother in Neverwinter of the party’s journey so far.

  • Austin Recommendations

    Hannah & Caleb’s Austin recommendations

  • Why Hearth?

    Why is my last name Hearth now?

2019
  • D&D Class Options

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

  • Overlay Text on Responsive Images

    When putting text over an image, readability can be a concern. By combining the responsive HTML5 <picture> container with some best practices for image overlays, we can achieve a good result.

2018
  • The Atonement of J. Robert Oppenheimer

    I built software to kill people and I gave a talk about it to warn people to think through their choices. Oppenheimer helped design the atomic bomb - was he able to atone?

  • Dice Bag of Nine Pockets

    More a Handy Haversack than a Bag of Holding

  • Kvothe the Player Character

    Kvothe the Bloodless. Kvothe the Arcane. Kvothe Six-String. Born to a runaway noble and the leader of a troupe of transient Edema Ruh entertainers. Apprentice to a travelling arcanist and tinker. Street urchin in Tarbean, student at the University, Talented musician at the Eolian, Adem-trained...

  • Conan: A Thief, a Reaver, a Slayer

    A review of The Coming of Conan the Cimmerian by Robert E.

  • Inspirational Reading: The Appendix

    Inspiration for all the fantasy work I have done stems directly from… being an avid reader of all science fiction and fantasy literature.

  • Using HTTP Headers to Secure Your Sites

    A Use Case of using Observatory by Mozilla to learn about configuring sites safely and securely with examples for the Heroku Static Buildpack.

  • D&D Race Options

    Race/Ancestry options for Dungeons and Dragons 5e from Elemental Evil Player's Companion, Volo's Guide to Monsters, Player's Handbook, Sword Coast Adventurer's Guide, and Mordenkainen's Tome of Foes.

  • Call to Adventure

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

2017
  • Jekyll on Heroku

    Jekyll, the static website generator written in Ruby and popularized by GitHub, is a great candidate for being run on Heroku.

  • Need a Slug?

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

  • Don't Get Distracted

    I’m going to tell you about how I took a job building software to kill people.

    But don’t get distracted by that; I didn’t know at the time.

  • Salary Social Club

    How does your salary compare to others? Is that job offer fair? Does a candidate have reasonable pay expectations? Take the Salary Social Survey and we’ll find out together!

  • Sorting Rubyists

    We’ll visualize the steps for several sorting algorithms not only using pretty visualizations on a slide, but also with people as the objects being sorted. Don’t know what an algorithm is, what performance really means, or what “Big O” means, or what these best-, worst-, and average-case time...

  • Stabby Stubbing

    Define a .call() on service objects to stub with Procs.

2016
  • 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 Query Plan

    Take a guided tour through a query plan for a “simple” SQL query.

2015
  • Painting a Picture of Mental Health

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

  • The Joy of Miniature Painting

    As developers, we often stare at a computer screen all day only to go home and stare at more glowing boxes all night. Having a nontechnical hobby can really help to keep us sharp for our day jobs.

    As I live-paint a small model for a tabletop wargame, I will describe some of the techniques I use....

  • Interface With Your Database in Go Tests

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

  • What is this PGP Thing, And How Can I Use It?

    The need to keep your personal information, sensitive or nonsensitive, secure from prying eyes isn’t new, but recent events have brought it back into the public eye.

    In this workshop, we’ll build and upload public keys, explore Git commit signing, and learn to sign others’ PGP keys. If we have...

  • The Hacker's Diet

    Body weight can be a difficult issue to grapple with. But we’re software engineers—what if we approached it as an engineering problem? Our bodies have inputs (food) and outputs (water and waste). The difference between the two dictates weight changes.

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

  • Multi-table Full Text Search in Postgres

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

    Thanks to the power of ...

  • 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 names & addresses from users in a single field, not structured forms.

  • Form Filling is Formulaic

    Filling out a form with Capybara is tedious. Formulaic, makes the process less repetitive and more fun.

2013
  • Not Invented Here

    Rails is a mixture of design patterns, practices, and magic. In this talk, we’ll explore how Rails embraces ideas from other frameworks and projects.

    Active Record was born of Martin Fowler. MVC was the brainchild of Trygve Reenskaug. Rails 3 completely absorbed the Merb project, gaining...

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

  • How to Accidentally Learn Vim

    I have a confession to make: I wasn’t always a Vim user.

  • Multi-Table Full Text Search with Postgres

    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

    Use Dispatch to open new tmux splits to run tests async.

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

  • 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 [Author Name]” byline and link the author’s name to their Google+ profile.

  • Sandi Metz’ Four Rules for Developers

    Four rules for clean and maintainable code from Sandi Metz

  • It’s for the Orphans!

    I often come across GitHub Pages branches (gh-pages) branches that are simply forks from the master branch of the repository.

  • 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

    You look at code all day. Make it look nice with Pitch.

  • Wrong, Sir, Wrong!

    You are wrong about a few things, and that is okay.

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

2012
  • Stop Counting Hours

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

2011
  • Piracy is a Service Problem

    Piracy is almost always a service problem and not a pricing problem.

  • Thoughts on the Google Reader Redesign

    I loved Google Reader, but Google ended it in favor of Google+

© 2011–2023 Caleb Hearth. Made with ♥ in Denver, CO. Happy Wednesday!