Posts By: William Johnston

Simple pattern for looping state machines

Occasionally, I’ll run across a case where some code (usually a background process) is looping, maintaining some kind of state, and checking for state change. For example, I have an application which monitors a file for changes. It does this by checking the file timestamp, and, if it has changed from the last run, operating… Read more »

Action Cable with Redis Passwords

If when setting up ActionCable with a Redis backend, you run into the NOAUTH Authentication Required. (Redis::CommandError) issue, you need to modify your cable.yml to fix this issue. Change the url section to read something like url: “redis://:password@hostname:6379”. The key is the colon _before_ the password. It’s basically saying that the username is blank. I… Read more »

Project Timelines

I’ve been dealing lately with issues around project estimation and timelines, and I recently realized something. Developers tend to be optimists, and are willing to tackle cool new projects which are very greenfield. Green field projects are important and can sometimes offer huge payoffs. However, their downside is that they are by their nature unscoped…. Read more »

My rules of caching

Since caching is one of the two hard things in Computer Science (along with naming things and off-by-one errors), and I’ve been dealing with tons of caching issues of late, I here offer my personal rules of caching: Caching should be done as little as possible. You should not cache until you know you need to…. Read more »

Rbenv on Webfaction

I’ve been using rbenv for development for a while, but recently I started working with using rbenv on my Webfaction hosting. Here is a basic tutorial. First, create a new Passenger app in the Webfaction control panel. You can create a Rails app, but it adds some extra cruft you don’t need. Log into the… Read more »