Inside Atlassian

Browse How we build

Article in How we build

A bug we found in node.js 7

tl;dr: Don’t use Node 7 until this PR is released. Background We’ve been working for quite some time to try and transition the Trello Server codebase to Node v7. Initially this was prevented by our quite old version of Mongoose, which got slower (by about 20%) when upgrading. After working through this and fixing a few more […]

Article in How we build

Displaying sync state

Early on, we realized that we needed some way to communicate to the user when data isn’t synced with the server yet. Otherwise, you could end up in a frustrating situation where you see a card you created on your device, but no one else can see it and you don’t know why. Design The […]

Article in How we build

Sync is a two-way street

Most of what I’ve written so far has been about uploading changes from the client to the server. But we found it is equally important to download changes from the server periodically, too. What use is offline mode when you aren’t viewing fresh data? How can you share perspective with someone if you only ever push data and never pull? To that end, we also […]

Article in How we build

Lessons from internationalizing Trello, part I: plurals on iOS

On page 52 of my copy of K&R, in a discussion of the ?: operator, is this line of code: printf(“You have %d item%s.n”, n, n==1 ? “” : “s”); And thus began my decades-long proliferation of plural-unfriendly strings. I would later learn that not all languages base pluralization on whether the relevant number is one or not. […]

Article in How we build

Offline attachments

When writing offline mode, attachments proved to be a uniquely difficult aspect of syncing. The nature of attachments differ from other data in Trello. Most data in Trello are simple numbers and strings. Files are an entirely different beast; they’re large and unwieldy. File permissions On Android, when a file is shared with your app, […]

Article in How we build

The two ID problem

I want to call out a surprisingly tricky problem we ran into when developing offline mode: handling identifiers. In Trello, all models have an ID. Each board, list, card, etc. It’s how we define relationships between models as well as how we communicate with the server about them. When you’re online-only, you can depend on […]

Article in How we build

Seeking survivors: introduction to survival analysis

Analyzing time to an event can answer many questions about a population. Medicine, epidemiology, and actuarial science have historically analyzed lifespans. For example, actuaries use life tables to assess the probability of someone living to a certain age. Researchers may analyze the likelihood of a new treatment improving survival rates. One technique historically used by these fields […]

Article in How we build

Sync failure handling

In the last article we discussed how we sync our changes with the server. Ideally, those HTTP requests would always work – if only we could walk the rosy path of best-case scenarios! Unfortunately, when it comes to network requests, all sorts of madness can occur. It’s best to bake madness-handling systems into your code instead of […]

Article in How we build

Syncing changes

Going offline meant using our database for all immediate changes to the client. But obviously we later want to sync those changes with the server. The basic idea behind our sync is to store changes made offline as a series of deltas that are later uploaded to the server. In this post I’m going to […]

Article in How we build

Airplane mode: enabling Trello mobile offline

Good news, everyone! The Trello mobile apps now work offline! Offline mode has been the most requested mobile feature for years. It’s frustrating to lose the ability to use Trello when you enter the subway or you’re flying on a plane. Even more importantly, using Trello in an area with poor cell coverage resulted in […]

Article in How we build

How to deploy Java apps with Docker (a quick tutorial)

For those new to Docker, let me say “Welcome to the party!” It’s an easy way to deploy, run, and manage applications using vm-like containers that are independent of elements like hardware and language, which makes these containers highly portable. And it’s all the rage. So how do you deploy Java apps using Docker? You’re […]

Article in How we build

Lessons from internationalizing Trello, part II: designing for translators

When coding i18n support in an iOS app, you need to know technical things like how to use Localizable.strings files and NSLocalizedString(). And when designing the UI, you need to understand right-to-left interfaces and remember that any element with text can vary in width considerably. But one thing I didn’t anticipate was how important the translation files were […]

Article in How we build

Trello Android schema upgrades

For many years, Trello Android has used a simple system for upgrading the database schema: drop the entire database, recreate it, and repopulate the data from the server! While far from ideal, this solution worked because the Trello server was the only source of truth. Any change you made in the app was immediately transmitted […]

Article in How we build

Trellisheets: How we spin up CSS for Trello sites with ease

We’ve talked about our CSS a lot in the past. We did a State of the Trello CSS and published a guide for writing CSS. We’ve wrapped up everything we’ve learned into Trellisheets, a public repo for all things CSS at Trello. What’s in the project? Our core CSS files. We use these on multiple sites to give them […]

Article in How we build

Git hooks for continuous integration

Git hooks are awesome in the context of continuous integration, so I want to share three CI-related use cases and point you to some ready-made hooks you can add to your workflow. If you’re new to Git hooks, no worries: we’ll start with the basics.