The first merged pull request - not just coding
Transcript of 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
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
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
Repo owner analysis
◎ Less code contribution +◎ Founder◎ = no time for code review◎ Favors fame, users
Takeaways
◎ clean pull request◎ repo owner’s trait◎ kinds of promotion
◎ result: small positive feedback loop