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

Starting Open Source: How to make your first contribution

01da6d807a29ad6d49801c0157518148?s=47 Michelle Sanver
March 06, 2014
170

Starting Open Source: How to make your first contribution

So, you want to join the Open Source party, but you're not used to every man and his dog looking at your code. You keep putting it off, you don't know anyone involved in the project, you might be a burden...

If you want to get involved but keep talking yourself out of it, let me show you how to take that first step. I'll cover the mechanics and the fear of contributing, from saying hello and installing the project to selecting a bug and surviving the fear of your first pull request and code review using git and GitHub.

01da6d807a29ad6d49801c0157518148?s=128

Michelle Sanver

March 06, 2014
Tweet

Transcript

  1. Starting Open Source! How to make your first contribution @michellesanver

    #CommunityWorks
  2. @michellesanver #CommunityWorks Who are you?

  3. Contribute to *this* talk @michellesanver #CommunityWorks

  4. “The promise of open source is better quality, higher reliability,

    more flexibility, lower cost, and an end to predatory vendor lock-in.” - opensource.org @michellesanver #CommunityWorks
  5. Better Quality @michellesanver #CommunityWorks

  6. Higher Reliability @michellesanver #CommunityWorks

  7. More Flexibility @michellesanver #CommunityWorks

  8. Lower Cost @michellesanver #CommunityWorks

  9. End to predatory vendor lock-in @michellesanver #CommunityWorks

  10. Convinced Yet? @michellesanver #CommunityWorks

  11. Before we get started! Top 3: Lineke and Kim @michellesanver

    #CommunityWorks
  12. It’s ok to get it wrong Before we get started!

    Top 3: Kim @michellesanver #CommunityWorks
  13. You might not get an immediate response Before we get

    started! Top 3: Kim @michellesanver #CommunityWorks
  14. Don't be afraid to ask for a task to be

    assigned to you Before we get started! Top 3: Kim @michellesanver #CommunityWorks
  15. Git Before we get started! Top 3: Lineke @michellesanver #CommunityWorks

  16. Passion & Usability Before we get started! Top 3: Lineke

    @michellesanver #CommunityWorks
  17. The development process Before we get started! Top 3: Lineke

    @michellesanver #CommunityWorks
  18. Storytime @michellesanver #CommunityWorks

  19. None
  20. Who I was If I got enough nutritional value from

    code… ! I would eat that and nothing else. @michellesanver #CommunityWorks
  21. Who I was But I would never share my food.

    @michellesanver #CommunityWorks
  22. Who I was Because if I would… @michellesanver #CommunityWorks

  23. @michellesanver #CommunityWorks

  24. Who I was Made websites under a nickname… @michellesanver #CommunityWorks

  25. Who I was No portfolio: Unemployable @michellesanver #CommunityWorks

  26. Who I was So… I started my own company! (Unsuccessfully)

    @michellesanver #CommunityWorks
  27. Who I was I had *NO* code confidence @michellesanver #CommunityWorks

  28. Why I wanted to contribute @michellesanver #CommunityWorks

  29. @michellesanver #CommunityWorks I felt ashamed for *not* doing it Why

    I wanted to contribute
  30. @michellesanver #CommunityWorks I found a cool project, I wanted to

    help them improve. Why I wanted to contribute
  31. The cool project @michellesanver #CommunityWorks

  32. ProTalk.ME The cool project @michellesanver #CommunityWorks

  33. Videos about PHP!! In fact.... If you want to see

    an earlier version of this talk The cool project @michellesanver #CommunityWorks
  34. Obstacles @michellesanver #CommunityWorks

  35. Obstacles Davey Shafik It was a tie.! ! 1) Fear,

    that I really had no clue what I was doing and people were going to make fun of me.
 
 2) Finding something to do! 
 And the first one never really went away… I still worry when I contribute to things in say, python, or javascript, or something other than PHP where people know me. @michellesanver #CommunityWorks
  36. Obstacles Lorna Mitchell Honestly, I just didn't realise my efforts

    would be useful or welcome. ! ! It was only because I was deeply into a tool (joind.in of course!) that I eventually got told to fix some things myself, as a speaker and a conference organiser, I was just nagging Chris far too much.! I was a project lead I think before I contributed at all to any other project, so I was a pretty slow starter! ! ! Now I just assume everyone appreciates the effort even if I'm doing it wrong, and I get in! @michellesanver #CommunityWorks
  37. Obstacles Joshua Thijssen I'm not 100% sure when my first

    (open source) contribution took place.I! think it was around 1997-1998, and it probably was either some small! things inside the Linux kernel.! ! The biggest issue for (starting) contributors I think is they are! overwhelmed by the code and current userbase. It's hard to find a place in such a group, and even though most of them would be perfectly capable of contributing, they won't because of fear of rejection, mockery etc. @michellesanver #CommunityWorks
  38. Obstacles Eli White My FIRST hurdle was having too many

    hobbies and not wanting to just do it. As a hobby.! ! SECOND hurdle. Was trying to convince NASA, who I worked for. To allow me to open source some projects I'd created there. And failed.! ! THIRD hurdle, was trying to contribute to OSS projects. While already now a senior programmer with a decade+ of experience. Yet because I had no OSS-karma. No one wanted my code, or to trust me. ! @michellesanver #CommunityWorks
  39. Obstacles Beth Tucker Long When I contributed to an open

    source project for the first time, the biggest obstacle for me was getting over my fear of doing something wrong and being publicly shamed. ! ! Actually, that's not true. That was the biggest obstacle when I wanted to contribute to an open source project for the second time. When I first tried to contribute to an open source project, I was full of excitement and jumped right in. My submission was not accepted, which I fully expected because I was new to the project. ! ! What I did not expect was that instead of constructive criticism or a "thanks anyway, but no", the response I received was rude and insulting. I did not contribute to another project for a year and a half after that for fear of being ridiculed again. Thanks to a very supportive network of friends in the PHP community, though, I was able to overcome my fear and am back to contributing where I can.! @michellesanver #CommunityWorks
  40. My Obstacles Technology & Fear of public ridicule @michellesanver #CommunityWorks

  41. Contributing to Open Source! ! In 10 steps @michellesanver #CommunityWorks

  42. Step 1: Choose The Project @michellesanver #CommunityWorks

  43. Step 1: Choose The Project Be phpassionate about it Lineke’s

  44. Step 1: Choose The Project (ab)use github! @michellesanver #CommunityWorks

  45. Step 1: Choose The Project Search! :) @michellesanver #CommunityWorks

  46. Step 1: Choose The Project What are your ‘friends’ doing?

    @michellesanver #CommunityWorks
  47. @michellesanver #CommunityWorks

  48. Step 1: Choose The Project Activity @michellesanver #CommunityWorks

  49. Step 1: Choose The Project Check the commit history @michellesanver

    #CommunityWorks
  50. Your Skills Step 1: Choose The Project @michellesanver #CommunityWorks

  51. @michellesanver #CommunityWorks

  52. Ready to change the world? https://www.codemontage.com {code} montage empowers coders

    to improve their impact on the world. Step 1: Choose The Project @michellesanver #CommunityWorks
  53. Step 1: Choose The Project @michellesanver #CommunityWorks

  54. Erm... License? Step 1: Choose The Project @michellesanver #CommunityWorks

  55. Questions and Pointers Step 1: Choose The Project @michellesanver #CommunityWorks

  56. Step 2: Install The Project @michellesanver #CommunityWorks

  57. Fork It Step 2: Install The Project @michellesanver #CommunityWorks

  58. @michellesanver #CommunityWorks

  59. @michellesanver #CommunityWorks

  60. Clone It Step 2: Install The Project @michellesanver #CommunityWorks

  61. @michellesanver #CommunityWorks

  62. @michellesanver #CommunityWorks

  63. Using vagrant Step 2: Install The Project @michellesanver #CommunityWorks

  64. Ruby, Vagrant, Oracle VirtualBox Step 2: Install The Project @michellesanver

    #CommunityWorks
  65. $ vagrant up Step 2: Install The Project @michellesanver #CommunityWorks

  66. Step 2: Install The Project @michellesanver #CommunityWorks

  67. Manually Step 2: Install The Project @michellesanver #CommunityWorks

  68. • Fork the protalk repository! • Use git clone to

    get your fork on your local machine! • Run ant - this will install all dependencies, clear the cache and run tests Step 2: Install The Project @michellesanver #CommunityWorks
  69. • Make sure the app/cache and app/logs directories are writable

    by the webserver! • Create the database and change the parameters.ini in app/config to set the database connection details! • Run the command "app/console doctrine:schema:create" to create the database tables Step 2: Install The Project @michellesanver #CommunityWorks
  70. • Import the doc/db/seed_data.sql in your database for initial data!

    • Creating a admin user for the backend can be done by running this command: "app/ console fos:user:create adminadmin@example.com password -- super-admin Step 2: Install The Project @michellesanver #CommunityWorks
  71. Do you like vagrant now? @michellesanver #CommunityWorks

  72. Step 2: Install The Project Questions and Pointers @michellesanver #CommunityWorks

  73. Step 3: Investigation @michellesanver #CommunityWorks

  74. Step 3: Investigation Codebase @michellesanver #CommunityWorks

  75. Coding guidelines Step 3: Investigation @michellesanver #CommunityWorks

  76. Tests? Step 3: Investigation @michellesanver #CommunityWorks

  77. Questions and Pointers Step 3: Investigation @michellesanver #CommunityWorks

  78. Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks

  79. Step 4: Hiiiiiii!!! :-) Where art thou? @michellesanver #CommunityWorks

  80. IRC! I’m geekie Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks

  81. Contact them Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks

  82. Observe the responses (Should I stay, or should I go?)

    Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks
  83. Questions and Pointers Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks

  84. Step 5: What can I do? @michellesanver #CommunityWorks

  85. Step 5: What can I do? It’s not your project.

    (But nothing stops you from branching...) @michellesanver #CommunityWorks
  86. The github issuetracker Step 5: What can I do? @michellesanver

    #CommunityWorks
  87. @michellesanver #CommunityWorks

  88. Pick an issue Step 5: What can I do? @michellesanver

    #CommunityWorks
  89. @michellesanver #CommunityWorks

  90. Create an issue Step 5: What can I do? @michellesanver

    #CommunityWorks
  91. @michellesanver #CommunityWorks

  92. @michellesanver #CommunityWorks

  93. Communicate!! In open source - Communication is key Step 5:

    What can I do? @michellesanver #CommunityWorks
  94. Questions and Pointers Step 5: What can I do? @michellesanver

    #CommunityWorks
  95. Step 6: How... ? @michellesanver #CommunityWorks

  96. Step 6: How... ? Read The Guidelines @michellesanver #CommunityWorks

  97. It’s “just” code. Step 6: How... ? @michellesanver #CommunityWorks

  98. If that scares you... Step 6: How... ? @michellesanver #CommunityWorks

  99. It’s private, for now. (If you want it to be)

    Step 6: How... ? @michellesanver #CommunityWorks
  100. Ask questions... Step 6: How... ? @michellesanver #CommunityWorks

  101. Questions and Pointers Step 6: How... ? @michellesanver #CommunityWorks

  102. Step 7: Just do it @michellesanver #CommunityWorks

  103. Step 7: Just do it Keep yourself updated @michellesanver #CommunityWorks

  104. $ git remote add upstream https://github.com/protalk/pro $ git fetch upstream

    $ git merge upstream/master ! Step 7: Just do it @michellesanver #CommunityWorks
  105. Step 7: Just do it Branch… @michellesanver #CommunityWorks

  106. $ git branch <name_of_your_new_branch> $ git checkout <name_of_your_new_branch> ! Step

    7: Just do it @michellesanver #CommunityWorks
  107. Make your changes! (You know how to code, right?) Step

    7: Just do it @michellesanver #CommunityWorks
  108. Commit often! $ git commit -m 'Michelle will be pleased

    <3' Step 7: Just do it @michellesanver #CommunityWorks
  109. Learn Git Step 7: Just do it @michellesanver #CommunityWorks

  110. You *can* change anything.! Don’t worry, just keep doin’ git!

    @michellesanver #CommunityWorks Git
  111. git help, config, and init.! remote, fetch, pull, let’s edit.!

    diff, add, status, commit. you’re doin’ git.! ! log, branch, checkout, that’s it!! checkout, merge, rebase, don’t quit.! clean, reset, tag, push those bits! you’re doin’ git!! ! fork and clone all the repos you know,! patches and pull requests, you’ll steal the git show.! you’re doin’ git. you’re doing it!! check git blame and see your username.! hope you ran the tests before your commit,! or other devs will think you’re an idiot.! you’re doin’ git. (x4)! ! Exit. @michellesanver #CommunityWorks You're Doin' Git! (c) 2013 Jeremy C. Lindblom <jeremy@webjeremy.com>
  112. @michellesanver #CommunityWorks Git Resources http://try.github.io! http://gitimmersion.com! http://book.git-scm.com

  113. Questions and Pointers Step 7: Just do it @michellesanver #CommunityWorks

  114. Step 8: Push it (Just push it push it) @michellesanver

    #CommunityWorks
  115. Step 8: Push it (Just push it push it) $

    git push @michellesanver #CommunityWorks
  116. Questions and Pointers Step 8: Push it (Push it real

    good) @michellesanver #CommunityWorks
  117. Step 9: The pull request @michellesanver #CommunityWorks

  118. Step 9: The pull request Time to show the world!

    (Except those poor sods without Internet) @michellesanver #CommunityWorks
  119. Don’t worry! (Be happy) Step 9: The pull request @michellesanver

    #CommunityWorks
  120. It’s just a button! (And a form...) Step 9: The

    pull request @michellesanver #CommunityWorks
  121. @michellesanver #CommunityWorks

  122. @michellesanver #CommunityWorks

  123. Step 9: The pull request @michellesanver #CommunityWorks Linking to the

    issuetracker! #1337 ! close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
  124. Questions and Pointers Step 9: The pull request @michellesanver #CommunityWorks

  125. Step 10: Code Review @michellesanver #CommunityWorks

  126. Step 10: Code Review It’s constructive criticism @michellesanver #CommunityWorks

  127. Correct or discuss @michellesanver #CommunityWorks Step 10: Code Review

  128. You learn so much! @michellesanver #CommunityWorks Step 10: Code Review

  129. And if there’s trolls... @michellesanver #CommunityWorks Step 10: Code Review

  130. Trolls can be cute too! @michellesanver #CommunityWorks Step 10: Code

    Review
  131. Questions and Pointers @michellesanver #CommunityWorks Step 10: Code Review

  132. You did it... @michellesanver #CommunityWorks

  133. @michellesanver #CommunityWorks Obstacles: The Fear

  134. Obstacles: The Fear Conferences • http://joind.in • http://callingallpapers.com • http://php.net/conferences

    @michellesanver #CommunityWorks
  135. Obstacles: The Fear ! User Groups @michellesanver #CommunityWorks

  136. Obstacles: The Fear @michellesanver #CommunityWorks IRC #phpc #phpmentoring #phpwomen http://freenode.net

  137. Mentoring @michellesanver #CommunityWorks http://phpmentoring.org Matthew Turland @elazar

  138. @michellesanver #CommunityWorks Mentoring Rafael Dohms @rdohms & Davey Shafik @dshafik

  139. @michellesanver #CommunityWorks Mentoring Lineke Kerckhoffs @the_linie

  140. @michellesanver #CommunityWorks Mentoring Igor Wiedler @igorwhiletrue

  141. @michellesanver #CommunityWorks http://phpmentoring.org Obstacles: The Fear Get a mentor… Or

    5
  142. None
  143. None
  144. Still code passionate @michellesanver #CommunityWorks Who I Am Now

  145. None
  146. Now… A conference addict @michellesanver #CommunityWorks Who I Am Now

  147. A speaker @michellesanver #CommunityWorks Who I Am Now

  148. Not afraid to contribute @michellesanver #CommunityWorks Who I Am Now

  149. @michellesanver #CommunityWorks Who I Am Now

  150. All thanks to *YOU* @michellesanver #CommunityWorks Who I Am Now

  151. @michellesanver #CommunityWorks #CommunityWorks

  152. @michellesanver #CommunityWorks Questions… Contributions?

  153. Thank You. @michellesanver #CommunityWorks