How and Why to Squash Your Pull Request

Many pull requests go through a cycle: programmer opens pull request, maintainer gives feedback, programmer makes changes, repeat until ready to merge, maintainer merges. Prior to the merge, the pull request can be messy, full of reverts, fixups, and WIP commits. In the end, those commits are noise. We can tell a better story by squashing the branch. ...

July 3, 2016 · 6 min · Jake Worth

Recreating Elixir's Enum.sum

I’m learning Elixir, and today as an exercise, I was challenged to recreate Enum.sum using recursion. Here’s my solution. ...

June 30, 2016 · 2 min · Jake Worth

Server Side Sorting in Ruby

Recently a friend asked me this question about server-side sorting in Rails. Here’s the question and my answer. ...

June 28, 2016 · 2 min · Jake Worth

Keyword, Match, and Region in VimScript

After a recent talk I gave that included VimScript, an attendee asked a question about the differences between keyword, match, and region following syn in a Vim syntax highlighting file. Here’s my answer. ...

April 20, 2016 · 1 min · Jake Worth

From One End to the Other in Ruby

A while back I tackled the following programming challenge: From One End to the Other: Find the smallest possible (positive) integer that ends in a six such that if that six is removed and placed in front of the remaining digits of the number, the resulting number will be four times as large as the original. ...

March 6, 2016 · 2 min · Jake Worth

Vim Buffer Problem

A few weeks back I tackled the following programming challenge from my colleague Josh Branchaud: Vim Buffer I open up a new Vim buffer and type all the numbers 1 to 10,000, separated by spaces. Then, my cat walks on the keyboard and somehow activates a substitution command that replaces all the ‘0’ digits (zeros) with spaces. If I now sum up all the numbers in the buffer, as delineated by spaces, what is the total? ...

March 6, 2016 · 2 min · Jake Worth

Building a Markov-Chain MVP in Ruby

Project announcement! Last night I built a Markov Chain-generated novel, titled Ceramic Nation. ...

September 11, 2015 · 1 min · Jake Worth

The N + 1 Problem

Recently, I was thinking about the N + 1 problem. N + 1 is a performance issue in a web application, where a method call unleashes a torrent of database queries. ...

February 22, 2015 · 2 min · Jake Worth

Ruby Symbol#to_proc

What does &: mean in Ruby? In this post, I’ll explain. ...

October 31, 2014 · 2 min · Jake Worth

The Case for One Computer Monitor

I have one computer monitor on my desk. Not long ago, this was common, but today, many people have two, three, or four monitors. In this post, I’d like to make the case that most professional programmers can use just one monitor. ...

March 31, 2014 · 3 min · Jake Worth