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

Starting Open Source: How to make your first co...

Michelle Sanver
March 06, 2014
190

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.

Michelle Sanver

March 06, 2014
Tweet

Transcript

  1. “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
  2. It’s ok to get it wrong Before we get started!

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

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

    assigned to you Before we get started! Top 3: Kim @michellesanver #CommunityWorks
  5. Who I was If I got enough nutritional value from

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

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

    help them improve. Why I wanted to contribute
  8. Videos about PHP!! In fact.... If you want to see

    an earlier version of this talk The cool project @michellesanver #CommunityWorks
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. • 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
  16. • 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
  17. • 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 [email protected] password -- super-admin Step 2: Install The Project @michellesanver #CommunityWorks
  18. Observe the responses (Should I stay, or should I go?)

    Step 4: Hiiiiiii!!! :-) @michellesanver #CommunityWorks
  19. Step 5: What can I do? It’s not your project.

    (But nothing stops you from branching...) @michellesanver #CommunityWorks
  20. Communicate!! In open source - Communication is key Step 5:

    What can I do? @michellesanver #CommunityWorks
  21. It’s private, for now. (If you want it to be)

    Step 6: How... ? @michellesanver #CommunityWorks
  22. $ git remote add upstream https://github.com/protalk/pro $ git fetch upstream

    $ git merge upstream/master ! Step 7: Just do it @michellesanver #CommunityWorks
  23. Make your changes! (You know how to code, right?) Step

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

    <3' Step 7: Just do it @michellesanver #CommunityWorks
  25. 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 <[email protected]>
  26. Step 8: Push it (Just push it push it) $

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

    good) @michellesanver #CommunityWorks
  28. Step 9: The pull request Time to show the world!

    (Except those poor sods without Internet) @michellesanver #CommunityWorks
  29. It’s just a button! (And a form...) Step 9: The

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

    issuetracker! #1337 ! close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved