barinek.com: the official website

Below you'll find a quick stream of consciousness that includes photos, quotes, code snippets, and possibly even a full post. enjoy!

Startup Recipe

If you’re thinking about starting a software project, here’s the recipe that I’ve been giving people.

## Have complete visibility into your feature backlog

(i.e. what is happening with your software)

Use a tool like Pivotal Tracker. Have 1 week iterations. Include features, chores, and bugs. Assign points to features. Work should be getting done (i.e. stories should be marked as finished, and you should have a weekly point total). If work isn’t getting done (i.e. point count is low for an iteration), this is a ‘smell’, something might be going wrong. Regularly review and accept the work the developers are doing.

## Outsource your infrastructure

* Sign up for an account on GitHub
* Sign up for an account on Heroku, Engine Yard, or Amazon.
* Use Gmail, GoogleApps

## Own your source code

Use git. Own your github account and give collaborator access to developers. Developers may move on or off the project, but you’ll always have access to the code base.

## Plan for multiple Environments

You should plan for 3 environments, Continuous Integration (CI), Review, and Production. You’ll accept stories in the review environment and push tagged releases to production.

## Keep a high Bus Count

Rotate developers through your application feature set. Avoid siloing developers at all costs, “code with a buddy”. Give complete infrastructure access to your developers (DNS, Google Apps/Email, and infrastructure), trust them completely.

## Write tests and setup a continuous integration environment

Tests are essential for describing application features and intentions within the code base. Tests are essential for knowledge transfer between developers (it’s unlikely that you’ll have the same developer on the project at all times). Tests give you the confidence to change product direction without breaking or rewriting the entire code base. Without tests, you should quit now. (This is especially true for interpreted languages like ruby). Test drive.

## Keep the deployment process nimble

Because you are test driving and have continuous integration, you can deploy at any time. Give your hosting credentials (engine yard, amazon, etc.) to your developers. They should be able to deploy to review or production within minutes (not hours).

## Invest in your team

Don’t let bad technology choices effect your startup, there are plenty of risks out there. Find a platform and team that will guarantee minimal technical risk. There’s a huge difference developer skill sets theses days. Find a great team and pay them well. Good software is expensive, build and invest in your development team. Expect this to be your budget and hire generalists.

Pivotal at New Tech Boulder

Pivotal at New Tech Boulder

back in the day…

simple comet client

Here’s a simple comet client that I’ve been using to test www.localhash.com

gnip classic sauce

Here’s a snippet of Gnip Classic Java. Sometime in 2009 we were filtering 150,000,000 activities per day, almost 2000 per second, all flowing through the below method.

‘87 land cruiser

‘87 land cruiser

farrar and gibbard

farrar and gibbard

pubsubhubbub-rb

Just open sourced a project on GitHub…

pubsubhubbub-rb

The project is a Ruby port of Google’s PubSubHubbub reference implementation.

http://code.google.com/p/pubsubhubbub/

localhash

Working on LocalHash - a basic example of location based webhooks using the geohash algorithm and is possibly a PubSubHubbub extension candidate. The API was implemented using Sinatra, Redis, Thin, and Nginx.

http://www.localhash.com

Gnip Classic

Gnip Classic

ActiveRecord MySQL Partitions

Check out the below example of how to create partitioned MySQL tables within a Rails Migration. We’ve had a handful of tables that we continually want to partition and a team member wrote the below.

Here’s the migration snippet

class AddResultsTable < ActiveRecord::Migration
  def self.up
    create_partitioned_table :results do |t|

The below creates a results table partitioned by day. The example migration defaults to 4 days back and 4 days forward. We then have a few scripts to manage our partitioned tables.

Here’s the rails source