New Website

Jeff Terrell
April 30, 2018

I've launched my personal website on jeffterrell.tech. It's powered by the Cryogen static site generator, written in Clojure, and hosted for free without ads by Netlify. (Thanks, everybody!)

I've moved the posts I wrote for the (now defunct) Altometrics Blog here. I hope soon to be linking to more of the content I've created over the past couple of years, like Medium posts and YouTube videos, so stay tuned. Until then, you can read about this website.

Continue reading →

Docker's dirty little secret

Jeff Terrell
June 6, 2016

Docker isn't what I thought it was.

I thought it provided a way to run docker images on any host that supported docker. As it turns out, that's not true.

I first encountered something fishy when I found this docker image on Docker Hub, whose description said, "FreeBSD Docker host is required to run this image." I thought, "How is that even possible?" And sure enough, I could run the image just fine with a FreeBSD host. But when I tried to run it on my iMac, it silently failed. How could this be?

Continue reading →

Histograms: an anti-rationale

Jeff Terrell
May 6, 2016

Or: Why Histograms are the New Pie Chart

Introduction

Although pie charts are commonplace, those skilled in the art of data visualization disparage them as a poor vehicle for conveying information. Wedges, the unit being compared in a pie chart, are not something the human visual system is designed to compare with much accuracy. Furthermore, many good alternatives exist, such as bar charts, that lose no information and are easier for humans to digest accurately.

I argue that histograms are more akin to pie charts than bar charts. In other words, they do not play well with the human visual system, and a good alternative exists. This article examines the primary flaw of histograms.

Continue reading →

A few tips for writing macros in Clojure

Jeff Terrell
April 29, 2016

Abstract

Macros are powerful metaprogramming tools, but they can be difficult to use well. In this article, I share several tips for creating correct, legible, and useful macros in Clojure.

Introduction

Macros, in the Lisp sense, are in many ways the ultimate metaprogramming tool. In Lisp, not only is the parse tree explicit in the source code (which is the point of the parentheses), but the code can be treated simply as data. Macros, which transform code, are thus, in Lisp, merely transforming data. And functional programming techniques excel at transforming data.

Continue reading →

The benefits of writing a separate test suite for your app

Jeff Terrell
March 11, 2016

Abstract: Keeping a test suite separate from the application itself has several benefits, including adopting a user's perspective, (potentially) identical tests for development or production, load testing, and flexibility to totally rewrite the app.

We Altometrics engineers were recently discussing the nature of tests and test suites. Why are they useful? What assumptions are they founded on? What about them is lacking? As we discussed, we stumbled upon an idea that was new to us: having a test suite that isn't fundamentally tied to the language and framework you're using for your application. No doubt others have considered and used this approach, but it seems to be far enough out of the way things are done, at least in our programming subculture, that it seems worth publishing.

These days, it's common to have tests live in the same project as the application itself, e.g. in a test/ directory. The tests typically have direct access to the application code, which is in the same runtime and is (implicitly or explicitly) required using the same module mechanisms that the language provides. The application code sometimes, though hopefully not often, can recognize whether it is being tested and do different things in a testing context versus a production context. Also, various aspects of the application's configuration change in a testing context, which can add complexity to the project as well as allow inconsistencies between test and production environments.

Continue reading →