Andrew Timberlake Andrew Timberlake

Hi, I’m Andrew, a programer and entrepreneur from South Africa, founder of Sitesure for monitoring websites, APIs, and background jobs.
Thanks for visiting and reading.


Add utility functions to iex

How to create short functions that can be called directly in your Elixir iex session

2 Aug 2023

Why code_change wouldn’t work on my GenServer

In Elixir code_change/3 is the callback that allows you to upgrade state in a GenServer process during a hot-code upgrade—but it didn’t work for me. Understanding how the erlang release handler finds processes to update helped me to figure out what was wrong and how to fix it.

3 Jul 2023

Pause tests in Ember

Every now and then you want to pause a test so you can investigate the state of the world around it.

28 May 2018

Repo.count in Ecto

Enable Repo.count(query) in Ecto

19 Sep 2016

Benchmarking in Elixir

How to benchmark a function in Elixir using benchfella

28 Mar 2016

Using Dead Man's Snitch with Whenever

A quick tip to make it easier to use Dead Man's Snitch with the whenever gem

6 Sep 2015

Cleaning up a Ruby hash

Hash#clean, a monkey patch to provide easy, Array#map like access to hash values to update them inline.

30 Aug 2015

Skipping blank lines in ruby CSV parsing

How to ignore blank lines when parsing a csv file with ruby's CSV parser.

12 Jul 2015

Append items to a sorted collection in Backbone.js

When an item is added to a collection in Backbone.js it should automatically be added to the corresponding list. When using a sorted collection it would be nice to have it appear in place, especially when not refreshing the entire list. That's what I'll explore in this post.

29 Jun 2015

Looping with Fibers

I needed to loop over a fairly large data set and group it by year and month. In this post I walk through using two Ruby Fibers which communicate between each other in order to do in-loop grouping

9 Mar 2014

Next page