Pro Yearly is on sale from $80 to $50! »

How GitHub Uses GitHub to Build GitHub

78b475797a14c84799063c7cd073962f?s=47 Zach Holman
September 21, 2011

How GitHub Uses GitHub to Build GitHub

Build features fast. Ship them. That's what we try to do at GitHub. Our process is the anti-process: what's the minimum overhead we can put up with to keep our code quality high, all while building features *as quickly as possible*? It's not just features, either: faster development means happier developers.

78b475797a14c84799063c7cd073962f?s=128

Zach Holman

September 21, 2011
Tweet

Transcript

  1. github how uses to build zach holman

  2. github how uses to build x

  3. github how uses to build github github

  4. how uses to build github

  5. how uses to build github

  6. how uses to build github your company your product

  7. @holman

  8. None
  9. we work asynchronously

  10. WORKING ASYNCHRONOUSLY: YOU CAN DO SHIT WITHOUT NEEDING TO PULL

    ME OUT OF THE ZONE™. NO MEETINGS • NO DEADLINES • NO MANAGERS
  11. CHATROOMS NO PRESENCE NEEDED LOG ALL THE THINGS EVERYONE ON

    THE SAME PAGE TIME FLEXIBILITY WORK WHEN YOU WANT TO WORK
  12. HOW GITHUB WORKS zachholman.com/posts/how-github-works

  13. PULL REQUESTS + BRANCHING ISSUES OAUTH AS IDENTITY HOOKS &

    HUBOT SECRETS OKAY LET’S TALK ABOUT
  14. + pull requests branching

  15. Y’all got some weird branches.

  16. master deploy-62 deploy-63 deploy-63b deploy- ?

  17. REPOSITORY TRUSTED DEVELOPERS FORK FORK FORK SHITTY DEVELOPERS ʘ‿ʘ ಠ_ಠ

  18. Keep your branches simple.

  19. How GitHub does branching:

  20. MASTER BRANCH

  21. Everyone can push, everyone can deploy.

  22. Frees up your time from micromanaging someone else’s code.

  23. Master is always deployable.

  24. Master is always deployable. We deploy 10-40 times a day.

  25. If you’re nervous, deploy to staging. Or deploy a branch.

    Or deploy to a subset of our production boxes. TWITTER-DRIVEN DEVELOPMENT CHECK TWITTER, SEE IF YOU BONED A DEPLOY
  26. Keep your branches simple.

  27. What about code quality? ಠ_ಠ

  28. REQUESTS PULL OOH! FUTURISTIC!

  29. Pull Requests are our code review.

  30. DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS

    DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS WHATPULL REQUESTS? ARE
  31. A PULL REQUEST IS A DISCUSSION CODE DISCUSSION FEATURE DISCUSSION

    STRATEGY DISCUSSION
  32. CODE DISCUSSION FEATURE DISCUSSION STRATEGY DISCUSSION

  33. REFERENCE ISSUES REVIEW CODE DIFFS WRITE CODE COMMENTS CODE DISCUSSION

    FEATURE DISCUSSION STRATEGY DISCUSSION
  34. REFERENCE ISSUES REVIEW CODE DIFFS WRITE CODE COMMENTS CODE DISCUSSION

    FEATURE DISCUSSION STRATEGY DISCUSSION ALL ON A BRANCH
  35. None
  36. TITLE OF THE PULL REQUEST DESCRIPTION COMMIT COMMIT COMMIT COMMIT

    COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
  37. talk about changes show all commits show specific code changes

  38. MASTER BRANCH

  39. MASTER BRANCH PULL REQUEST

  40. BIG SECRET #1 PULL REQUESTS: YOU DON’T NEED TO FORK

    ANYTHING.
  41. WHY PULL REQUESTS ARE RAD: REASONS 4

  42. WHY PULL REQUESTS ARE RAD: ASYNCHRONOUS No meetings.

  43. WHY PULL REQUESTS ARE RAD: NOTIFICATIONS Email is your interface.

  44. WHY PULL REQUESTS ARE RAD: ACCESSIBLE Designers can evolve mockups

    and entire workflows. Non-technical staff can add their two cents.
  45. WHY PULL REQUESTS ARE RAD: HISTORICAL Pull Requests can be

    experiments. Try something out, throw it away, retain a history.
  46. GitHub’s Pull Requests

  47. Realtime™ status.github.com real-time polling git (ssh): true git (http): true

    git (git://): true downloads: true pages: true svn: true SUDDENLY, a design
  48. Realtime™ status.github.com real-time polling POST SCREENSHOTS MIX YOUR DESIGNERS +

    DEVELOPERS (AND .GIFs!)
  49. CodeMirror syntax highlighting as you type

  50. CodeMirror syntax highlighting as you type PULL REQUESTS ARE CHEAP

    AS HELL DON’T BE AFRAID TO TOSS IT ALL AWAY
  51. Don’t be afraid to try to (gently) break GitHub. 8

    months, couple hundred commits, dozens of mockups {
  52. Pull Requests are about getting shit done without wasting a

    lot of time.
  53. Can your workflow be improved? Do you really need all

    that process?
  54. USE PULL REQUESTS MORE SPEND LESS TIME AVOIDING SHIPPING PULL

    REQUEST RECAP
  55. issues we have

  56. priorities estimates rich media things deadlines redundant wat more priorities

    just trolling us now where am i anyway
  57. None
  58. Can you survive on tools? SIMPLER

  59. Can you work faster on tools? SIMPLER

  60. Can you work better on tools? SIMPLER

  61. Merlin Mann @hotdogsladies on email priorities :

  62. A priority is observed, not manufactured or assigned. Otherwise, it's

    necessarily not a priority. “
  63. Making something a BIG RED TOP TOP BIG HIGHEST #1

    PRIORITY changes nothing but text styling. If it were really important, it'd already be done. Period. “
  64. PRIORITIES DEADLINES ASSIGNEES ESTIMATES

  65. Resist adding meta-work. It gets in the way of doing

    real work. (The real work will get done anyway.)
  66. 3We use Issues for three things.

  67. shit, something is broken

  68. hey, this could be cool

  69. todo lists

  70. Do you need more than that? Think about it. Most

    of the time, you don’t.
  71. MEANS MORE TIME BUILDING YOUR PRODUCT ISSUES RECAP SIMPLE TOOLS

  72. oauthas identity

  73. RUBY IS SO FAST FUCK I LOVE IT SO MUCH

  74. ~/Development/SECRETARYOFLABOR self-referential symlink `what` single LABOR.RB web app was super

    hammered when I wrote this ~/Development/unmarked_van an app that stalks people’s locations ~/Development/trace real-time stats graphing
  75. continuous integration internal app distribution collectd graphs internal talk videos

    30 INTERNAL APPS arbitrary data store internal twitter ios licensing + provisioning haystack exceptions
  76. Outsiders are not welcome.

  77. GitHub as Authentication TEAMS, ORGANIZATIONS, AND USERS

  78. GitHub as Authentication USE OAUTH TO AUTHENTICATE USERS

  79. None
  80. github.com/atmos/sinatra_auth_github github_organization_access?('github') # => true

  81. GitHub as Authentication SECURITY • CONSISTENCY • COOLICTY

  82. DON’T REINVENT THE WHEEL YOUR AUTHENTICATION CAN BE FREE OAUTH

    RECAP
  83. hooks &hubot

  84. HUBOT OUR FRIENDLY CAMPFIRE BOT

  85. OVER 300 COMMANDS, LIKE... • deploy every GitHub app •

    run branch-level tests • play music in the office • tell us who is in the office • dynamically build usage graphs • send and receive text messages • mustache every image posted in chat • track who swears each day • rank by twitter followers • ...and way, way more
  86. github.com/github/hubot Hubot is not open source. LOL JK

  87. bots — github: know your branch status hubot what hasn’t

    been deployed? Zach Hubot Zach: Here's what hasn't been deployed on master yet: https://github.com/github/github/compare/{sha}...master
  88. bots — github: know your branch status hubot what hasn’t

    been deployed on issues2? Zach Hubot Zach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2
  89. bots — github: know your branch status hubot what hasn’t

    been deployed on issues2? Zach Hubot Zach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2
  90. bots — github: know your branch status hubot what hasn’t

    been deployed on issues2? Zach Hubot Zach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2
  91. https://github.com/site/sha bots — github: know your branch status #=> 2c8c2e9932d0caceecd3ed8ee2adcda0ece3e564

  92. bots — github: using the API hubot what are the

    pulls on holman/boom? Zach Hubot HTTParty should only be a soft dependency (master...jimmycuadra:soft-dependency) by jimmycuadra https://github.com/holman/boom/pull/46 boom roulette (master...culvr:master) by culvr https://github.com/holman/boom/pull/43
  93. bots — github: using the API hubot how many issues

    did we close today for github/github? Zach Hubot 13 issues closed on github/github in the past 24 hours.
  94. bots — github What does your company do over and

    over again? Can you automate that?
  95. HUBOT RECAP HUBOT KNOWS WHERE YOU LIVE DO NOT TRUST

    HIM
  96. secrets everyone has

  97. WE TUCK STUFF AWAY SOMETIMES. OOPS.

  98. EMOJI :heart: WORDS ARE FOR ACADEMICS, BRO :+1: :shipit: http://git.io/dmWZWg

    ...and so much more:
  99. SHORTCUTS QUIT MAKING ME DO THINGS ALL SLOW-LIKE w t

    ?
  100. IMAGES EVERYTHING IS BETTER WITH PIXELS ![title](url)

  101. DIFF+PATCH GOD I HATE PIXELS JUST GIVE ME TEXT .diff

    + .patch after most URLs
  102. require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html FENCED CODE

    IT’S LIKE CODE BUT WITH MORE FENCES
  103. ```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html ```

    FENCED CODE IT’S LIKE CODE BUT WITH MORE FENCES
  104. FENCED CODE IT’S LIKE CODE BUT WITH MORE FENCES require

    'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html
  105. MENTIONS GET SOMEONE ELSE TO DO YOUR WORK @username pull

    requests issues commits
  106. WHITESPACE IT SUCKS add ?w=1 to URLs

  107. REPO REFERENCES AROUND THE REPO, AROUND THE REPO, AROUND user/repo#issue

  108. GIT.IO OFFICIAL LAUNCH ANNOUNCEMENT https://github.com/holman/really- fucking-long-url-wtf-is-u-doing git.io/url

  109. GIT.IO OFFICIAL LAUNCH ANNOUNCEMENT http://git.io/nxVVig curl -i http://git.io -F 'url=#{url}'

    #{code}
  110. TOOLS + PROCESS = PRODUCT SIMPLE BETTER AWESOME THE BIG

    RECAP
  111. thanks!

  112. zach holman zachholman.com/talks @holman twitter+github: