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

Discuss.Plan.Code.Review.Test.

 Discuss.Plan.Code.Review.Test.

Introduction to the software development platform Phabricator and how we use it dkd Internet Service GmbH.

Peter Foerger

July 14, 2017
Tweet

More Decks by Peter Foerger

Other Decks in Technology

Transcript

  1. 2

  2. agenda • what’s that thing called Phabricator • on code

    reviews and tracking • Phabricator applications 3
  3. introduction • started as Diffcamp at Facebook • open source

    • written in PHP • users: Dropbox, Asana, Quora, Uber, … • supports Git, Mercurial, SVN for SCM • for developers from developers • moderate plugin system • use as many or as few Phabricator services as you like • supports: issue tracking, scrum boards, source auditing, code review, more! 7
  4. under the hood • depends on 3 packages • libphutil

    • phabricator • arcanist
 • source • https://github.com/phacility 8
  5. > 60 databases $ /core/lib/phabricator/bin/storage databases secure_audit secure_calendar secure_chatlog secure_conduit

    secure_countdown secure_daemon secure_differential secure_draft secure_drydock secure_feed ...<dozens more databases>... 9
  6. so, what exactly is a code review questions • are

    there any obvious logic errors in the code? • looking at the requirements, are all cases fully implemented? • are the new automated tests sufficient for the new code? • do existing automated tests need to be rewritten? • does the new code conform to existing style guidelines? 11
  7. pros • code reviews share knowledge • code reviews make

    for better estimates • code reviews mentor newer engineers • code reviews should happen across the team in every direction 12
  8. 13 »But code reviews take time!« Sure, they take time.

    But that time isn't wasted–far from it.
  9. in practise • share the load • review before merging

    • use peer pressure to your advantage 15
  10. everyone • accept that many programming decisions are opinions. Discuss

    tradeoffs. • Ask good questions; don't make demands. • Ask for clarification. ("I didn't understand. Can you clarify?") • Avoid selective ownership of code. ("mine", "not mine", "yours") • Avoid using terms like ("dumb", “stupid"). • Be explicit. Remember people don't always understand your intentions online. • Be humble. ("I'm not sure - let's look it up.”) • Don't use sarcasm. • Keep it real. If emoji, animated gifs, or humor aren't you, don't force them. 18
  11. having your code reviewed • be grateful for suggestions. ("Good

    call. I'll make that change.") • if a review seems aggressive or angry or otherwise personal, consider if it is intended to be read that way and ask the person for clarification of intent • explain why the code exists. • extract some changes and refactorings into future tickets/stories. • link to the code review from the ticket/story. • seek to understand the reviewer's perspective. • try to respond to every comment. 20
  12. having your code reviewed • understand why the change is

    necessary • communicate which ideas you feel strongly about and those you don't. • identify ways to simplify the code while still solving the problem. • offer alternative implementations, but assume the author already considered them. ("What do you think about using a custom validator here?") • seek to understand the author's perspective. • sign off on the pull request with a or "Ready to merge" comment. 22
  13. Phabricator applications • Differential: code reviews • Diffusion: browse repository

    • Maniphest: tasks and bugs • Herald: notifications • Conduit: API • Arcanist: command line interface • Owners, Calendar, Wiki, Blog, lots more 24