Github github-github

Post on 07-May-2015

2.191 views 2 download

Transcript of Github github-github

githubhowuses

to build zach holman

githubhowuses

to build x

githubhowuses

to buildgithubgithub

howuses

to buildgithub

howuses

to buildgithub

howuses

to buildgithubyour company

your product

@holman

we workasynchronously

WORKING ASYNCHRONOUSLY:YOU CAN DO SHIT WITHOUT NEEDING TO PULL ME OUT OF THE ZONE™.

NO MEETINGS • NO DEADLINES • NO MANAGERS

CHATROOMSNO PRESENCE NEEDED

LOG ALL THE THINGSEVERYONE ON THE SAME PAGE

TIME FLEXIBILITYWORK WHEN YOU WANT TO WORK

HOW GITHUB WORKSzachholman.com/posts/how-github-works

PULL REQUESTS + BRANCHING ISSUES

OAUTH AS IDENTITYHOOKS & HUBOT

SECRETS

OKAY LET’S TALK ABOUT

+pull requestsbranching

Y’all got some weird branches.

master

deploy-62

deploy-63

deploy-63b

deploy-64?

REPOSITORY

TRUSTEDDEVELOPERS

FORK FORK FORK

SHITTYDEVELOPERS

ʘ‿ʘ ಠ_ಠ

Keep your branches simple.

How GitHub does branching:

MASTER

BRANCH

Everyone can push, everyone can deploy.

Frees up your time frommicromanaging someone else’s code.

Master is always deployable.

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

If you’re nervous, deploy to staging.Or deploy a branch. Or deploy to a subsetof our production boxes.

TWITTER-DRIVEN DEVELOPMENTCHECK TWITTER, SEE IF YOU BONED A DEPLOY

Keep your branches simple.

What about code quality?

ಠ_ಠ

REQUESTSPULL

OOH! FUTURISTIC!

Pull Requests are our code review.

DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS

DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUSSIONS

WHATPULL REQUESTS?ARE

A PULL REQUEST IS A DISCUSSION

CODE DISCUSSIONFEATURE DISCUSSION

STRATEGY DISCUSSION

CODE DISCUSSIONFEATURE DISCUSSION

STRATEGY DISCUSSION

REFERENCE ISSUESREVIEW CODE DIFFSWRITE CODE COMMENTS

CODE DISCUSSIONFEATURE DISCUSSION

STRATEGY DISCUSSION

REFERENCE ISSUESREVIEW CODE DIFFSWRITE CODE COMMENTS

CODE DISCUSSIONFEATURE DISCUSSION

STRATEGY DISCUSSION

ALL ON A BRANCH

TITLE OF THE PULL REQUEST

D E S C R I P T I O NCOMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMITCOMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMITCOMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMITCOMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT

DISCUSS DISCUSS DISCUSS DISCUSS DISCUSSDISCUSS DISCUSS DISCUSS DISCUSS DISCUSS

COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT

talk about changes

show all commits

show specific code changes

MASTER

BRANCH

MASTER

BRANCH

PULL REQUEST

BIG SECRET #1PULL REQUESTS:YOU DON’T NEEDTO FORK ANYTHING.

WHY PULL REQUESTS ARE RAD:

REASONS4

WHY PULL REQUESTS ARE RAD: ASYNCHRONOUS

No meetings.

WHY PULL REQUESTS ARE RAD: NOTIFICATIONS

Email is your interface.

WHY PULL REQUESTS ARE RAD: ACCESSIBLE

Designers can evolve mockups and entire workflows.

Non-technical staff can add their two cents.

WHY PULL REQUESTS ARE RAD: HISTORICAL

Pull Requests can be experiments.

Try something out, throw it away, retain a history.

GitHub’s Pull Requests

Realtime™ status.github.com real-time polling

