Category Archives: Developers

Reliable, Low-Latency Request-Reply with ZeroMQ

zeromqZeroMQ is a cross-platform, cross-language library that provides high level wrappers around traditional low level network sockets. Some of its most helpful features include: sockets that automatically reconnect after connection failures, making hostname connection strings easy to work with, and providing sensible defaults for buffer sizes and other parameters. However, ZMQ goes a step further than just simplifying initialization and error handling. Instead of the standard send and receive socket functions, it supports several types of socket patterns that restrict which types of sockets can pair, send, receive, as well as the sequencing of send and receive calls. Continue reading

How to Join Data in Hydra


Hydra is great not only for continuously processing data streams, such as web logs, but also for tasks such as special data analysis, validation, troubleshooting, etc., that call for one-off jobs. Among the latter use cases, one of the more interesting and complicated cases is joining data sets. In this post, I’ll use an example to demonstrate how to join two data sets. Continue reading

The Case for a Stricter Flux


With companies like Yahoo, AirBnB, Atlassian, and Github embracing React.js, I think it’s safe to say that Facebook has set a new standard in front-end development with this remarkable library. What drew me to React, at first, was its genius approach to rendering. What has kept me using it are things like propTypes, invariant, and the belief that it’s a library’s responsibility to yell at a developer when they are doing something wrong. Continue reading

Using Routie for React.js


React is a great new Javascript framework for building fast, dynamic single-page websites. Paired with Flux, you can construct a single page application very quickly. But in a single page application, all of your content is available under a single, unchanging URL. That makes it harder to measure engagement per content, the user cannot easily return to an URL or share it without pointing to the homepage, and interpreting a user’s interaction can be murky if all the URLs are the same. Thus the need for routing within a React.js application. Continue reading

Scaling the Single Page Application with React.js and Flux


Here at AddThis, we just completed a rewrite of our dashboard using Facebook’s React.js framework and the Flux application architecture. Managing a large Javascript application as its complexity, number of users, and number of developers grows is something that we’ve spent a lot of time thinking about during this process. In this post I’ll attempt to distill down some of the lessons we learned along the way and how React.js and Flux can help to address them. Continue reading

PageSpeed Insights: Removing Render-blocking CSS

If you write javascript which dynamically loads CSS files on your page, you have probably seen PageSpeed Insights complain to you about removing render-blocking CSS. Fixing render-blocking javascript is relatively easy: just add an async attribute to the script, and include it before the closing body tag, or use an async loader like Google Analytics. Fixing render-blocking CSS is a little trickier. We employ a little media query magic to get the job done.

// append css dynamically to head
var head = document.getElementsByTagName('head');
var element = document.createElement('link');
element.rel = 'stylesheet';
element.type = 'text/css';
element.href = '//';

//here's the magic = 'non-existant-media';
head.appendChild(element, head.firstChild);
setTimeout(function () { = 'all';

Continue reading

How Our Developer Squads Use Slack, Phabricator & Google Docs


Maximizing our productivity is key to meeting goals and releasing on time. We use all sorts of project management tools, but we also have a series of informal guidelines as to how we use Slack, Phabricator, and Google Docs among our developer squads. Specifically, how we integrated into their API, follow informal internal guidelines of conversation, and how the tools themselves work great to make our work great. Continue reading

7 Things to Consider When Making iOS and Android Apps with Cordova vs PhoneGap


The promise of PhoneGap vs Cordova development is quite alluring. Use your existing HTML/JS/CSS skills (and team) to build cross-platform mobile applications for iOS/Android, and other mobile platforms. As a bonus, you can then update your existing codebase once for all platforms instead of maintaining separate repositories (or paying specialized developers). This post will talk about some of the questions and decisions you should consider before beginning your next cross-platform Cordova project. Continue reading

5 Lessons Learned In Automated Browser Testing


We really love testing our tools and products to verify they’re working correctly and efficiently. We’ve been expanding our set of automated browser testing for the website and our suite of publisher tools. We use the Selenium browser automation framework and we are big fans of this framework. Our philosophy has been to automate the simple workflows and allow QA to focus on the more intricate workflows. Here are 5 guidelines that we’ve learned to write more effective browser automation tests. Continue reading

Behind the Scenes of Our Scrolling Engagement Report

This morning, we released our 2014 Q2 Engagement Report analyzing scrolling behavior on content across the AddThis network. In this report, we break this data down broadly by time and operating system, but also go deeper into how users were referred to the page (i.e. through ad campaigns), and which AddThis tools the pages were using. Here I’ll describe the mechanics of how we created the report. Continue reading