Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Hacktoberfest 2020 - Open source for beginners


Hier ansehen

1 von 31 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Hacktoberfest 2020 - Open source for beginners (20)


Aktuellste (20)

Hacktoberfest 2020 - Open source for beginners

  1. 1. Hacktoberfest 2020 Open Source for beginners By Saksham Arora Open Source Executive Member DSC-MAIT 20-21 PYTHON
  2. 2. Saksham Arora About Me I’m a 3rd year student in IT, MAIT. I’m a Python and Flutter developer. I started programming in Python at the end of my 2nd semester although I wrote my first “Hello World” code in C++ back in class 11th. I recently finished my Google Summer of Code 2020 program under Python Software Foundation. I was a project mentor for a Flutter project in GirlScript Summer of Code 2020. My main interests are in the Artificial Intelligence field. Introduction
  3. 3. Agenda What is Hacktoberfest & Open Source? Why is Open Source Software important? A brief intro to Git and GitHub Creating a pull request! Next steps to become an open source contributor and what is GSoC? Doubt session
  4. 4. What exactly is Hacktoberfest? Hacktoberfest is a month-long celebration of open source software run by DigitalOcean in partnership with GitHub and Twilio. Hacktoberfest is open to everyone in our global community! In this event, Five quality pull requests must be submitted to public GitHub repositories - i.e. Open source projects on GitHub. Steps to register - Step 1 - Create a GitHub account for free. Step 2 - Register at Hacktoberfest official website using your GitHub ID.
  5. 5. Now, What is Open Source?
  6. 6. There are two kinds of software. One is open source software and the other is proprietary software or closed source software. As the source code of an open source program can be modified by anyone, this is also free to download. Open Source Something people can modify and share because it is publicly accessible. Open source encourages open collaboration between everyone around the world! It is meant to be a collaborative effort, where programmers improve upon the source code and share the changes within the community.
  7. 7. React is powered by Facebook and Angular is maintained by Google. On the other hand, Vue was created by Evan You, and is maintained by him and the rest of the active core team members (just like a community). All 3 are open source projects! Did you know?
  8. 8. ● It’s important due to the fact that “more perspectives make better software”! ● It is important in building a sustainable project as more people will equate to more ideas, features and a better maintenance of the project in the long run. ● Open Source Software make a great free alternative to proprietary softwares for which you need to pay to use their services. Other pros: 1. Personal Benefits 2. Community Recognition 3. Self Advertising 4. Sense of value 5. Software quality, security and customization Why is Open Source Software(OSS) important?
  9. 9. - Philippe Kahn Created the first camera phone, a pioneer for wearable technology, and is the author of dozens of technology patents. “The power of Open Source is the power of the people. The people rule.”
  10. 10. Git and GitHub What is Git? What is a version control system (VCS)? Git is a free, open-source distributed version control system. It keeps track of projects and files as they change over time. A system that records changes to a file or set of files over time so that you can recall specific versions later. What is GitHub? GitHub is a Git repository hosting service that provides a web-based graphical interface.
  11. 11. Snapshots How does Git and GitHub work? This is how git keeps track of our code recording how all your files look like at a given point of time. Now with this, one can go back to any `snapshot`(or version) of the project. Important Terminology Commits Commits are how you save your snapshot or version of files at a given point of time. It contains 3 important things - 1. Information about how the files were changed 2. A reference to the previous commit 3. A hash code
  12. 12. Repository This is basically your project! It’s a collection of all your files along with their history, i.e. all those commits you made will live here. So, where are these repositories stored? Well, for the obvious one, in your system locally but it can be stored somewhere else too! GitHub! Important Terminology Branches All commits in a git repository live on some branch. The main branch of the repository is called the ‘master’ branch for now. Starting from the month of October this branch will be called the ‘main’ branch! Cloning Copying a git repository from a remote server like GitHub to your local machine is known as cloning. Pulling Downloading commits from a repository hosted on a remote server that don’t exist on your local repository is known as pulling. Pushing Adding the local changes made in the project to the repository on a remote server is known as pushing.
  13. 13. How does Git and GitHub work?
  14. 14. How does Git and GitHub work?
  15. 15. HEAD HEAD is the reference to the most recent commit to your repository. Important Terminology Branching off a branch ‘X’ Branching off a branch is creating a new branch based on branch ‘X’. For example, creating a new feature branch from the `master` branch. Merging Once done with creating changes regarding a new feature on a new branch, one would want to merge those changes to the main branch, this is known as merging in version control. Remote Remotes are simply URLs to other copies of a repository. When a repository is cloned, Git automatically creates a remote named "origin" and points to it.
  16. 16. For Linux: Debian/Ubuntu - sudo apt-get install git Fedora - sudo yum install git https://git-scm.com/download/linux For Windows: https://git-scm.com/download/win For Mac: https://git-scm.com/download/mac Configuring git for committing: git config --global user.name <YOUR NAME> git config --global user.email <YOUR EMAIL> Setting up Git and GitHub
  17. 17. Okay, I know the basics now, how do I implement them? Basic git commands - ● To clone a repository to your local machine - git clone url/to/forked/repo.git ● Creating/Initializing a git repository - git init ● Process of making a commit - ○ Create a repo/clone a repo ○ Make some changes ○ Adding the changes - git add ■ Putting file(s) in the ‘staging’ environment ■ `git add` is done when a file is ready to be committed ■ To unstage - git reset ○ Finally committing the changes - git commit ● To update the hosted repository with the new commits - git push ● To create a new branch - git checkout -b BRANCH_NAME ○ And to delete a branch - git branch -d BRANCH_NAME ● To save changes for later - git stash / To use those changes - git stash pop
  18. 18. Creating a Pull Request What is a Pull Request? Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, people in-charge can review the changes, discuss potential modifications, and even push follow-up commits if necessary.
  19. 19. Steps to create a Pull Request 1. Fork the main original repository 2. Clone your forked repository - git clone https://github.com/myusername/repo 3. Link the main repo - git remote add upstream https://github.com/orignal/repo 4. Create a new git branch - git checkout -b new_branch 5. Create new files or modify existing files 6. Add and commit your changes - git add [filenames] & git commit 7. Push your changes - git push --set-upstream origin branch_name / git push 8. Open the main repository and click on Pull requests and then the New Pull Request button 9. Click on compare across forks and select head repository as your own forked repository and the new branch with changes 10. Click on Create pull request
  20. 20. IMPORTANT TIP Always create a new branch to work on a new feature/changes when collaborating on a repository. Avoid making changes directly to the master branch as much as possible.
  21. 21. Next steps in becoming an active open source contributor The process of open source collaboration and contribution is very intimidating for the newcomers. Most people including me when I first started have a lot of burning questions regarding this topic! Like: 1. How do I find the project that suits me and inclines with my interest? 2. What if I don’t know anything about the project I want to contribute to and something goes awry? and many many more such questions!
  22. 22. Next steps in becoming an active open source contributor Don’t worry! Becoming an open source contributor is not only about writing meaningful code. There are a lot of things besides code in a project that are mostly overlooked! For example, one of the main things besides the code is the documentation! From fixing small spelling mistakes in the documentation to writing the documentation for the parts of the project that are undocumented. Not only does this help you in gaining confidence while contributing to open source but also helps you understand parts of the project as you go along reading the documentation.
  23. 23. Next steps in becoming an active open source contributor Don’t be afraid to ask questions if you don’t understand a part of the project you want to contribute to! The open source community welcomes everyone with an open mind! Each organisation/repository/project have their communities that are mostly free for anyone to be a part of. Communicating with the maintainers when you get stuck somewhere is a part of the process. As long as you are not asking for a spoon-feeding, everyone is happy to help you out and help you grow because they themselves have either gone through this process or are going through it!
  24. 24. The most important tip: Just do it!
  25. 25. Open Source Programs Google Summer of Code (GSoC) Google Season of Docs (GSoD) Outreachy Internships GirlScript Summer of Code (GSSoC) and many more...
  26. 26. How does these programs work? A lot of the students get confused on how these programs work! Let’s take GSoC for example: It is an annual program in which university students all around the globe contribute to open source during their break from school in the summer(starting from April/May and ending in August). The program consists of organizations which register themselves in the program around February with the projects that are going to take part in the program. The interested students start discussing project ideas with the organizations and apply to these projects with their proposals for those project ideas, the accepted students then start to code throughout the summer. The program is incentivized by Google by offering a stipend of 3000 US Dollars to the accepted students.
  27. 27. Important Resources for further learning ● https://hacktoberfest.digitalocean.com/ ● https://docs.github.com/en/free-pro- team@latest/github/getting-started-with-github ● https://git-scm.com/doc ● https://summerofcode.withgoogle.com/ ● https://github.com/lauragift21/awesome-learning-resources ● https://github.com/sindresorhus/awesome
  28. 28. Doubt Session Ask away your queries!
  29. 29. THANKS! You can reach out to us on DSC MAIT Telegram group: http://bit.ly/teldscmait You can connect with me on: https://www.linkedin.com/in/sakshamarora1 https://twitter.com/sakshamarora__ For basic GSoC related doubts, I have answered the most common questions in this blog: https://medium.com/@sakshamarora1001/my-gsoc-journey- 68e72303d242
  30. 30. CREDITS ● Template by Slidesgo ● Icons by Flaticon ● Infographics by Freepik ● Images created by Freepik

