36
Software Engineering in Startups @dusano TSstartup, 2012-10-23

Software Engineering in Startups

Embed Size (px)

DESCRIPTION

Slides from a workshop on Software Engineering in Startups that Dušan Omerčević gave for the first generation of TSstartups in October 2012.

Citation preview

Page 1: Software Engineering in Startups

Software Engineering in Startups

@dusanoTSstartup, 2012-10-23

Page 2: Software Engineering in Startups

mag. Dušan Omerčević, UDI RIVP of Engineering @zemanta

@dusanodusan.omercevic@zemanta.comrestreaming.wordpress.comlinkedin.com/in/dusanomercevicgithub.com/dusanoskram.si

Page 3: Software Engineering in Startups

Outline

• 15:10 – 16:00 Engineering in Startups• 16:10 – 17:00 Tools• 17:10 – 18:00 Technology• 18:10 – 19:00 Growing Systems• 19:00 - Beer(hunt)

Page 4: Software Engineering in Startups

Engineering in Startups

Page 5: Software Engineering in Startups

Build the right productvs.

build the product right?

Page 6: Software Engineering in Startups

Product Discovery

Page 7: Software Engineering in Startups

Google's Way

Source: http://www.quietaction.com/blog/inspired-d3-talk-tom-chi.html

Page 8: Software Engineering in Startups

Source: http://bradfrostweb.com/blog/web/for-a-future-friendly-web/

Page 9: Software Engineering in Startups

Great Companies build Great Products

Page 10: Software Engineering in Startups

CourageRespect

CommunicationCommitment

Focus

Page 11: Software Engineering in Startups

Yishan's WayYishan Wong, CEO of Reddit, Director of Engineering at

Facebook, Senior Engineering Manager at PayPal(http://algeri-wong.com/yishan/engineering-management.html)

1. Make hiring your number one priority, always!

2. Let process be implemented by those who practice it

3. Promotion from within4. Tools are top priority5. Technical Leaders

Page 12: Software Engineering in Startups

PM 101

1. Product Owner & Product Backlog2. Retrospectives3. Team & Scrum master4. Daily stand-up meeting & Demos

5. Iterations (Scrum & XP) or limited work-in-progress (Kanban)

Page 13: Software Engineering in Startups

Tools

Page 14: Software Engineering in Startups

Collaboration Tools

• In person meetings & Whiteboard

Page 15: Software Engineering in Startups

Collaboration Tools #2

• Trello

• Google Apps

Page 16: Software Engineering in Startups

Collaboration Tools #3

• IRC

• Blog!

Page 17: Software Engineering in Startups

Collaboration Tools #4

• Code style guidelines• Git• Code reviews– see Code reviews at Khan for guidelines

Page 18: Software Engineering in Startups

Continuous Deployment

• Make Deployment a non-event• If something is painfull, do it more often until

the pain goes away!• Ideal: the new employee should be able to

deploy on the first day!• Prerequisite: Unittests & TDD• Dark releases, Blue-green deployment, Canary

releasing

Page 19: Software Engineering in Startups

Technology

Page 20: Software Engineering in Startups

VC warning!The core business of startups is

searching for a repeatable and scalable business model and not playing with

(unreliable) technology!

Page 21: Software Engineering in Startups

Operation System

There's only one!

Page 22: Software Engineering in Startups

Programming Languages

• JavaScript• Java• PHP• Python• C/C++

http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites

Page 23: Software Engineering in Startups

Measure Anything, Measure Everything

http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/

Page 24: Software Engineering in Startups

Measuring as Testing

• Unittests are only run upon deploy, not periodically

• You should have HealthChecks for all your applications, that are run upon deploy and then periodically

• Have error inducing functionality to test your error detection functionality

Page 25: Software Engineering in Startups

Storage & Data Processing

• PostgreSQL vs. MySQL• MySQL vs. Cassandra– The Immutable state of MySQL

• Hadoop/Hive• Splunk• Lucene/Solr• RabbitMQ

Page 26: Software Engineering in Startups

Storage Latencies

• Memcached: <1 ms (mainly network latency)• Cassandra: ~1 ms• Oracle for simple queries: 1-5 ms• DynamoDB: ~5 ms• SimpleDB: >10 ms

Page 27: Software Engineering in Startups

Cloud Computing

AWS: EC2 Large instance (4 EC2 compute units/virtual cores, 7.5 GB RAM memory, 850 GB storage)• On-demand: 250

euro/month• Reserved: 600 euro + 35

euro/month• Spot: 15 euro/month

HetznerQuad-Core i7-2600, 16 GB RAM, 2 x 3 TB disk: • 50 euro/month

Page 28: Software Engineering in Startups

Amazon Web Services

• Cloudfront ($0.12 / GB / month)• Elastic MapReduce• DynamoDB• S3 ($0.12 / GB / month)• Glacier ($0.01 / GB / month)• Mechanical Turk• Alexa Web Information Service

Page 29: Software Engineering in Startups

Growing Systems

Page 30: Software Engineering in Startups
Page 31: Software Engineering in Startups

Estimates in Software Development

• 1 minute -> 2 hours (120x)• 1 hour -> 2 days (48x)• 1 day -> 2 weeks (14x)• 1 week -> 2 months (8x)• 1 month -> 2 years (24x)• 1 year -> forever (infinity)

Page 32: Software Engineering in Startups

Programming in Startups

• Code is Liability• Supporting Throw Away Software• Don't be afraid of the if statement!• Develop mainly in master branch• Use feature toggles

Page 33: Software Engineering in Startups

Availability

• 99% ~ 3 days• 99.9% ~ 9 hours• 99.99% ~ 1 hour• 99.999% ~ 5 minutesof downtime/year!

Optimize also for MTTR not just MTBF!

Page 34: Software Engineering in Startups

Unittests

• A Unittest should take at most 10ms to Run• 1054 unittests covering Zemanta's code• Create mock-ups! Don't do integration testing

with unittests!

Page 35: Software Engineering in Startups

Principles of Software Documentation

1. Source code and running services are the ultimate documentation!

2. No documentation is much much better than misleading/outdated documentation!

3. Out of sight, out of mind! Documentation should be close to the source code and the running services!

4. Document only what’s absolutely necessary (data structures, development environment setup, release and deployment procedures)

5. Documentation should be part of company culture and engineering pride!

Page 36: Software Engineering in Startups

Take Home Message

• The core business of startups is searching for a repeatable and scalable business model, not technology!

• Measure Anything, Measure Everything• Do Code Reviews!• Be stupid!