View
4.211
Download
4
Embed Size (px)
DESCRIPTION
My talk from Monki Gras 2013.
Citation preview
Cheap tricks for Startups
Lanyrd.com
Simon Willison @simonwMonki Gras, 31st January 2013
http://lanyrd.com/sccqcy
Early-stagestartup engineering
is different
What are the quickest tools to
build that provide the most value?
Cheap experimentation
FEATURE_FLAGS = { 'new_maps': 'Uses MapBox rather than Google', 'login_picker': '/signin/ page with picker', 'login_linkedin': 'Sign in with LinkedIn', # ...}
@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'): # ...
<div class="secondary"> {% flag topic_tracking %} <div class="icon-feature feature-topic"> <em class="title">Keep exploring</em> <p class="med"><a href="/topics/"> Browse and track events by topic</a></p> </div> {% flagactive topic_tracking %} BETA ONLY {% endflagactive %} {% endflag %} <!-- ... --></div>
Feature flags applyto individual users
and/or user tags, e.g.alpha, beta, lanyrd-team
“preview” tag controls flags available on private
preview.lanyrd.com(for testing logged-out
features)
Feature flags help keep trunk deployable
Cheap deployment
$ fab e:live deploy
$ fab e:staging target:feature/linkedin deploy
Deployment should be...
EasyFastCheap
Everyone deployson their first day!
Read only mode
MySQLon EC2
PostgreSQLon SoftLayer
with no downtime
http://lanyrd.com/blog/2012/lanyrds-big-move/
Cheap analytics
The History table
Internal metrics
• created_at field on EVERY table, no exceptions
• Makes building graphs of site growth trivial
• updated_at useful but not essential
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
Cheap tricksFeature flagsRead only modeHistory tableDaily calculated reports
http://lanyrd.com/sccqcy