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 full-size slide

  2. - Step 1 -
    Start Contributing

    View full-size slide

  3. - Step 2 -
    ...

    View full-size slide

  4. - Step 3 -
    PROFIT!

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  8. 1 Where
    to Start?

    View full-size slide

  9. familiarize with
    Git / GitHub

    View full-size slide

  10. picking a project

    View full-size slide

  11. documentation

    View full-size slide

  12. samples and tests

    View full-size slide

  13. opening issues

    View full-size slide

  14. engaging with the
    community

    View full-size slide

  15. 2 how to
    do it well?

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    Dramatis Personae

    View full-size slide

  19. 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 full-size slide

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

    View full-size slide

  21. 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 full-size slide

  22. 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 full-size slide

  23. the Riddler

    View full-size slide

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

    View full-size slide

  25. 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 full-size slide

  26. 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 full-size slide

  27. 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 full-size slide

  28. 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 full-size slide

  29. 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 full-size slide

  30. 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 full-size slide

  31. 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 full-size slide

  32. the Alien-Abductee

    View full-size slide

  33. the Alien-Abductee


    View full-size slide

  34. the Alien-Abductee

    View full-size slide

  35. the Alien-Abductee

    View full-size slide

  36. the Quick Trigger

    View full-size slide

  37. the Quick Trigger

    View full-size slide

  38. the Quick Trigger

    View full-size slide

  39. the Quick Trigger

    View full-size slide

  40. a few github
    tricks

    View full-size slide


  41. PR rights for maintainers

    View full-size slide

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

    View full-size slide

  43. commit often
    on PR branch

    View full-size slide


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

    View full-size slide

  45. ...but squash & merge

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

    View full-size slide

  46. 3 as a
    maintainer

    View full-size slide

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

    View full-size slide


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

    View full-size slide

  49. foster a welcoming
    community

    View full-size slide

  50. guiding
    contributors

    View full-size slide

  51. don't be afraid to
    close issues

    View full-size slide

  52. 4 enterprise
    OpenSource

    View full-size slide

  53. should you open
    source stuff?

    View full-size slide

  54. how to convince
    your boss

    View full-size slide

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

    View full-size slide

  56. CLA and its
    usefulness

    View full-size slide

  57. reduce friction
    invest in tooling

    View full-size slide

  58. a few governance
    alternatives

    View full-size slide

  59. it's not that hard

    View full-size slide

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

    View full-size slide

  61. 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 full-size slide