Less Wrong Than Yesterday

An example of many-to-many associations in Ecto and Phoenix

Warning: I am a novice at Elixir, Phoenix, and Ecto. I'll update this post as I am corrected. Note also that this applies to Phoenix 1.2.0 and Ecto 2.0.2.

Updated: July 11. There is no need for a join table model. See also this post from OvermindDL1.

Phoenix and Ecto have recently (I gather) gotten explicit support for many-to-many associations (via join tables). I found that making them work was uncharacteristically hard, hence this blog post.

Note: my job was probably made harder because I didn't want to make the join table a first class model

Continue Reading...

Why I knee-jerkedly favor decentralized over centralized communications

(This post is pursuant to a discussion on twitter.)

Amongst humans, centralized communication, centralized knowledge, centralized control, and centralized power seem to go together. That makes sense, as a lot of what Power is, in these times, is the ability to define what's acceptable discourse: what things are worth talking about, and how they should be talked about.

My history with Power has not been good. I tend to be the person talking about the wrong thing, often in the wrong way.

Therefore, in any group I will tend do better if there's less centralization1.

So my bias toward

Continue Reading...

A Realization

In Slaughterhouse Five, Kurt Vonnegut wrote:

Like so many Americans, she was trying to construct a life that made sense from things she found in gift shops.

Haha! What a rube! But it occurs to me that I have spent decades trying to construct a life that makes sense from things I find in a University Library. (Well, I actually find them online, but.)

It's worked out OK. It's definitely more lucrative than shopping. I'm content with it. But I'm not 100% sure it makes me superior.

Continue Reading...

How I Avoid Committing Passwords to Github

TL;DR: My pre-commit-hooks repo might help you avoid checking in passwords or other secrets. Also: a suggestion that any secret string should contain NOCOMMIT.


I once committed AWS keys to a public Github repository. 24 hours later, ~USD2000 had been spent mining bitcoins.

I was motivated to avoid doing that again.

So I began to use Yelp's pre-commit package. It comes with a checker (detect-aws-credentials) that looks to see if the contents of ~/.aws/credentials are in any of the files you're about to commit (or push).

I decided to be doubly-cautious and also check for the distinctive pattern

Continue Reading...

A Checkin Checklist

I'm currently reading Schön's The Reflective Practitioner: How Professionals Think in Action. I plan a few summary posts.

Schön describes how practitioners' problem-solving method consists of poking at the problem with a partial solution, deciding what they think of its reaction, and deciding what to do next1. If satisfied with the reaction, they proceed further. If not, they regroup in a number of different ways.

This reminds me of software development in the style of the Mikado method or Corey's Haines' short-lived branches: you do some work, you think about it, you either commit/push or revert. As such,

Continue Reading...