The first merged pull request - not just coding

21
the first merged pull request not just coding

Transcript of The first merged pull request - not just coding

the first merged pull request

not just coding

Jim Horng

◎ Python Developer @ QNAP Cloud

◎ Contributor of PyAPNs, tornado-celery

◎ @jimhorng: linkedin, github, gmail

◎ starcraft 2, heroes of the storm player

One day… during the interview

interviewer:“ you have a lot of experience but I cannot measure your coding ability, because you have

no source code on github “

PyAPNs comes… (stars:7xx)

a push notification library for Apple (APNs)

◎ No error handling ( old APNS protocol )○ Async response of error and time varies

from 0.1 ~ 0.8 secs by observation◎ Blocking socket

before patch… open an issue

+1, gather solutions,get noticed for pull request

Solutions

◎ Non-blocking ssl socket connection to send notification without waiting for response

◎ Retry queue for seems-to-sent message◎ Listen for error-response and re-send

and… a lot of testing...

fire pull request...

◎ community will do QA for me… hehe

◎ community will do code review for me… hehe

Ooops...

clean pull request

◎ clean commits: git squash on local branch◎ create PR branch for PR on forked repo

○ able to keep update that PR branch◎ if newer on target repo:

branch target repo as new PR branch -> cherry-pick from patched branch

◎ after PR, if newer on target repo conflicts:merged the conflict to keep diff clean

looks good...

1 day after…

waiting to be hammeredreviewed...

In reality

after months...

Repo owner analysis

◎ Less code contribution +◎ Founder◎ = no time for code review◎ Favors fame, users

kinds of promotion: issues

kinds of promotion: stackoverflow

Finally...

Little Firm Happiness

Little Firm Happiness (cont.)

Takeaways

◎ clean pull request◎ repo owner’s trait◎ kinds of promotion

◎ result: small positive feedback loop

Jim Horng

◎ Python Developer @ QNAP Cloud

◎ Contributor of PyAPNs, tornado-celery

◎ @jimhorng: linkedin, github, gmail

◎ starcraft 2, heroes of the storm player