Hinweis der Redaktion

  • Talk about DSC - Add notes
  • Did GSoC in Intel’s Machine Learning based open source project DFFML where I worked on Computer Vision
    AI field - ML, Deep Learning, Computer Vision, Reinforcement Learning
  • Let’s watch a special video message from the Yancey Spruill, CEO of Digital Ocean which runs the Hacktoberfest event.
  • Now to define what really open source in a single line - Read the line.
    Now what I think it’s clear what I mean by publicly accessible. Anyone can view what the code is doing and how it is doing.

    Almost every big project that is open source have a community of programmers who work on that big project regularly to keep it updated. A lot of big tech companies make use of open source softwares in their products and some others even have developers create open source software!
  • Many of you might have heard about different javascript frameworks. Almost all of them are open source! Out of them few of the popular ones are React, Angular and Vue.
  • Personal Benefits - open source developers are driven by altruism and the desire to help others

    Community Recognition - When working on or running open source projects, you can get recognition from the developer community in a number of ways, such as creating a great GitHub-profile and participating in events like Hacktoberfest.

    Self Advertising - If you or your company actively participate in the open source community, you can earn a great reputation. This way, if you are an individual or self-employed developer, it will be easier for you to find a job as a freelancer or a full-time employee.

    Sense of value - Engaging in open source software development will make your work meaningful, and you will not grow to hate it as time passes.

    Software quality, security and customization - A piece of software created by a team of developers can be lower quality than that developed by thousands of developers from all over the world with experience in different technologies, industries, and projects.
  • Now let’s get to business and what we all are here for!
    How to get started with open source!

    GitHub - It is the world’s largest coding community, and putting a code or a project out there brings increased, widespread exposure to your code.
  • Now git can be complicated at first, but if one understands the key concepts of how version control softwares work. You will have no problem!
    Snapshots - Your snapshots even from later on will stay there if you want to jump back there!
  • For a very simple(and silly!) example, consider your syllabus to be a project, you make a new notebook for each subject, those subjects correspond to branches in a git repository. Each branch contains different stuff just like how a maths notebook contains different theory and questions from a chemistry notebook!
  • This diagram demonstrates how the git workflows function!
  • arch linux, etc
    This is important because every Git commit uses this information, and it’s integrated into the commits you start creating
  • Why? Well what if you are working on a new feature but weren’t able to completely implement it or maybe you found a better solution to the problem. Now you have redundant code and commits lying in your repo. So, if you worked on a different branch,then instead of going through the hassle of rewinding your work you can just switch back to master where those redundant changes don’t exist and delete that branch!
  • But when you pull up that repo for the first time and check out the issues tab, it can be downright intimidating and anxiety-inducing. I probably read through issues with “good first issue” tags 20 times before I got the courage to add a comment stating, “I’d like to help with this Issue.”

    You can even become a tester, there are a lot of things. For example, you found a project that piques your interest. That softwares works without errors in linux but have issues while running on a mac or windows operating system and you are a mac user. You can then help this open source project as a mac user, which relates to what I discussed earlier! “more perspectives make better software”