Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to start contributing to Open Source

How to start contributing to Open Source

or "how to become a (good) open source contributor in 1 hour"

Simon Baslé

April 20, 2017
Tweet

More Decks by Simon Baslé

Other Decks in Programming

Transcript

  1. how to become
    an
    (good)
    open source
    contributor
    in 1 hour

    View Slide

  2. - Step 1 -
    Start Contributing

    View Slide

  3. - Step 2 -
    ...

    View Slide

  4. - Step 3 -
    PROFIT!

    View Slide

  5. how to become
    an
    (good)
    open source
    contributor
    in 1 hour

    View Slide

  6. how to become
    a
    n
    (good) open source
    contributor
    in 1 hour

    View Slide

  7. @
    simonbasle

    View Slide

  8. ideas and advice
    and NOT a perfect recipe
    In this talk:

    View Slide

  9. 1 Where
    to Start?

    View Slide

  10. familiarize with
    Git / GitHub

    View Slide

  11. picking a project

    View Slide

  12. documentation

    View Slide

  13. samples and tests

    View Slide

  14. opening issues

    View Slide

  15. engaging with the
    community

    View Slide

  16. actual code

    View Slide

  17. 2 how to
    do it well?

    View Slide

  18. the "don't be
    that guy" part

    View Slide

  19. "the good, the bad and the ugly"
    Dramatis Personae

    View Slide

  20. "the good, the bad and the ugly"

    Dramatis Personae

    View Slide

  21. Archetype
    ugly version of the archetype
    (don't be that guy)


    bad version of the archetype
    (try to not be that guy either)
    fix to the archetype
    (be THAT guy instead)

    View Slide

  22. the Diva

    View Slide

  23. the Diva
    feature X
    Unbelievable that feature X isn't included in this project. Please add it!

    View Slide

  24. the Diva
    feature X
    One feature that I'm greatly missing in this project is the ability to do X. Here is
    what I mean by feature X: (...).

    View Slide

  25. Discussion around adding feature X
    Hi! I'd like to discuss the addition of feature X and whether or not you have
    considered it in the past. If so, I'd like to know more about the rationale around not
    adding it.
    Here is a more detailed analysis of my use case and the need for feature X, as well
    at some implementation idea: (...).
    I'd be open to starting a PR exploring these too.
    the Diva

    View Slide

  26. the Riddler

    View Slide

  27. the Riddler
    it doesn't work
    The other day while running this project I got an error.

    View Slide

  28. the Riddler
    Strange bug while running method foo
    While using this project, I tried to apply method foo and I got a strange error about
    an index that was out of bounds.
    Did I do anything wrong?

    View Slide

  29. the Riddler
    IndexOutOfBounds when applying method foo to an empty List
    Using method foo in my code, I ran into a bug where if I pass an empty List to the
    method, it throws an IndexOutOfBoundsException.
    Here is the stack trace and a reproducible test case:
    Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0
    at java.util.Collections$EmptyList.get(Collections.java:4454)
    at some.library.LibUtils.foo(LibUtils.java:54)
    at my.project.Application.main(Application.java:59)

    View Slide

  30. the Artist

    View Slide

  31. the Artist

    I fixed a minor typo in LibUtils.foo javadoc and added the missing javadoc for
    foobar.
    Fix typo in foo javadoc, add missing foobar javadoc

    View Slide

  32. I fixed a minor typo in LibUtils.foo javadoc and added the missing javadoc for
    foobar.
    Fix typo in foo javadoc, add missing foobar javadoc
    the Artist


    View Slide

  33. the Artist
    I fixed a minor typo in LibUtils.foo javadoc and added the missing javadoc for
    foobar.
    Fix typo in foo javadoc, add missing foobar javadoc

    View Slide

  34. I fixed a minor typo in LibUtils.foo javadoc and added the missing javadoc for
    foobar.
    Fix typo in foo javadoc, add missing foobar javadoc
    the Artist
    (commit still contains a hundred line
    changes from spaces to tabs)

    View Slide

  35. the Artist
    I fixed a minor typo in LibUtils.foo javadoc and added the missing javadoc for
    foobar.
    Additionally I noticed there was no formatter setting shared in the project but it
    seemed to follow tab-based formatting, so I used that.
    Since foo javadoc formatting was off, I fixed it but limited my change to these 2
    methods...
    Fix typo in foo javadoc, add missing foobar javadoc

    View Slide

  36. the Alien-Abductee

    View Slide

  37. the Alien-Abductee


    View Slide

  38. the Alien-Abductee

    View Slide

  39. the Alien-Abductee

    View Slide

  40. the Quick Trigger

    View Slide

  41. the Quick Trigger

    View Slide

  42. the Quick Trigger

    View Slide

  43. the Quick Trigger

    View Slide

  44. a few github
    tricks

    View Slide


  45. PR rights for maintainers

    View Slide

  46. ✏✏✏⌫✏
    commit often
    on PR branch

    View Slide

  47. commit often
    on PR branch

    View Slide


  48. ...but squash & merge
    at the end

    View Slide

  49. View Slide

  50. View Slide

  51. ...but squash & merge

    at the end
    (maybe as controversial as tabs vs space)

    View Slide

  52. 3 as a
    maintainer

    View Slide

  53. best effort

    View Slide

  54. don't be afraid to
    (gently) say NO

    View Slide


  55. don't be afraid to
    (sternly) say NO

    View Slide

  56. foster a welcoming
    community

    View Slide

  57. guiding
    contributors

    View Slide

  58. don't be afraid to
    close issues

    View Slide

  59. 4 enterprise
    OpenSource

    View Slide

  60. should you open
    source stuff?

    View Slide

  61. how to convince
    your boss

    View Slide

  62. sometimes the problem is
    not the Boss
    (could it be the lawyers?)

    View Slide

  63. CLA and its
    usefulness

    View Slide

  64. reduce friction
    invest in tooling

    View Slide

  65. a few governance
    alternatives

    View Slide

  66. conclusion

    View Slide

  67. it's not that hard

    View Slide

  68. don't forget there's a
    human on the other side
    of the screen

    View Slide

  69. Thank you!

    View Slide

  70. Questions?

    View Slide

  71. credits
    • Whiteboard - CC0 (via WikiMedia)
    • Cork board - CC-By-NC-SA (Caitlin Bussey, via Flickr)
    • Tack - CC0 (via PixaBay)
    • Sketch of The May House in Avondale - CC-By-Sa (Evan Roshek via
    WikiMedia)
    • Joy Oil gas station blueprints - PubDom (via WikiMedia)
    • Pilots at work on Thai Smile Airbus A320 - CC-By (Max Alpha X-ray via
    WikiMedia)
    • Meeting Room - CC0 (via Pexels)

    View Slide