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

Bootstrap Your Project!

Bootstrap Your Project!

Thorsten Rinne

June 03, 2013
Tweet

More Decks by Thorsten Rinne

Other Decks in Technology

Transcript

  1. BOOTSTRAP
    YOUR PROJECT!
    International PHP Conference 2013
    Spring Edition

    View full-size slide

  2. THORSTEN
    RINNE
    ‣ Diplom-Informatiker (FH)
    ‣ Senior Developer
    ‣ Scrum Master
    ‣ Yatego GmbH
    ‣ Open Source: phpMyFAQ
    ‣ @ThorstenRinne

    View full-size slide

  3. Define the vision of the
    project!

    View full-size slide

  4. Start with a small team!

    View full-size slide

  5. We don´t need code monkeys.

    View full-size slide

  6. Add new developers,
    but slowly.

    View full-size slide

  7. Share the vision with the
    team.

    View full-size slide

  8. Collect all requirements.
    Start with the important ones.

    View full-size slide

  9. Order them by ROI.
    Collected all requirements?

    View full-size slide

  10. Document
    your
    tasks!

    View full-size slide

  11. Prioritize the task according
    to ROI and complexity.

    View full-size slide

  12. Look for cheap wins!

    View full-size slide

  13. INFRASTRUCTURE

    View full-size slide

  14. No Hardware. Not yet.

    View full-size slide

  15. Virtual Machines

    View full-size slide

  16. $ vagrant box add base http://files.vagrantup.com/lucid32.box
    [vagrant] Downloading with Vagrant::Downloaders::HTTP...
    [vagrant] Downloading box: http://files.vagrantup.com/lucid32.box
    [vagrant] Extracting box...
    [vagrant] Verifying box...
    [vagrant] Cleaning up downloaded box...
    $
    Vagrant

    View full-size slide

  17. $ vagrant init
    A `Vagrantfile` has been placed in this directory. You are now
    ready to `vagrant up` your first virtual environment! Please read
    the comments in the Vagrantfile as well as documentation on
    `vagrantup.com` for more information on using Vagrant.
    $

    View full-size slide

  18. $ vagrant up
    [default] Importing base box 'base'...
    [default] Matching MAC address for NAT networking...
    [default] Clearing any previously set forwarded ports...
    [default] Forwarding ports...
    [default] -- 22 => 2222 (adapter 1)
    [default] Creating shared folders metadata...
    [default] Clearing any previously set network interfaces...
    [default] Booting VM...
    [default] Waiting for VM to boot. This can take a few minutes.
    [default] VM booted and ready for use!
    [default] Mounting shared folders...
    [default] -- v-root: /vagrant
    $
    And done! :-)

    View full-size slide

  19. Configuration management
    Tools with an object-orientated model

    View full-size slide

  20. sysadmin tasks are often repetive
    new users
    deploying hosts
    managing applications
    configuring daemons
    monitoring hosts
    Why Puppet?

    View full-size slide

  21. What we´re trying...
    automate different tasks with scripts but it‘s
    getting complex
    poorly documented
    customized for each environment
    rarely scale to large platforms

    View full-size slide

  22. Puppet
    Ruby based
    Apache License
    Started in 2001
    Support for
    Linux / Unix / BSD
    OS X

    View full-size slide

  23. class nginx::package {
    anchor { 'nginx::package::begin': }
    anchor { 'nginx::package::end': }
    case $::operatingsystem {
    debian,ubuntu: {
    class { 'nginx::package::debian':
    require => Anchor['nginx::package::begin'],
    before => Anchor['nginx::package::end'],
    }
    }
    opensuse,suse: {
    class { 'nginx::package::suse':
    require => Anchor['nginx::package::begin'],
    before => Anchor['nginx::package::end'],
    }
    }
    }
    }

    View full-size slide

  24. Private
    and Public
    Clouds

    View full-size slide

  25. Why Git?
    it‘s fast because everyone has the whole history
    supports non linear development
    no single point of failure like SVN
    distributed development (office / train / beach)
    efficient handling of large projects

    View full-size slide

  26. Every feature is a branch.

    View full-size slide

  27. Use diff emails

    View full-size slide

  28. Automate as much as
    possible. Devs are lazy.

    View full-size slide

  29. Use a Wiki.
    And keep it up to date!

    View full-size slide

  30. You have to be replaceable.
    Document that way.

    View full-size slide

  31. Use a tracking software.

    View full-size slide

  32. Use Frameworks.
    For frontend. For backend.

    View full-size slide

  33. Use proven frameworks

    View full-size slide

  34. Use the Community

    View full-size slide

  35. Check Google hits
    for technology X

    View full-size slide

  36. Check Google hits
    for technology X

    View full-size slide

  37. Check Google hits
    for technology X

    View full-size slide

  38. Check GitHub project stats

    View full-size slide

  39. $ composer update
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Nothing to install or update
    Writing lock file
    Generating autoload files

    View full-size slide

  40. Bower
    $ bower install jquery
    bower cloning git://github.com/components/jquery.git
    bower caching git://github.com/components/jquery.git
    bower fetching jquery
    bower checking out jquery#2.0.1
    bower copying /Users/thorsten/.bower/cache/jquery/
    29cb4373d29144ca260ac7c3997f4381
    bower installing jquery#2.0.1

    View full-size slide

  41. Donald Knuth:
    „Premature
    optimization is
    the root of all
    evil.“

    View full-size slide

  42. Test Driven Development

    View full-size slide

  43. The „Cancel“ button?
    Not tested yet! :-(

    View full-size slide

  44. Unittests for all the important
    base classes.

    View full-size slide

  45. Automate your testing.

    View full-size slide

  46. Automated API testing.

    View full-size slide

  47. No Selenium tests at the
    beginning. Too expensive.

    View full-size slide

  48. Continuous Integration
    Coding Style
    PMD (Project Mess Detection)
    LOC (Lines of Code)
    CPD (Copy&Paste Detection)

    View full-size slide

  49. MANY, SHORT MEETINGS

    View full-size slide

  50. Iterative approach

    View full-size slide

  51. 2 week sprints
    14 days

    View full-size slide

  52. XP
    Communication

    View full-size slide

  53. XP
    Communication
    Simplicity

    View full-size slide

  54. XP
    Communication
    Simplicity
    Respect

    View full-size slide

  55. XP
    Communication
    Simplicity
    Feedback
    Respect

    View full-size slide

  56. XP
    Communication
    Simplicity
    Feedback
    Courage
    Respect

    View full-size slide

  57. XP feedback loops
    Release Plan
    Iteration Plan
    Acceptence Test
    Daily Standup
    Pair Negotiation
    Unit Test
    Pair Programming
    Code
    months
    weeks
    days
    day
    hours
    minutes
    seconds

    View full-size slide

  58. Daily Standup

    View full-size slide

  59. ⇥ Timeboxing ⇤

    View full-size slide

  60. Prepare yourself for
    meetings!

    View full-size slide

  61. Do retrospectives!

    View full-size slide

  62. Learn from them!

    View full-size slide

  63. Pair programming improves
    the team knowledge.

    View full-size slide

  64. Pair programming reduces
    the question overhead

    View full-size slide

  65. Do end-user tests as early
    as possible.

    View full-size slide

  66. Rapid feedback:
    Controls the development.

    View full-size slide

  67. DO NOT CHANGE
    EVERYTHING.

    View full-size slide

  68. DO NOT CHANGE
    EVERYTHING.

    View full-size slide

  69. DO NOT CHANGE
    EVERYTHING.

    View full-size slide

  70. Fight the
    „second system syndrome“

    View full-size slide

  71. Use old, reusable code

    View full-size slide

  72. Use mature libraries.

    View full-size slide

  73. Continuous
    Refactoring

    View full-size slide

  74. Monitoring
    statsd / graphite
    „Measure Anything, Measure Everything“
    Etsy

    View full-size slide

  75. Have fun at work.

    View full-size slide

  76. „Stay hungry, stay foolish!“
    Steve Jobs, 2005

    View full-size slide

  77. Questions?
    Comments?

    View full-size slide

  78. Thanks for your attention!
    Twitter: @ThorstenRinne
    App.net: https://app.net/thorsten
    Slides: https://speakerdeck.com/thorsten
    Thorsten Rinne
    Yatego GmbH
    [email protected]

    View full-size slide