git (ssh): truegit (http): truegit (git://): truedownloads: truepages: truesvn: true

SUDDENLY,a design

Realtime™ status.github.com real-time polling

POST SCREENSHOTSMIX YOUR DESIGNERS + DEVELOPERS

(AND .GIFs!)

CodeMirror syntax highlighting as you type

CodeMirror syntax highlighting as you type

PULL REQUESTS ARE CHEAP AS HELLDON’T BE AFRAID TO TOSS IT ALL AWAY

Don’t be afraid totry to (gently) break GitHub.

8 months,couple hundred commits,dozens of mockups{

Pull Requests areabout getting shit donewithout wasting a lot of time.

Can your workflow be improved?Do you really need all that process?

USE PULL REQUESTS MORESPEND LESS TIME AVOIDING SHIPPING

PULL REQUEST RECAP

issueswe have

priorities

estimates

rich media things

deadlines

redundantwatmore priorities

just trolling us now

where am i anyway

Can you survive on

tools?SIMPLER

Can you work faster on

tools?SIMPLER

Can you work better on

tools?SIMPLER

Merlin Mann@hotdogsladieson email priorities :

A priority is observed, not manufactured or assigned.

Otherwise, it's necessarily not a priority.

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.

PRIORITIESDEADLINESASSIGNEESESTIMATES

Resist adding meta-work. It gets in the way of doing real work. (The real work will get done anyway.)

3We use Issues for three things.

shit, something is broken

hey, this could be cool

todo lists

Do you need more than that?Think about it.

Most of the time, you don’t.

MEANS MORE TIME BUILDING

YOUR PRODUCT

ISSUES RECAP

SIMPLE TOOLS

oauth as identity

RUBY IS SO FAST

FUCKI LOVE IT

SO MUCH♥

~/Development/SECRETARYOFLABOR

self-referential symlink `what`single LABOR.RB web app

was super hammered when I wrote this

~/Development/unmarked_vanan app that stalks people’s locations

~/Development/tracereal-time stats graphing

continuousintegration

internal appdistribution

collectdgraphs

internaltalk videos

30INTERNAL APPS

arbitrary data store

internaltwitter

ios licensing + provisioning

haystackexceptions

Outsiders are not welcome.

GitHub as AuthenticationTEAMS, ORGANIZATIONS, AND USERS

GitHub as AuthenticationUSE OAUTH TO AUTHENTICATE USERS

github.com/atmos/sinatra_auth_github

github_organization_access?('github')# => true

GitHub as AuthenticationSECURITY • CONSISTENCY • COOLICTY

DON’T REINVENT THE WHEELYOUR AUTHENTICATION CAN BE FREE

OAUTH RECAP

hooks & hubot

HUBOTOUR FRIENDLY CAMPFIRE BOT

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

github.com/github/hubotHubot is not open source.LOL JK

bots ♥ github: know your branch status

hubot what hasn’t been deployed?Zach

HubotZach: Here's what hasn't been deployed on master yet: https://github.com/github/github/compare/{sha}...master

bots ♥ github: know your branch status

hubot what hasn’t been deployed on issues2?Zach

HubotZach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2

bots ♥ github: know your branch status

hubot what hasn’t been deployed on issues2?Zach

HubotZach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2

bots ♥ github: know your branch status

hubot what hasn’t been deployed on issues2?Zach

HubotZach: Here's what hasn't been deployed on issues2 yet: https://github.com/github/github/compare/{sha}...issues2

https://github.com/site/sha

bots ♥ github: know your branch status

#=> 2c8c2e9932d0caceecd3ed8ee2adcda0ece3e564

bots ♥ github: using the API

hubot what are the pulls on holman/boom?Zach

HubotHTTParty 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 culvrhttps://github.com/holman/boom/pull/43

bots ♥ github: using the API

hubot how many issues did we close today for github/github?Zach

Hubot13 issues closed on github/github in the past 24 hours.

bots ♥ github

What does your company do over and over again?Can you automate that?

HUBOT RECAP

HUBOT KNOWS WHERE YOU LIVEDO NOT TRUST HIM

secretseveryone has

WE TUCK STUFF AWAY SOMETIMES. OOPS.

EMOJI

:heart:

WORDS ARE FOR ACADEMICS, BRO

:+1: :shipit:

http://git.io/dmWZWg...and so much more:

SHORTCUTSQUIT MAKING ME DO THINGS ALL SLOW-LIKE

w t ?

IMAGESEVERYTHING IS BETTER WITH PIXELS

![title](url)

DIFF+PATCHGOD I HATE PIXELS JUST GIVE ME TEXT

.diff + .patchafter most URLs

require 'redcarpet'markdown = Redcarpet.new("Hello World!")puts markdown.to_html

FENCED CODEIT’S LIKE CODE BUT WITH MORE FENCES

```rubyrequire 'redcarpet'markdown = Redcarpet.new("Hello World!")puts markdown.to_html```

FENCED CODEIT’S LIKE CODE BUT WITH MORE FENCES

FENCED CODEIT’S LIKE CODE BUT WITH MORE FENCES

require 'redcarpet'markdown = Redcarpet.new("Hello World!")puts markdown.to_html

MENTIONSGET SOMEONE ELSE TO DO YOUR WORK

@username

pull requests

issues

commits

WHITESPACEIT SUCKS

add?w=1to URLs

REPO REFERENCESAROUND THE REPO, AROUND THE REPO, AROUND

user/repo#issue

GIT.IOOFFICIAL LAUNCH ANNOUNCEMENT

http://git.io/nxVVigcurl -i http://git.io -F 'url=#{url}' #{code}

TOOLS + PROCESS = PRODUCTSIMPLE BETTER AWESOME

THE BIG RECAP

thanks!

zach holman zachholman.com /talks

@holmantwitter+github: