I’m cofounding a new startup, called

It will be a new platform for interacting with data and APIs.

Currently it has a visual JSON editor. If you go to Examples > Pokemon on desktop or paste request get into it on mobile, you can see the JSON editor. It will soon be able to make any kind of API request, like Postman.

I’ll post more about it later!

Building against OpenSSL on OS X/Homebrew

If you have a homebrew-installed library that you need to link against, use brew –prefix to set your LDFLAGS and CPPFLAGS:

brew install openssl
export LDFLAGS="$LDFLAGS -I$(brew --prefix openssl)/include -L$(brew --prefix openssl)/lib"
export CPPFLAGS="$CPPFLAGS -I$(brew --prefix openssl)/include -L$(brew --prefix openssl)/lib"

I needed this to install the latest version of psycopg2. Before I set this, I was getting this error:

Library not loaded: libssl.dylib

I got part of the way there with this StackOverflow answer comment and the rest of the way with a StackOverflow answer that said to use LDFLAGS (setting DYDL_LIBRARY_PATH didn’t work for me) and the rest of the way from another StackOverflow answer that said to use LDFLAGS.

Temporarily forwarding a port on Vagrant

Sometimes when starting a new project it’s useful to set up a temporary port on vagrant, so a new port can be accessed without running vagrant reload. vagrant ssh can be used for port forwarding. To forward a port, run:

vagrant ssh -- -L 3001:localhost:3000

This will forward port 3001 on the host to port 3000 on the guest.

taking from the start and end of an array in esnext

In esnext, you can use array destructuring to capture the first elements of an array, as well as the rest:

const [a, b, ...c] = [1, 2, 3, 4, 5]
console.log([a, b, c]) // [1, 2, [3, 4, 5]]

You can’t, however, put the rest operator at the start or in the middle of the destructuring expression. It must be at the end.

This is a bummer. CoffeeScript supports having a rest argument in the middle of a destructuring expression. Since esnext supports nested array destructuring, this limitation can at least be worked around concisely.

To implement getting the first two, the last two, and the middle, I can define a function leftrest which takes an array [l1, l2, l3..., r1, r2] and a number of rightmost arguments to expect, and returns an array with the first element containing the left arguments, followed by the rightmost arguments ([[l1, l2, l3...], r1, r2]):

const leftrest = (a, n) => {
  const rest = [...a]
  return [rest,]
const [[a, b, ...c], d, e] = leftrest([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2)
console.log([a, b, c, d, e])
// [ 1, 2, [ 3, 4, 5, 6, 7, 8 ], 9, 10 ]

The first line of the function const rest = [...a] simply copies the array before it’s handed to splice. Splice modifies an array in place, so it should be copied first. It’s best to use pure functions to avoid unintended side effects.

This isn’t DRY because it’s necessary to pass the number 2 to leftrest, but it’s close.

Finding Spanish words with Wikipedia and Wiktionary

There aren’t many language translation resources in open source, creative commons, or public domain. I was thinking about how I might start one and remembered that the English Wiktionary has many Spanish words. However, they are only linked in one direction, from the Spanish word to the English word.

How to find the Spanish word? One way is Spanish Wikipedia. For instance on the Instrumentos musicales por clasificación page, there are these words, which are on the English Wiktionary with the corresponding English words:

It seems like this could be used to bootstrap an open source translation dictionary.

fizzbuzz with psuedocode

Here’s a small experiment inspired by literate programming, future languages that aren’t plain text, and the occasional need for the same thing to be implemented in different languages. The idea is that code could can as an outline in a rich text editor and then be converted step by step into code. In the first step is psuedocode that reads well, at least to me, and at the end are working examples in JavaScript and Python.

Step 1

  • for each number n from 1 to 100, inclusive
    • let s be an empty string
    • if n is evenly divisible by 3, append “Fizz” to s
    • if n is evenly divisible by 5, append “Buzz” to s
    • if s is empty, print n
    • if s is not empty, print s

Step 2 (JavaScript)

  • for (let n=1; n <= 100; n++)
    • let s = ”
    • if (n % 3 == 0) s += ‘Fizz’
    • if (n % 5 == 0) s += ‘Buzz’
    • if (s == ”) console.log(n)
    • if (s != ”) console.log(s)

Step 2 (Python)

  • for n in range(1, 101)
    • s = ”
    • if n % 3 == 0
      • s += ‘Fizz’
    • if n % 5 == 0
      • s += ‘Buzz’
    • if s == ”
      • print(n)
    • if s != ”
      • print(s)

Step 3 (JavaScript)

for (let n = 1; n <= 100; n++) {
  let s = ''
  if (n % 3 == 0) s += 'Fizz'
  if (n % 5 == 0) s += 'Buzz'
  if (s == '') console.log(n)
  if (s != '') console.log(s)

Step 3 (Python)

for n in range(1, 101):
    s = ''
    if n % 3 == 0:
        s += 'Fizz'
    if n % 5 == 0:
        s += 'Buzz'
    if s == '':
    if s != '':


A poorly estimated programming task doesn’t just take longer than the estimated time. It also tends to takes longer than it would have taken if it were properly estimated, and is much more likely to not get done properly or to not get done at all.

2018 New Year’s Resolutions

I’m setting three resolutions for the next year:

  1. Go for a 10 mile run each month
  2. Study Spanish for at least 10 hours each month
  3. Run my first triathlon

Each of these are things that I think are very achievable, and likely not to be achieved if I don’t resolve to do them. They also don’t take up so much time and effort that they prevent me from coming up with new goals during the year.


Perfectionism is stifling.

A perfectionist should look for good strategies to get work done despite their perfectionism.

Some strategies, such as trying to fake being a non-perfectionist, are not good ones.

Under this strategy, the perfectionist works against their advantages, while making a pathetic attempt at denying their true nature.