What I Learned Writing a Dropbox Clone - Part 2 - Filesystem Operations

In my previous post, I described the different pieces of the Sahara Sync program. For this post, I'll be focusing on the client daemon and how it interacts with the user; namely, how clientd manages the user's sync directory (which I'll be referring to as the sandbox). This post discusses the details of how clientd was implemented for Linux; many of the statements about the filesystem API may hold true for similar systems like *BSD or Mac OS X.

Read More…
Posted on 2015-02-01

What I Learned Writing a Dropbox Clone - Part 1 - Introduction

Nearly four years ago, I made the above commit on a new project I'd just started. I had been using Dropbox for a little bit, and I liked the idea, but I favor free software solutions for services, particularly when my personal data (like files) are concerned. I looked around to see if anyone had written an FOSS Dropbox clone, and the offerings in that space were very meager (just SparkleShare, and I think maybe a nascent version of OwnCloud ). I had some misgivings about some of SparkleShare's design, and OwnCloud didn't offer the same features I needed, so I decided to go ahead and write my own. Because the project was an effort to distance myself from cloud products, I decided to call it Sahara Sync (the Sahara desert having few clouds). 1)

Read More…
Posted on 2015-01-24

English: A Weakly Typed Language

Two of my hobbies are programming and languages, and I often think about how much the two of them have in common. A short while ago, I was asking my friend Maxim some questions about the distinction between perfective/imperfective aspect in the Russian language. This distinction is unlike how we distinguish tense/aspect in English, so it's often a pain point for native English speakers learning the Russian language. For example, in English, we make the following distinctions when talking about a past event:

Read More…
Posted on 2015-01-10

System Sleuthing - Using ptrace to Print Backtraces

strace is one of my all time favorite command line utilities; not a day goes by when I don't reach for it for something. It's an extremely versatile tool; you can use it to inspect what a program's doing, how a program is doing something, or get an idea of the kinds of things a program is doing to explain why it's running as slowly as it is. I could go on and on about strace, but fortunately I don't have to; Julia Evans has written a number of lovely posts about it if you'd like to learn more.

Read More…
Posted on 2014-06-19

Favorite Vim Options: directory

I was thinking about Vim configuration recently, and I wanted to point out one of my favorite Vim options. Have you ever been working in a Git repository and run a git status, only to encounter a series of swap files in the output? How about having an automated deploy refuse to run because it found an unstaged file in the working directory (you guessed it; a Vim swap file)? In a response to this annoyance, I've had colleagues recommend disabling Vim's swap file feature entirely! I'd like to propose an alternative: my friend, the directory option.

Read More…
Posted on 2014-06-04