A Tale of Slow Pagination

When I see a query in my logs without either a limit or a count clause, alarm bells go off because it is likely a hotspot. A pagination query has alimit so it usually flies under my radar:

Keep Reading


Meditations on Writing a Queue

What is a queue besides the line for the little teacups at Disney? In programming, a queue is a very useful data structure that can simplify our programs, especially when it comes to threading. In today’s post, I’m going to walk you through building a queue in C, talk about how to effectively use a queue, and also compare to the Queue implementation that ships with Ruby.

Keep Reading


Bayes is BAE

Before programming, before formal probability there was Bayes. He introduced the notion that multiple uncertain estimates which are related could be combined to form a more certain estimate. It turns out that this extremely simple idea has a profound impact on how we write programs and how we can think about life. The applications range from machine learning and robotics to determining cancer treatments. In this talk we’ll take an in depth look at Bayes rule and how it can be applied to solve problems in programming and beyond.

Keep Reading


The Programmer's Guide to Pairing on Pregnancy

You don’t have to be physically carrying a child to be involved in a pregnancy. If you pair program, you know that you don’t have to have your hands physically on the keyboard to contribute to the experience. I’m currently on track for my second little one and wanted to give a shout out to some things I’ve seen that partners of all genders have done to help with pregnancies. While I cannot physically carry my child to term, that doesn’t mean pregnancy is a passive event for me. Let’s get started.

Keep Reading


Writers Write

I’ve been writing more recently. One of the biggest reasons is that I’ve been writing more recently. Writing begets writing; the more I do it, the easier it is to do it more. I’ve found diet to be similar. When I’m eating fresh fruits and veggies, it’s what my body craves. But as soon as I “treat” myself with a bag of chips or a fatty big honking slice of greasy pizza, guess what my body wants? More of the same.

Keep Reading


Coders Code

As truisms go, one of my favorites is “writers write”. Many developers walk around pondering whether they are “real coders”, or they ask “how can I be more senior”. To them, I say “coders code”. If someone is writing, then by definition they are a writer. It doesn’t matter if they are J.K. Rowling or working a blog post. The act of writing creates a writer. The same is true of coding. If you’re in QA or DevOps or Front End or Backend or spend your days hunting down missing semicolons in code-reviews, you’re a coder. When you put your fingers to the keyboard at your editor of choice, even if it’s not Emacs or Vim or **, you're still a coder. If your fingers never grace a keyboard and you drive a pair session or dictate text, you're a coder.

Keep Reading


Ruby Backend Performance Getting Started Guide

You want a faster app - where should you start? At RailsConf 2017 I was in a panel “Performance: performance” moderated by Sam Saffron and joined by Eileen Uchitelle, Rafael Franca, and Nate Berkopec. While we talked about many things, I realized I’ve never written explicitly about how to go from “zero” to “working on application performance”. Here’s the video from the panel if you’re interested:

Keep Reading


Stopping the Death Spiral of Indecision

Break things and move fast. Which things? How fast? What if we’re stuck? A death spiral of indecision is when there’s a problem everyone agrees that must be solved - But there’s not one clear obvious winning answer. Today, I want to share an extremely effective technique I’ve used to make progress in these hairy situations.

Keep Reading


The Fastest Way to Generate a Heap Dump on Heroku

You’ve got an app with runaway memory use, what do you do hotshot? What do you do? If you’ve exausted the usual suspects it might be time to take drastic steps. It might be time to take a production heap dump. I previously wrote about doing this on Heroku, but since then we’ve launched Heroku exec, a way to SSH into a live running Dyno to allow you to debug. Now that you can do that, you don’t need an AWS account or any fancy gems to generate a heap dump, just activate this feature and add the rbtrace gem to your app. Let’s do this to an app together.

Keep Reading


A Variable By any Other Name

Sometimes when you do everything right, things still go wrong. I previously talked about how bad I am at spelling and grammar in “The Four Year Typo”, which reminded me of my first major production failure at Heroku.

Keep Reading


Support my writing, Join my Mailing list 😻 🤠

You'll get an email when I write new posts. It costs you nothing, but lets me know you like what I wrote and want more. Enter your email below.