$30 off During Our Annual Pro Sale. View Details »

發PR被同事「留言灌爆」! 他只用這2方法解決,同事驚:輕鬆很多

發PR被同事「留言灌爆」! 他只用這2方法解決,同事驚:輕鬆很多

活動:LINE Developers Meetup 開發者小聚 #18 - TECH FRESH 畢業展
活動頁面:https://linegroup.kktix.cc/events/20230627-tech-fresh-gratudation
講者:Ricky Hu

LINE Developers Taiwan
PRO

July 04, 2023
Tweet

More Decks by LINE Developers Taiwan

Other Decks in Technology

Transcript

  1. 發PR被同事「留⾔灌爆」!
    他只⽤這2⽅法解決,同事驚:輕鬆很多
    Ricky Hu
    TECH FRESH @ Android team

    View Slide

  2. Ricky Hu
    TECH FRESH @ Android team
    LINE SHOPPING App
    NTUT EECS
    (graduated)
    ※Source from︓https://www.flaticon.com/free-icon/graduation-hat_1344761

    View Slide

  3. 01
    02
    03
    Contents
    PR 被灌爆,到底是怎麼回事?
    PR 可以不要被灌爆嗎?
    ⼀點⼩⼩的想法

    View Slide

  4. 01
    02
    03
    Contents
    PR 被灌爆,到底是怎麼回事?
    PR 可以不要被灌爆嗎?
    ⼀點⼩⼩的想法

    View Slide

  5. 我在學校的 PR:
    標題不寫清楚
    PR 內容偷懶
    沒有⼈ Code Review
    ※Source from︓https://github.com/Genies-des-mathematiques/sususudoku/pull/12

    View Slide

  6. 我的 PR 來到 LINE 之後:

    View Slide

  7. 我被 Comment 了什麼?
    Spec
    不符合預期設計或⾏為
    Quality
    需要提升程式碼品質
    Convention
    不符合團隊的程式碼準則
    Reuse
    未使⽤現有的類別或函式
    Others
    其他類型

    View Slide

  8. 13%
    46%
    17%
    11%
    13%
    Spec
    Quality
    Convention
    Reuse
    Others
    我被 Comment 了什麼?

    View Slide

  9. 13%
    46%
    17%
    11%
    13%
    我被 Comment 了什麼?
    在會議中討論 / 私下討論
    寫到相關的 Code 才知道要⽤
    少⾒的 Comment
    Spec
    Quality
    Conventions
    Reuse
    Others

    View Slide

  10. 01
    02
    03
    Contents
    PR 被灌爆,到底是怎麼回事?
    PR 可以不要被灌爆嗎?
    ⼀點⼩⼩的想法

    View Slide

  11. Tip 1: 預先閱讀 Coding Style Docs
    1. 熟悉團隊的 Coding Convention
    Dart 語⾔官⽅推薦寫法:Effective Dart
    ※Source from︓https://github.com/Genies-des-mathematiques/sususudoku/pull/12

    View Slide

  12. Tip 2: 觀察其他 PR 的 Comment
    1. 熟悉團隊的 Coding Convention
    Ricky 在 PR 留⾔
    哈密瓜發 PR
    🍈
    草莓在 PR 留⾔
    🍓
    哈密瓜
    修正留⾔
    🍈
    Ricky & 草莓
    留⾔ LGTM
    🍓
    哈密瓜
    Merge PR
    🍈
    不知道留⾔什麼🤔 觀察別⼈的留⾔ 👀
    ※Source from︓
    https://www.flaticon.com/free-icon/pull-request_10824098
    https://www.flaticon.com/free-icon/git_10042189
    https://www.flaticon.com/free-icon/comment_3193015
    https://www.flaticon.com/free-icon/hammer_7012680

    View Slide

  13. Big PR
    +589 -196
    133 comments

    2. ⼤ PR 分成多個⼩ PR
    PR 上的留⾔修⼀下! 對不起,我只是⼀個實習⽣…
    😵💫
    同事
    😓

    View Slide

  14. Small PR #1
    +223 -98
    47 comments
    Small PR #3
    +196 -102
    15 comments
    Small PR #2
    +261 -144
    24 comments
    2. ⼤ PR 分成多個⼩ PR

    LGTM! Merged!
    😎
    同事
    😉

    View Slide

  15. 01
    02
    03
    Contents
    PR 被灌爆,到底是怎麼回事?
    PR 可以不要怎麼被灌爆嗎?
    ⼀點⼩⼩的想法

    View Slide

  16. ⼀點⼩⼩的想法
    PR 被留⾔灌爆是⼀件好事?
    • 透過 PR 快速了解團隊 Convention
    • 團隊成員對於專案品質要求⾼
    實習⼩⼩⼼得
    • TECH FRESH Mentor 學習指引
    • Workshop、Team Building 維持合作品質

    View Slide

  17. THANK YOU

    View Slide