Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cheap tricks for startups

Cheap tricks for startups

My talk from Monki Gras 2013 -

E172168287724cd3051588354ded616b?s=128

Simon Willison

January 31, 2013
Tweet

Transcript

  1. Cheap tricks for Startups Lanyrd.com Simon Willison @simonw Monki Gras,

    31st January 2013 http://lanyrd.com/sccqcy
  2. Early-stage startup engineering is different

  3. What are the quickest tools to build that provide the

    most value?
  4. Cheap experimentation

  5. FEATURE_FLAGS = { 'new_maps': 'Uses MapBox rather than Google', 'login_picker':

    '/signin/ page with picker', 'login_linkedin': 'Sign in with LinkedIn', # ... }
  6. @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'): # ...
  7. <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&nbsp;topic</a></p> </div> {% flagactive topic_tracking %} BETA ONLY {% endflagactive %} {% endflag %} <!-- ... --> </div>
  8. Feature flags apply to individual users and/or user tags, e.g.

    alpha, beta, lanyrd-team
  9. “preview” tag controls flags available on private preview.lanyrd.com (for testing

    logged-out features)
  10. Feature flags help keep trunk deployable

  11. Cheap deployment

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

  13. None
  14. None
  15. Deployment should be... Easy Fast Cheap

  16. Everyone deploys on their first day!

  17. Read only mode

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

  19. Cheap analytics

  20. The History table

  21. Internal metrics • created_at field on EVERY table, no exceptions

    • Makes building graphs of site growth trivial • updated_at useful but not essential
  22. 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
  23. None
  24. Cheap tricks Feature flags Read only mode History table Daily

    calculated reports http://lanyrd.com/sccqcy
  25. None
  26. None