Dave King

Rendering React Components Using Perl

React + Perl

The Tilt.com website was originally built using Perl. Over the years, we added jQuery UI to build widgets that had dynamic page behavior. Perl on the backend and jQuery UI on the frontend helped us get to where we are today, but about a year ago it was clear to us that we needed to start introducing a more modern technology stack. We chose React for our view layer and Node.js for the application layer. We recently launched a revamp of our settings page which is built on top of this new technology stack.

We’re always busy working to improve the Tilt website, so stopping everything to port the rest of the site to a new stack would take time that we can’t afford. Instead, we needed to gradually introduce the new technology – ideally side-by-side with our existing codebase. In this post I’ll go through how the Tilt website does server-side rendering of React components from application servers running Perl Dancer. This has allowed us to modernize our tech stack without requiring us to rewrite our entire codebase.

Ali Anari

7 PostgreSQL Data Migration Hacks You Should Be Using (but Aren’t)

Ever find yourself needing to add a new column to your million row users table? Small caveat, this needs to be done without blocking concurrent writes. You also just learned that you need to re-hash all of your users’ passwords using the scrypt key deviation function to harden their credentials against attackers. Oh, and no users are allowed to log in for the duration of this data migration. At the breakneck pace that many of today’s high-tech startups operate, this type of pressure is not entirely uncommon. Fortunately, you have elected to use PostgreSQL or some other industrial-strength RDBMS as your database workhorse of choice, and you will soon have the necessary tools to nail down these newfound requirements with ease.

Dave King

Roll Your Own A/B Tests With Optimizely and React

At Tilt, our growth team uses Optimizely to do light-weight experiments like inject text into the navbar, change styles, or adjust static pages to test out different designs. Optimizely allows you to easily A/B test your website by injecting client-side JavaScript to do things like inject inline styles or change button text. However, our engineers also use Optimizely for richer experiments – showing completely different versions of the homepage, updating the behavior of a JavaScript widget, and rolling out new product features to employees first for testing. In this post I’ll walk through our experiment setup and show how we use React.js together with the Flux architecture to build an application whose behavior can be easily changed through Optimizely.

Gabe Westmaas

Engineering Your Organization

Tilt HQ

As businesses grow, and their products evolve, the teams building those products evolve as well. As a leader it is important to remember that how you design your organization is just as important as how you design your product and your architecture. Your team is how you win in any space, and organizing to help them execute is absolutely vital.

At Tilt, we recently made an organizational change designed to increase ownership, make communication more efficient, and to improve our ability to prioritize product changes that are best for our customers. Organizational changes can often be hard, and seem difficult to implement, but the alternative of leaving inefficiencies in place can be far worse. Below I’ll explain how our teams evolved so far at Tilt, and how the recent changes have impacted our work so far.

Al Newkirk

10 Reasons to Never Use Perl, Ever

The title of this article is somewhat troll-bait albeit a sentiment posited by many Perl critics. Perl is an awesome and relevant programming language with a huge repository of modules, expressive syntax, and quirky semantics (which I love) and many other benefits which derive from an uncommon approach towards software development; having said that, the following are ten reason to love or hate the Perl programming language.

1. Expressiveness. It’s Multiple Choice All The Way Down.

The Perl programming language and its community are centered around the TIMTOWTDI philosphy (there’s is more than one way to do it), and it’s multiple-choice all the way down, i.e. Perl is a multi-paradigm and context-sensitive language, with support for compiler directives, and can be configured to require implicit or explicit syntax. A simple Perl 5 script feels like a superset of shell scripting. Enable the strict and warnings pragmas and Perl starts to feel like a dynamic high-level programming language. Leverage any of the many object systems available, e.g. mop, Moo, Moose, et al, and it starts feeling like you’re implementing a structured and tightly coupled architecture. What’s nice is that none of this is forced on you; you opt-in for additional features where desired. Due to the ability to scale/morph Perl into more strict, formal and powerful variants as-needed is one of the main reasons I enjoy developing with it.

Ali Anari

Lessons Learned Publishing My First CPAN Module

So you want to join the ranks of thousands of other #perl hackers and release something to the community? I just developed my first standalone Perl module at Crowdtilt called WebService::NationBuilder, and the process was actually a lot more straightforward than I thought it would be. Keep reading to find out how simple it really is to write your own module and become a published CPAN (Comprehensive Perl Archive Network) author!

PAUSE then play

Head on over to PAUSE, the Perl Authors Upload SErver and register your very own account using this form. Your account will get its own directory (mine turned out to be authors/id/A/AA/AANARI) where your uploaded distributions will be indexed and rapidly propogated across CPAN and its mirrors thanks to some of the fast rsync stuff the PAUSE workers have developed. Don’t let the old-school feel of the PAUSE site fool you, it’s a serious platform that was created by Andreas Koenig in 1995 and has been closely maintained since. For the ever curious, you can dive into the source GitHub repo here.

Matt Williams

Your First Hire Should Be a Sysadmin

From the very beginning of Crowdtilt, we envisioned an architecture where the only limitation to how fast we deployed code was the speed at which we could actually develop. Our CTO saw the value in hiring a Sysadmin to focus on this objective from day one. That’s where I come in and here’s how I’ve helped us achieve the goal…

Configuration Management

The first order of business was managing our systems at a higher level. It took very little deliberation to decide on Chef as our configuration management (CM) tool. Our prior experience, the massive collection of available application “cookbooks”, and a very active community were enough to convince us that it was the right tool.

The nice thing about integrating with a CM framework from the beginning is being able to tie in each piece of a web-stack as it becomes necessary, instead of having the monolithic task of converting an entire architecture. The very start of our app involved a Postgres database, the web app, and Nginx out front – fairly typical. We were able to utilize community Chef code for Postgres and Nginx and all of our site specific modifications were implemented in our Crowdtilt “cookbook”. We rolled our own Chef resources for app deployment and wallah – running chef-client now deploys code from our git branches. Combined with great plugins like knife-ec2, Chef is now building our Cloud servers and then configuring our software on top of them!