All posts tagged with code:

Correct Ruby Threads and ActiveRecord Connections

Recently, we had an opportunity to trivially parallelize some ActiveRecord queries in our Ruby server. In a common response structure, we needed to both query for the actual data requested along with some meta-information about pagination, etc.

Handy Kue Maintenance CLI Scripts

Building systems at my last few companies, it has been enormously useful to have a robust queueing platform. I’ve tried Amazon’s SQS, NATS, and a couple others but Automattic’s Kue has been the best combination of performance and introspection.

Calming Facebook's Eager Pixels

Working at an e-commerce startup, I get asked to implement new tracking features every day. I built out the integration points for Google Analytics, Google’s retargeting pixel, Google’s conversion pixel, Facebook’s retargeting pixel, Facebook’s conversion pixel, Facebook’s Audience pixel (and here is where I run out of breath). That’s not even a complete list.

My Bookmarks Are All Bookmarklets

I love all my bookmarks. None of them actually go to any websites, though. They’re all bookmarklets.

Rate-Limit Your Node.js API in Mongo

Update: After a request by Jason Humphrey, I’ve released this implementation as a standalone NPM module: mongo-throttle.

Memory Leaks Using Canvas in Node

At ThreadMeUp, we do much of our image manipulation and generation using HTML5 Canvas objects. This allows us to build some interesting tech, like mirroring client-side interactions with the canvas onto a Node server representation.

Scripting Ruby with no Internet

As I sit, I’m riding on the commuter rail as it creaks and staggers its way North. I intended to write some thoughts down, but got distracted in the hassle of touching a new Jekyll post.

The texture of your code

I’ve been thinking about intuitive methods of code review. Last week, I read an article about the Japanese onomatopoeic words used to describe texture that resonated with something I’ve been inkling about for a bit.

Writing Database Middleware in Go

I’ve been writing two main types of Go programs recently. One routes http input through a series of transformations and calculations and one receives http input to transform or return data stores.

Fix to Enable Display Features - Google Analytics iOS SDK

In the official Google Analytics iOS SDK documentation, this function call will enable Display Features in your app:

Error Tracking in gatrack.js

I’m releasing a new gatrack.js this week (previously introduced back in January). Amongst some minor fallback improvements, the main changes are: