July 2015
Bi-Directional and Self-Referential Associations in Rails
I’ve been working on an application that works to match users together based on a complex set of criteria (read: big slow database query and in-memory processing). The core usage of the application revolves around these user matches, so I want to make sure that either the algorithm will run very fast or can be cached so that it’s not run every time a user visits their matches page.
The most important requirement for our matches is reciprocation. To solve this problem and meet all of the requirements, we can create a bi-directional, self-referential, self-syncing, many-to-many association between users using a has_many :through
association with a join model to keep track of a user’s matches.
Rewriting History With Git Rebase, Reset, and Amend
Editing an existing commit in history with an interactive rebase, reset, and amend.
Quick Setup for Your Rails Apps
We need to make getting up and running with our Rails apps easier. Here’s my attempt.
5 Timesaving KISSmetrics Tips I Wish I Knew About
Moving our SaaS conversion tracking from Google Analytics to KISSmetrics was a great decision, but there were a few things I learned that I wish I would have known before jumping in that would have saved time.
Tracking KISSmetrics Events Using Query Parameters
Accurately tracking new signups, upgrades, and downgrades for a SaaS is extremely important. When our JavaScript Events broke and Google Analytics was no longer reliable, I moved all conversion tracking to KISSmetrics. Query parameters proved to be the simplest and most reliable way to accurately track Events in KISSMetrics.