How to Perform Multiple Asynchronous Tasks with D3

This post explains how to use D3 to perform a set of tasks asynchronously and wait until those tasks have been completed before performing another task.


How to Zoom and Center a Leaflet Map on a Single Marker

This post explains how to zoom and center a Leaflet JS map on a single marker.


How to Install QGIS with Homebrew on macOS

This post explains how I installed the QGIS open source Geographical Information System software on macOS El Capitan using the Homebrew package manager. These are the results of my trial and error attempts to get QGIS installed and running smoothly without errors.


How to Create Leaflet Control and Layer Plugins

In this post, I’ll explain how to implement control and layer plugins for the Leaflet JavaScript mapping library. I’ll focus on explaining the structure and lifecycle of Leaflet plugins. Template code for creating Leaflet control and layer plugins is available on GitHub under the MIT license.


Improve your Code by Refactoring to Nouns and Verbs

To quote the refactoring pioneer, Martin Fowler:

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Improving the readability of your code will enhance its usability for your future self and for other developers. In this post I’ll teach you a technique I use when programming that will make your code read more like English. When your code reads more like English, you will need fewer comments to document your methods. Instead of explicitly writing comment blocks that describe what a method does, you will express those comments in the way you name your methods and in the way you compose your method calls.


How to Access Your iCloud Drive Folder in the Terminal App

iCloud Drive is available as a folder in the Finder on Mac OS X Yosemite (10.10) and later. However, iCloud Drive doesn’t act like a normal Finder folder, which is problematic when you want to work with iCloud Drive in the Terminal app:

  • iCloud Drive is not listed as a folder in your home folder
  • You can’t drag the iCloud Drive icon at the top of a Finder window onto the Terminal to copy and paste its path

Troubleshooting Twitter API Application Authentication Failures

All developers know the frustration of finding out that once functioning code no longer works. This can happen when your previously working Twitter API application no longer connects to the Twitter API because of an authentication failure. In this post I’ll show you how to solve a common cause of Twitter API application authentication failures.


Compactly Visualizing Data with a Double-Ended Bar Chart

This post describes a double-ended bar chart that compactly visualizes two numeric values in a single table cell. Visualizing a column of values with double-ended bar charts makes it easy to see trends and outliers in the data.


A Test for Identifying Categorical Data

This post describes a method for identifying whether a data set is composed of categorical values. Automatically identifying whether a data set contains categorical values enables applications to make use of such data without requiring users to supply this information.


A Responsive YouTube Plugin for Jekyll

This post introduces a plugin I developed to embed responsive YouTube videos in Jekyll websites. Jekyll is a static website generator that is extended with plugins written in Ruby. Responsive videos automatically adjust their dimensions to fit the HTML element in which they are embedded, even when the size of that element changes. Furthermore, the dimensions of responsive videos always maintain the aspect ratio.