Slide 1

Slide 1 text

Cheap tricks for Startups Lanyrd.com Simon Willison @simonw Monki Gras, 31st January 2013 http://lanyrd.com/sccqcy

Slide 2

Slide 2 text

Early-stage startup engineering is different

Slide 3

Slide 3 text

What are the quickest tools to build that provide the most value?

Slide 4

Slide 4 text

Cheap experimentation

Slide 5

Slide 5 text

FEATURE_FLAGS = { 'new_maps': 'Uses MapBox rather than Google', 'login_picker': '/signin/ page with picker', 'login_linkedin': 'Sign in with LinkedIn', # ... }

Slide 6

Slide 6 text

@login_required @flag_required('topic_tracking') def topic_track(request, slug): topic = get_object_or_404(Topic, slug=slug) # ... if user.has_flag('topic_enhancements'): # ...

Slide 7

Slide 7 text

{% flag topic_tracking %} {% flagactive topic_tracking %} BETA ONLY {% endflagactive %} {% endflag %}

Slide 8

Slide 8 text

Feature flags apply to individual users and/or user tags, e.g. alpha, beta, lanyrd-team

Slide 9

Slide 9 text

“preview” tag controls flags available on private preview.lanyrd.com (for testing logged-out features)

Slide 10

Slide 10 text

Feature flags help keep trunk deployable

Slide 11

Slide 11 text

Cheap deployment

Slide 12

Slide 12 text

$ fab e:live deploy $ fab e:staging target:feature/linkedin deploy

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Deployment should be... Easy Fast Cheap

Slide 16

Slide 16 text

Everyone deploys on their first day!

Slide 17

Slide 17 text

Read only mode

Slide 18

Slide 18 text

MySQL on EC2 PostgreSQL on SoftLayer with no downtime http://lanyrd.com/blog/2012/lanyrds-big-move/

Slide 19

Slide 19 text

Cheap analytics

Slide 20

Slide 20 text

The History table

Slide 21

Slide 21 text

Internal metrics • created_at field on EVERY table, no exceptions • Makes building graphs of site growth trivial • updated_at useful but not essential

Slide 22

Slide 22 text

Our report system • Reports are arbitrary calculations • Run daily by cron • Backfill available on date-field based reports • Points are stored in the database • Site can graph any report • We can export any report to a spreadsheet

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Cheap tricks Feature flags Read only mode History table Daily calculated reports http://lanyrd.com/sccqcy

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content