• Category Archives: Uncategorized

Offshore: Rails Remote Factories

Last year at TaskRabbit, we decided to go headlong into this Service Oriented Architecture thing. We ended up with several Rails and other Ruby apps that loosely depended on each other to work. While this was mostly good from a separation of concerns and organizational perspective, we found effective automated testing to be quite difficult.

Specifically, we have one core platform application whose API is the most used. We also allow other apps to have read-only access to its database. Several of the apps are more or less a client to that server. So while the satellite apps have their own test suite, the integration tests can only be correct if they are exercising the core API.

To handle this use case, we created a gem called Offshore. A normal test suite has factories and/or fixture data and it uses database transactions to reset the data for every test. Offshore brings this the SOA world by providing the ability to use another application’s factories from your test suite as well as handling the rollback between tests. Through the actual exercising of the other application as well as a simplified usage pattern, we found that we trusted our integration tests much more that alternative approaches.

Read more at the source

App-pocalypse Now

I’m getting pretty sick of being nagged to install your damn apps.

This-website-has-an-ipad-app

XKCD helpfully translates:

Xkcd-download-our-app

Yeah, there are smart app banners, which are marginally less annoying, but it’s amazing how quickly we went from “Cool! Phone apps that finally don’t suck!” to this sad, eye rolling, oh-great-of-course-you-have-an-app-too state of affairs.

“Would you like to install our free app?!?” is the new “It looks like you’re writing a letter!”

— Jeff Atwood (@codinghorror) January 9, 2013

Four years, give or take a few months, if you were counting. So what happened?

Read more at the source

Complaint-Driven Development

If I haven’t blogged much in the last year, it’s because we’ve been busy building that civilized discourse construction kit thing I talked about.

Civilized-discourse-construction-kit-inc

(Yes, that’s actually the name of the company. This is what happens when you put me in charge of naming things. Pinball machines, people, what’s the difference? I’ve apologized to Bill Budge already.)

So if you, like my investors, are wondering why this process took a whole entire year, I should explain how I build things, or at least, how we built Stack Overflow and Stack Exchange and now Discourse

Read more at the source

Complaint-Driven Development

If I haven’t blogged much in the last year, it’s because we’ve been busy building that civilized discourse construction kit thing I talked about.

Civilized-discourse-construction-kit-inc

(Yes, that’s actually the name of the company. This is what happens when you put me in charge of naming things. Pinball machines, people, what’s the difference? I’ve apologized to Bill Budge already.)

So if you, like my investors, are wondering why this process took a whole entire year, I should explain how I build things, or at least, how we built Stack Overflow and Stack Exchange and now Discourse:

Read more at the source

The Road to VR

A month after I wrote about John Carmack, he left id Software to become the CTO of Oculus. This was big news for two reasons:

Carmack founded id in the early 90s. An id Software without Carmack is like an Apple without Woz and Jobs. You wouldn’t leave the prestigious company you founded unless you had some pretty compelling new dreams to pursue.

Oculus is the company many are betting will break VR headsets into the mainstream. And even if they don’t manage to pull that off, they are now the most credible contender to make serious headway towards consumer VR the industry has ever seen….

Read more at the source

The Road to VR

A month after I wrote about John Carmack, he left id Software to become the CTO of Oculus. This was big news for two reasons:

  1. Carmack founded id in the early 90s. An id Software without Carmack is like an Apple without Woz and Jobs. You wouldn’t leave the prestigious company you founded unless you had some pretty compelling new dreams to pursue.

  2. Oculus is the company many are betting will break VR headsets into the mainstream. And even if they don’t manage to pull that off, they are now the most credible contender to make serious headway towards consumer VR the industry has ever seen.

Virtual reality is the stuff of programmer legend. Every software engineer that’s ever read Snow Crash (or more recently, the excellent Ready Player One) has dreamed of jacking into the metaverse. But why now? Well, if you think of it in very coarse terms as strapping two smartphones on your face and writing clever glue software, modern consumer VR is a natural outcome of what Chris Anderson calls the “peace dividend of the smartphone wars”:

Read more at the source

Rails 4 Engines

At TaskRabbit, we have gone through a few iterations on how we make our app(s). In the beginning, there was the monolithic Rails app in the standard way with 100+ models and their many corresponding controllers and views. Then we moved to several apps with their own logic and often using the big one via API. Our newest project is a single “app” made up of several Rails engines. We have found that this strikes a great balance between the (initial) straightforwardness of the single Rails app and the modularity of the more service-oriented architecture.

We’ve talked about this approach with a few people and they often ask very specific questions about the tactics used to make this happen, so let’s go through it here and via a sample application.

Rails Engines

Rails Engines is basically a whole Rails app that lives in the container of another one. Put another way, as the docs note: an app itself is basically just an engine at the root level. Over the years, we’ve seen sen engines as parts of gems such as devise or rails_admin. These example show the power of engines by providing a large set of relatively self-contained functionality “mounted” into an app.

Read more at the source
close