Aug13 by spencerpmoran
在Github上参与开源贡献(译者:逐影Linux)
原文链接:http://spencermoran.me/2013/08/13/open-source-on-github-your-first-contribution/
As a senior Computer Science student, I am constantly hearing about how great it is to contribute to open source projects on github. Many job listings list it as a qualification or a “plus”, and it is casually thrown around in conversation at all kinds of seminars and events at school. Sounds great, I should do that! The only problem is: I’m a huge noob! I’ve done well in my computer science classes at school, sure, and I’ve built some projects that my family and friends think are cool, yes, but surely I can’t contribute in any meaningful way to a project with real users, right? Right?
作为一名计算机专业的学生,我经常会听到一些在github参与开源项目是如何如何伟大。许多工作面试将它列为一项资格或者加分(的选项),它可以随意抛在各种研讨会上和学校里当作为交流的主题。听起来很厉害,我应该做那样的事。一个基本的问题是:我实在是一个新手。在学校里我可以在我的计算机专业课程里做得很好,当然,我可以创建一些项目来实现我的亲戚朋友的一些很酷的想法,但是我不能在任何有意义的途径来为真实的用户做贡献,真的吗?真的吗?
Wrong!! There are a variety of different ways to make substantive contributions to open source projects on github, even as a total rookie. You don’t have to be able to read and understand all 100,000 lines of rails or know how to fix that issue with the dynamically stacking grid in bootstrap to be able to do something meaningful that affects real users. There are ways for everyone to contribute.
大错特错!!在github上你可以通过行行色色的方式参与实质性的贡献,甚至完全是一名新手。你没必要去查看或者理解所有100,000条代码或者知道如何修复动态叠加的网路问题,但是可以做一些会影响真实用户有意义的事情。每个人都可以通过多种方式参与。
I recently made my first real contribution to an open source project, and as small as it was, I got a refreshing sense of accomplishment knowing that there were people out there using something that I had written a tiny part of. You have to start small and work your way up. Here is my advice to anyone who wants to contribute to an open source project on github, but has just felt overwhelmed trying:
我最近第一次参与开源项目,虽然它很小。当我知道了人们在用某一样东西做事的时候,这里面有我贡献的很小一部分代码,我得到了一个新鲜的成就感。你可以开始一个小项目并通过自己的努力得到提升。这里是我对任何想在github参与开源项目,但是感到手足无措的朋友所提供的一些建议:
The first step is to find a repository that is looking for pull requests. You can find these in a couple ways. The simplest way is to just read through the readme file. It will often explicitly state that the owner of the repository is eagerly accepting pull requests. If the readme doesn’t say anything about pull requests, you can look at the issues and pull requests for the repository. By checking the dates of the pull requests, and looking through the pull requests that have been closed, you are able to judge how likely it is that the owner of the repository is actively updating it. Bonus points if you can find a project that truly interests you and meets the above qualifications. In my case, I found a rails template for creating new projects where the readme file stated on the first line, in bold: Pull requests are welcome. Nice!
第一步就是找到一个正在为某些需求而实现的库。你可以通过两种途径来找到它。一种最简单的方法是通过阅读它的readme文件。如果readme文件没有任何关于需求的内容,你可以查看这个库的问题和需求。通过检查这些需求的日期,或者寻找一些已经关闭的需求,你能判断出这个需求的提出者是如何在更新它。如果你能找到一些引起你的兴趣或者符合上述资格可多加注意。在我的例子中, 我在readme文件的第一行找到了rails模板来创建一个新的工程。勇敢的说:Pull requests正在欢迎我的到来(注:关于Pull requests http://www.dotblogs.com.tw/larrynung/archive/2012/09/19/74922.aspx)。漂亮!
Now, it’s time to fork and clone the repo. Here is a good guide if you don’t know how to do this.
现在,是时候衍生并克隆这个repo(注:repo只是google用Python脚本写的调用git的一个脚本,主要是用来下载、管理Android项目的软件仓库。)如果你不知道如何做的时候,这里将是一个很好的指导,
Follow any instructions in the readme and make sure that you can configure and run the project on your local system. If you encounter any issues not discussed in the readme, or any errors, this is a great first contribution! You can edit the readme to make it clearer for other contributers who follow you. One of the best ways to start contributing to projects is to make them easier to work with. You can cleanup the readme, edit mistakes in the documentation, or clarify either. It’s a bit intimidating to jump into someone else’s codebase and start making changes right off the bat. These are non-threatening ways to start your open source career. The repository I wanted to work on was well documented and simple enough that there wasn’t anything to help with here.
遵循readme文件的任何说明,然后确定你能够在你自己的系统上配置和运行这个工程。如果你在readme上遇到不能探讨的任何问题,或者错误,那么它将是一个很不错的开始。你可以编辑这个readme,表述清楚后其他参与者将会跟随你的问题。一个最好的方式是参与这个项目并让别人更好地与你一起工作。你可以清理一个这个readme文件,并在文档里写下错误点或者也可以说明一下。这有点吓人地跳进了别人的代码库,并马上开始作出改变。这将会无所畏去开始你的开源事业。我想要工作在一个没有提供其他任何帮助的库上,会有良好和简单的文档记录。
If you still haven’t found a way to contribute yet, read through all the issues in the project. These are suggestions for additions or modifications, sometimes proposed with pseudo code or even a start to the code by someone who just didn’t have the time to finish the fix. You may be able to find something that has been worked on and wouldn’t require dramatic code changes to implement.
如果你仍然没有发现一个途径参与,那么读取所有在工程项目里出现的问题。里面有一些添加或者修改的建议,有时是别人提出的伪代码或甚至是一段代码的开端, 他只是没有时间完成修复。你可能找到一些可以工作的地方, 不需要戏剧性地更改代码来实现。
If you don’t think you can help out with any of the errors, the repo owner may have included a todo section in the readme file, or you may have your own ideas. In my case, I was tired of browsing repositories (even my own sometimes) and seeing .DS_Store being added to them on github. DS_Store gets added to a project when it is viewed in the Finder in OSX, and there’s no reason to push it up to github. I could add it to the .gitignore for the rails template, which would ensure that nobody using the template would accidentally include it in their push. I had my contribution! Now I just had to implement it, which was exceedingly simple. Make sure you follow all the conventions that exist in the project. It is important to look at other pull requests and the readme to see the owner’s preferred format, and to make sure you use the commit message that he or she wants. I followed the above guide to submitting a pull request, added the code:
# DS_Store gets added to project if viewed in OSX Finder
run "echo '.DS_Store' >> .gitignore"
如果对这些错误你认为自己不会有任何的帮助,那么这个repo所有者可能会在readme文件里包含一个todo部分。或者你会有你自己的想法。以我的例子来看,浏览和查看库对我来说是一件很累的事,甚至是我自己的一些想法。DS_Store 将被添加到github。DS_Store用来添加一个项目,OSX finder便可以发现它,并没有任何原因把它挂到github上。我可以将它添加到.gitignore作为rails模板,这将确保没有人使用这个模板会不经意将其包含在他们的推动之内。这样我便会有我的贡献。现在我只需要改进已经存在的简单的问题。请确保你遵循在这个工程里的所有约定。很重要的一个是关注需求和在readme里所属者(所提到)的首选格式,请确保利用这些已经提交的别人所要求的信息。我遵循上述引导去提交一个pull request,并添加如下代码:
# DS_Store gets added to project if viewed in OSX Finder
run "echo '.DS_Store' >> .gitignore"
And an hour later my pull request was merged into a real project that a couple hundred people have starred on github. I felt a renewed sense of purpose to my work. People were using something I had written a (small) part of!
一个小时过后,我的pull request 便被合并到一个真实的项目上,有两百个人在github上开始它。我感觉到了对我的工作来说是一个新的使命感。人们在用的某样东西是我已经写过一小部分组成的!
What has been missing in my experience as a CS undergrad is a sense of tangible accomplishment — that is, I want to know that what I am doing matters. I have learned algorithms, data structures, a couple programming languages, and coded endlessly. I know my stuff pretty well. But what I haven’t had a sense for is my work affecting anyone. I am always left thinking “Why does this matter? Who is this affecting?” At the end of the day, I want to know that my work matters to someone.
我已经在我作为一名CS(ComputerScientific计算机科学)本科生涯里错过了一种有形的成就感—我想要知道我正在做的一些事。我已经学习了算法,数据结构,两种编程语言和无止境的编码。我知道我的作品表现得很好。但是我没有那种我的工作影响到任何人的感觉。我时常在想:“为什么会是这样子,谁在影响着?”最终有一天,我想要知道我的工作将会关系到某些人。
Although it may be intimidating, and certainly has a steep learning curve, contributing to open source projects on github is a great way to achieve that sense of satisfaction.
尽管它可能是强制性的,当然也会有一个陡峭的学习曲线。但在github上参与开源项目是来实现成就感的一个伟大方式。
I am delighted to be graduating this May from USC with a degree in Computer Science/Business Administration. I am currently pursuing full time software engineering positions to start next summer or fall and internship positions during the school year. On my blog, I write about my experiences getting started in the tech industry in ways that I hope are helpful to my peers. I have a passion for learning and building, and I make meaningful contributions to my projects or an open source project on Github every day.
Outside of coding, I love SC Football and the Lakers. I’m hoping that the upcoming football and basketball seasons will erase the memories of the unspeakable things that happened last year. I also love chess, old school hip hop, and video games.
Feel free to contact me on Twitter.
I’m always pushin’ to my Github account.
关于
我很高兴与今年5月毕业于南加州大学,并拿到了计算机科学和商业管理学位,我现在在追求全职的软件工程师职位来开始明年夏季或者秋季,并在学校的时候开始实习了。在我的博客上,我会写一些关于我开始在科技行业道路上的经历,希望能够对我的同行们有所帮助。我现在有(足够的)热情来学习和构建,我将为我的工程项目作出一些有意义的贡献或者是每天在Github 上的开源项目。
除了编码意外,我喜欢加州的足球队和湖人。我希望即将到来的足球和篮球赛季将抹去在去年发生的可怕的事的记忆。我也喜欢国际象棋,old school hip hop,和视频游戏。
闲的时候可以在Twitter联系我。
我总是在跟进我的Github项目。