Random thoughts and dev practices / advices to build a great product

Post on 18-Jun-2015

102 views 0 download

Tags:

description

Little talk I gave @The Family in september 2014 about some experience sharing on how to bootstrap / build pragmatically its startup product.

Transcript of Random thoughts and dev practices / advices to build a great product

Random thoughts and dev practices / advices to build a great product

The Family - 09/09/14

Language, framework, librariesHow to make a good reasonable choice

Choose your language

3

• All languages out there have their own advantages and drawbacks

• They are fairly equivalent and all gives you the sufficient tools to build your app

• Maybe just try to choose an open source language

Chose and use the language you are the most comfortable with.

Choose your framework

4

• Not choosing an existing framework leads to create and maintain your own custom one

• There are a lot of good frameworks out there: Backend: Symfony2, RoR, Django, Express.. Frontend: Ember.js, Angular.js, React, Backbone..

• Choosing a framework will make you code less non-business centric code and rely on an existing community for quality, efficiency and velocity for that.

You might choose one

Choose your libraries

5

• Before coding anything, search if someone did not already faced your problem and came with an open source library doing the job

• Look for contributors, recent activity, known limitations and bugs

• Look for a test suite • Contribute!

Don’t reinvent the wheel

Use the right toolsThey will ease your life and increase both your productivity

and quality

Use the right tools

7

• Even alone in a project, more importantly if you are many, use a versioning tool.

• Git, SVN, Mercurial… but cool kids use Git! • Couple it with collaborative apps (Github) • Fork, branch, merge, rebase, push, amend.. use

and abuse git features!

Use a versioning tool (for example, GIT)

Use the right tools

8

• Test all your projects • Use effective and quick command-line unit test

suites (PHPUnit, Qunit,..) • Use BDD tools (Behat, Cucumber,..) • Use continuous integration solutions (Travis,

Shippable, CodeShip…) • Use code coverage tools (but don’t abuse)

Use testing tools & platforms

Use the right tools

9

• Log everything (Logstash, Kibana, Loggly,..) • Monitor your app (Nagios, New Relic, Munin..) • Log your product features (Mixpanel) • Log your users (Intercom) • Log your uptime (Pingdom)

Use tools to monitor and log

Test your applicationSave your time, increase your quality

Test your application

11

• Tests fix a behavior / function api and ensure nobody breaks it without noticing in the future

• Tests allows you to break things without fear when you refactor

• Test might allow you to code faster!

Tests are great

Test your application

12

• UT are very simple to write, very fast to execute

• Your more complex and critical parts must be unit tested

• Run occasionally some coverage to see what your tests are really testing. 100% coverage is a lure and the best way to loose time!

Use unit testing (UT)

Test your application

13

• Acceptance tests are hard to write but great to ensure your app is working and your unit tested modules are doing great together

• End-to-end acceptance tests are longer to be run, so don’t overdo them and focus on the most important ones (test only critical paths and end user success responses)

Use behavioral and acceptance tests

Be agile, have some processesScrum, Kanban, and other agile

methodologies..

Be agile, have some processes

15

• Try to forecast the most accurately possible your upcoming development week (or upcoming two weeks)

• Try to create minimal code tasks with only one concern, and estimate delays

• A task is not completed until unit tested and human tested / accepted

• Talk. Every day. With other developers in your team. Even with your partners or non tech people. Explaining your problems helps you to order things in your mind!

A well coded application needs some development rigor

Be agile, have some processes

16

• You might use Scrum from the books, scrum adapted to your own need, Kanban, other development agile frameworks…

.. the most important thing is to be able to estimate delays and

plan accordingly to be able to make good code while shipping

fast!

Startup 101 business oriented dev™You’re building your startup app. Ship fast. Iterate fast

Startup 101 business oriented dev™

18

• Wrap almost everything in classes, methods, providers, factories, adapters.. All your codebase must be micro-services working all together

• That means that if you pivot quite often, you’ll “just” have to refactor some services and assemble them differently

Write modular decoupled code

Startup 101 business oriented dev™

19

• Do not implement early caching • Do not implement early complex stack • Do not over factorize • Write fast easy to understand and easy to

modify code to ship new features and new improvements

Do not overcomplicate things

Startup 101 business oriented dev™

20

• Write efficient UT & functional tests • No more than 60% coverage, only critical parts

and critical user paths • Watch your logs • Watch your application performances • Refacto only if business needed

Monitor & test your code

Thank you!@guillaumepotier