How Diaspora Connects Users

Note: this is the first in a series of technical posts about Diaspora’s software architecture and code, and is a slightly modified version of the original on the Diaspora blog. If you have topics you’d like to see covered in future installments, please let me know.

A single installation of the Diaspora software is called a pod. The Diaspora distributed network is made up of hundreds of these pods, each with a set of users – sometimes just one on an individual pod, sometimes tens of thousands on a community pod. Each pod is run by a different person or organization. But no matter what pod you sign up on, you can connect with users on any other pod.

When you have friends on different pods, your stream seamlessly mixes updates from remote friends with updates from friends on your pod. In this way Diaspora is a distributed social network that resembles, from the user’s perspective, a centralized social network.
Read more »

CruiseControl.rb and RubyGems 1.5.2

Diaspora uses CruiseControl.rb to run our continuous integration server. CC.rb is on Rails 2.3, but the applications it’s building are on Rails 3, which means I occasionally run into … weirdness.

Last week, for example, I wanted to speed up our builds by upgrading Bundler to 1.0.10 and RubyGems to 1.5.2. Because of the new partial caching of the dependency graph, the upgrades shaved two whole minutes off the build locally, and I wanted to get that on CI.
Read more »

Running Cucumber Features Without a Display

I’ve been helping out with the Diaspora project, an open source social network that gives you control over your own data.

When I first started poking around the codebase a few months ago, they’d just started writing a few cucumber selenium integration tests – which of course I want to encourage! – but they weren’t running them on their continuous integration box. And if you aren’t running them on CI, you can’t really call them tests…

It’s not that the developers were lazy; it’s just that Diaspora’s CI box is an ubuntu server instance that doesn’t even have xwindows. There’s no way to attach a display, and without a display, a browser won’t run. So how can you run selenium features that have to actually open a browser window and click on stuff?
Read more »

Disalienation: Why Gender is a Text Field on Diaspora

A few months ago, I started contributing to the Diaspora project. I began by refactoring their test suite and setting up a continuous integration server. Then I installed Jasmine and started mucking around with the JavaScript. That was all pretty straightforward.

A few weeks ago I made a slightly more controversial change.
Read more »

Speak Ruby in Japanese

I’ve studied Japanese on and off for more than ten years – mostly “off.” I took a year of language when I was in college, but since then it’s just been periodic classes at Soko Gakuen in San Francisco.

I managed to pass the JLPT level 3 a few years ago, so in Japan last month, I was decent at ordering food and navigating the subway. But I quickly discovered that I couldn’t really talk to another programmer. None of my classes even taught me how to say “programmer,” let alone “code,” “object,” “method,” “development environment”… Read more »

Ruby Kaigi

Apart from attending Ruby meetups, my main reason for visiting Japan last month was RubyKaigi 2010.

Why not, indeed? (photo by Lee Lundrigan)

I wasn’t sure what to expect. Would it be all men in button-down dress shirts and pleated pants? Would I give my talk to a room full of blank looks? Would I be the one with the blank look when I went to a talk in Japanese? WOULD THERE BE FAN SERVICE??
Read more »

Asakusa.rb

A few days after we arrived in Japan, Sarah Allen and I went to the weekly hack night put on by Asakusa.rb, a meetup group in Tokyo founded by Akira Matsuda. Read more »

Safe Facebooking

I have a Facebook account on which I have duly locked down the privacy controls (several times, it feels like). In theory, no one can get at my information unless we become Facebook friends.

In practice, I’ve discovered, it’s another story entirely. After spending the better part of ten days, recently, integrating Facebook into another website, I have new rules for how I use Facebook. I realize they sound a little tin-foil-hat-style crazy, so after the rules I’ll explain a bit about why I adopted them.
Read more »

RailsConf Slides – Beyond (No)SQL

Preliminary slides for my RailsConf talk I’m giving this afternoon on conceptual tools for evaluating databases. Contains some profanity at the beginning. Slides are subject to change since I haven’t actually given the talk yet!
Read more »

Outside-In BDD: How?!

I use rspec on every project, and I’ve started adding cucumber to all my projects in the last few months. There’s lots of information out there about how to set up and use cucumber, but there isn’t much covering your developer workflow when you’re using these tools.

How do you start, and how do you know you’re finished? What do you test, and where? These questions can be answered hundreds of different ways, but here’s my way.
Read more »