by Andrea Bizzotto

通过安德里亚·比佐托(Andrea Bizzotto)

我如何在GitHub Project上获得1,000个星星,以及在此过程中学到的教训 (How I got 1,000 stars on my GitHub Project, and the lessons learned along the way)

I’ve been an iOS developer since 2012. I started writing open source code, to stop re-inventing the wheel and carry over my best code across projects.

自2012年以来,我一直是iOS开发人员。我开始编写开源代码,以停止重新发明轮子,并在项目中保留 我的最佳代码

While some of my early projects had gathered some interest from the community, none of them took off like SwiftyStoreKit did.

虽然我的一些早期项目聚集了来自社区的一些兴趣,他们没有起飞像SwiftyStoreKit一样。

Before I share the secret sauce that made this possible, let me say one thing:

在我分享使这成为可能的秘密调味料之前,让我说一件事:

I want my code to have an impact in the world.

我希望我的代码能够对世界产生影响

I want my code to empower developers, so that they can focus on creating great apps.

我希望我的代码能够增强开发人员的能力,以便他们可以专注于创建出色的应用程序。

If I succeed, all the bug fixes, answered questions and unpaid time I put in will be worth it.

如果我成功了,那么所有的错误修复,已回答的问题以及我投入的无薪时间都是值得的。

Open source software has leverage. My code reaches end-users via multiple apps, and enables fellow developers to be more productive.

开源软件具有杠杆作用 。 我的代码通过多个应用程序到达最终用户,并使其他开发人员的工作效率更高。

How much leverage?

多少杠杆?

According to the Cocoapods Metrics API, SwiftyStoreKit has been downloaded 42302 times and installed into 1194 apps as of October 20th, 2016.

根据Cocoapods Metrics API的数据 , 截至 2016年10月20日, SwiftyStoreKit 已被下载 42302次,并已安装到1194个应用程序中。

For context, AFNetworking (one of the top iOS projects) has been downloaded 21,659,973 times and installed into 413,742 apps.

就上下文而言, AFNetworking (iOS顶级项目之一) 已下载 21,659,973次,并已安装到413,742个应用程序中。

But enough bragging now. ?

但是现在吹牛了。 ?

My point is that you can do this too.

我的观点是也可以这样做。

  • Stay on top of your game.

    保持游戏的领先地位

  • Write your own code and open source it, or contribute to existing projects.

    编写自己的代码并将其开源,或者为现有项目做出贡献。

  • You will grow as a developer and you can really help and benefit others.

    您将成长为开发人员,并且可以真正帮助他人并从中受益。

  • Doing this is great for your CV. It will make you stand out and land better jobs and clients.

    这样做对您的简历很有用。 这将使您脱颖而出,找到 更好的工作和客户

So, how did I get all the ⭐️⭐️⭐️⭐️⭐️?

那么,我是怎么得到所有⭐️⭐️⭐️⭐️⭐️⭐️的呢?

我的食谱 (My recipe)

  1. Choose the right project选择合适的项目
  2. Make it easy to use易于使用
  3. Write the best README you can

    编写最好的自述文件

  4. Share in the right places

    在正确的位置分享

  5. GitHub Trending

    GitHub趋势

  6. Google Search

    谷歌搜索

  7. Keep growing持续增长

Let’s look at these points in detail.

让我们详细看看这些要点。

1.选择合适的项目 (1. Choose the right project)

How do you choose? A good way to start is to solve a problem you have. In my case, I needed an in-app purchase (IAP) framework for one of my apps.

您如何选择? 一个好的开始是解决您遇到的问题 。 就我而言,我需要为其中一个应用程序提供应用程序内购买(IAP)框架。

IAPs are a very popular way of monetising your apps in the App Store.

IAP是在App Store中通过应用获利的一种非常流行的方法。

Unfortunately, Apple’s StoreKit framework is not exactly the easiest thing to work with:

不幸的是,Apple的StoreKit框架并不是最容易使用的东西:

  • Many native APIs to learn, mostly designed in the era of Objective-C.需要学习的许多本机API,大多是在Objective-C时代设计的。
  • Various types of in app purchases.各种类型的应用内购买。
  • Security considerations are very important.安全考虑非常重要。
  • Testing that your purchase flows are correct is hard.很难测试您的购买流程是否正确。

A lightweight IAP framework to make things easier was sorely needed, so SwiftyStoreKit was the right project.

迫切需要一个轻巧的IAP框架来简化操作 ,因此SwiftyStoreKit是正确的项目。

2.易于使用 (2. Make it easy to use)

While I have tried some other 3rd party IAP libraries before, not a single one was as simple as I had hoped for.

虽然我之前尝试过其他一些第三方IAP库,但没有哪一个库比我期望的那么简单。

I started building SwiftyStoreKit when Apple released Swift 2. I did leverage closures, enumerations and the new error handling features of the language to write a clean and easy to use API.

我在Apple发布Swift 2时就开始构建SwiftyStoreKit 。我确实利用语言的闭包枚举和新的错误处理功能来编写简洁易用的API。

With SwiftyStoreKit, you no longer need to explicitly register an observer to the payment operation queue. You just call an asynchronous method for your IAP, and update your application state and UI on completion.

使用SwiftyStoreKit ,您不再需要向支付操作队列显式注册观察者。 您只需为IAP调用异步方法,并在完成时更新应用程序状态和UI。

I borrowed ideas and code patterns from other popular open source projects. And I was happy with the results.

我从其他流行的开源项目中借用了一些想法和代码模式。 我对结果感到满意。

3.编写最好的自述文件 (3. Write the best README you can)

Your README is the landing page of your project. You should spend a lot of time on it.

自述文件是项目的登录页面 。 您应该花很多时间在上面。

It should look good! If you’re building a UI control, include an animated gif, screenshots, or even a link to a prototype. Swift Messages does this very well.

看起来应该不错! 如果要构建UI控件,请包含动画gif,屏幕截图,甚至是原型的链接。 Swift Messages做得很好。

It should include badges so you can quickly glance at the status of the project. A lot of projects use shields.io. So should you.

它应该包括徽章,以便您可以快速浏览项目的状态。 许多项目使用shields.io 。 你也应该这样。

The README should highlight:

自述文件应突出显示:

  • What is the feature set and how to use the project by clearly documenting the API.

    什么是功能集?如何通过清楚地记录API来使用项目。

  • How to install it. Note: Do support as many dependency management tools as possible, not just Cocoapods.

    如何安装 。 注意:不仅要支持Cocoapods,还要支持尽可能多的依赖项管理工具

  • Supported platforms. You guessed it, as many as you can.

    支持的平台 。 您猜对了,越多越好。

  • Supported languages, with links to appropriate branches or tags for different language versions.

    支持的语言 ,带有指向不同语言版本的相应分支或标签的链接。

  • List of known issues (optional). This can serve as a summary of the current issues in the project.

    已知问题列表(可选)。 这可以作为项目中当前问题的摘要。

Additionally, you can add a FAQ section, references to related projects and resources, a list of credits, and the license.

此外,您可以添加FAQ部分,对相关项目和资源的引用,信用列表以及许可证

Very important: if your users open lots of issues asking for clarifications, your README is not good enough. Answer the questions and improve it accordingly.

非常重要 :如果您的用户遇到很多问题需要澄清,则您的自述文件不够好。 回答问题并相应改善。

Include a sample demo. This helps others using your project. It serves as a reference implementation, and shows how to integrate your code inside a real app.

包括一个示例演示。 这可以帮助其他人使用您的项目。 它用作参考实现,并显示了如何将代码集成到实际应用中。

4.在正确的位置分享 (4. Share in the right places)

Some GitHub users maintain lists of popular open source projects by platform or language. I have submitted Pull Requests to include SwiftyStoreKit on Awesome iOS and Awesome Swift.

一些GitHub用户按平台或语言维护流行的开源项目列表。 我已经提交了Pull Requests,以在Awesome iOS和Awesome Swift上包含SwiftyStoreKit

Don’t limit yourself to GitHub:

不要局限于GitHub:

  • Find websites that aggregate open source projects and submit yours to them.查找汇总了开源项目并将其提交给他们的网站。
  • Have your project featured in popular newsletters for your language or platform.使您的项目在您的语言或平台的流行新闻通讯中有特色。
  • Share on social media with relevant developers and accounts. Some good outlets are Product Hunt, Hacker News, Twitter, Reddit.

    与相关的开发人员和帐户在社交媒体上分享。 一些不错的渠道是Product HuntHacker NewsTwitterReddit

5. GitHub趋势=大量的⭐️⭐️⭐️⭐️⭐️ (5. GitHub Trending = Lots of ⭐️⭐️⭐️⭐️⭐️)

If you make it to the GitHub Trending list, your project can take off big time!

如果您进入GitHub Trending列表,那么您的项目可能会花费很多时间!

For me, it was a surprise. A colleague at work told me SwiftyStoreKit was on the Swift weekly trending list on GitHub. From there, I started receiving up to 50 stars a day!

对我来说,这是一个惊喜。 一位在工作的同事告诉我, SwiftyStoreKit在GitHub的Swift 每周趋势列表中。 从那里开始,我每天收到多达50颗星!

How to make it into the GitHub Trending list? Read this.

如何将其纳入GitHub趋势列表? 阅读此 。

Note: Right project + great visibility = a lot of interest. Be prepared to keep up.

注意 :正确的项目+出色的知名度=引起很大兴趣。 准备跟上。

6.谷歌搜索 (6. Google Search)

Google Search has been a big source of organic traffic:

Google搜索一直是自然流量的重要来源:

In fact, searching for “Swift StoreKit” and “Swift In App Purchase” shows SwiftyStoreKit as the second and fourth result respectively:

实际上,搜索“ Swift StoreKit”和“ Swift In App Purchase”分别显示SwiftyStoreKit第二第四结果:

I have not done any keyword research to improve the SEO ranking of my project. It simply made to the top once it became popular.

我没有做任何关键字研究来提高我的项目的SEO排名。 一旦流行起来,它就简单地登顶了。

Still, if you plan a good SEO strategy the results can be great!

不过,如果您计划好的SEO策略,效果可能会很好!

7.保持增长 (7. Keep growing)

Once your project is popular, people will ask a lot of questions and open pull requests.

一旦您的项目开始流行,人们就会提出很多问题并提出要求。

At some point a single contributor ported SwiftyStoreKit to macOS and added receipt verification support. I had no experience in either area, and it felt great that someone was helping to make the project better!

在某个时候,一个贡献者将SwiftyStoreKit移植到了macOS并添加了收据验证支持。 我在这两个领域都没有经验,有人帮助我们使项目变得更好,这真是太好了!

Other valuable contributions followed after that, and I found myself wearing two hats: main developer and maintainer.

此后,还进行了其他有价值的贡献,我发现自己戴着两顶帽子: 主要开发人员维护人员

Being a good maintainer requires good judgement:

成为良好的维护者需要良好的判断力

  • Carefully evaluate feature requests. Aim to keep your API clean and avoid code bloat. This is especially true for SwiftyStoreKit as it is a lightweight framework.

    仔细评估功能请求。 旨在保持您的API整洁并避免代码膨胀。 对于SwiftyStoreKit来说尤其如此,因为它是一个轻量级的框架。

  • For any pull requests that add useful functionality, don’t be afraid to request changes to keep the code clean and consistent.对于任何添加有用功能的拉取请求,不要害怕请求更改以保持代码干净和一致。
  • You can decline pull requests that are out of scope or if the existing code already covers them.您可以拒绝超出范围的拉取请求,也可以拒绝现有请求已包含的请求。
  • Always be courteous to the contributors. If you reject their changes, politely explain why. Don’t be like Linus Torvalds. ?

    始终对贡献者保持礼貌。 如果您拒绝他们的更改,请礼貌地解释原因。 不要像莱纳斯·托瓦尔兹 。 ?

我学到的东西 (Things I have learned)

SwiftyStoreKit has been a great project, and pushed me into the maintainer role for the first time.

SwiftyStoreKit是一个很棒的项目,这使我第一次成为维护者。

It forced me to increase my knowledge about in-app purchases, especially as other people made contributions.

这迫使我增加了对应用内购买的了解,尤其是在其他人做出贡献的时候。

This quote about stewardship feels appropriate here:

关于管理的这句话在这里很合适:

In reality, the biggest challenge to a business open sourcing a project is the obligation of stewardship. This responsibility is mostly a matter of working with people and needs to be managed correctly — especially if a project gains enough popularity. Most projects don’t get large enough for their stewardship to become burdensome. — Artsy Blog

实际上,对企业开放项目采购的最大挑战是管理义务。 这项责任主要是与人合作,需要正确管理,尤其是在项目获得足够人气的情况下。 大多数项目的规模都不足以使他们的管理工作变得繁重。 — Artsy博客

I have not always been able to answer questions on time. I hope to do better in the future, and improve my process in various ways:

我并非总是能够准时回答问题。 我希望将来能做得更好,并通过各种方式改进我的流程:

  • Add a CONTRIBUTING file outlining the recommended way of opening issues and pull requests, as popular open source projects do.与流行的开源项目一样,添加一个CONTRIBUTING文件,概述打开问题和拉取请求的推荐方法。
  • Add a Code of Conduct.添加行为准则。
  • Add code linting.

    添加代码linting 。

  • Add unit test coverage, as I need confidence in making changes. Really, I should have done this a long time ago.

    添加单元测试覆盖率,因为我需要做出改变的信心 。 的确, 我早就应该这样做了

I’m right at the point where SwiftyStoreKit isn’t large enough to become burdensome to manage. I want this project to flourish, and welcome contributions from the community.

我的观点是, SwiftyStoreKit不够大,难以管理。 我希望这个项目蓬勃发展,并欢迎社区的贡献。

学分 (Credits)

Disclosure: A while ago I discovered this great story by Richard Kim on Medium:

披露:不久前,我在媒体上发现了理查德·金 ( Richard Kim)的这个伟大故事:

How To Get Hundreds of Stars on Your Github Project

如何在Github项目中获得数百颗星星

This opened my eyes about what makes an open source project stand out. I have been following his advice since then. It really has paid off and I would like to thank him for the insight.

这使我对使开源项目脱颖而出的东西睁开了眼睛。 从那时起,我一直在听他的建议。 它的确取得了回报,我要感谢他的见解。

结论 (Conclusion)

Open sourcing can be a very rewarding experience, making you grow along with your projects.

开源可以是非常有益的体验,使您与项目一起成长。

I have helped teams in various companies for over 10 years, using a lot of open source software along the way.

在过去的十年中,我一直在使用各种开源软件帮助各种公司的团队。

Writing open source code is a great way of giving back to our great community, and I deeply enjoy the process.

编写开放源代码是回馈我们伟大社区的一种好方法,我对此过程深感兴趣。

这是为了让世界变得更好,一次只写一行代码! (Here’s to making the world better, one line of code at a time!)

2017年2月25日更新:阅读我关于本文的后续工作,该文章有关维护不断发展的开源项目 。 (Update 2017–02–25: Read my follow up to this article about Maintaining a Growing Open Source Project.)

About me: I’m a freelance iOS developer, juggling between contract work, open source, side projects and blogging.

关于我:我是一名自由职业的iOS开发人员,在合同工作,开源,副项目和博客之间徘徊。

I’m @biz84 on Twitter. You can also see my GitHub page. Feedback, tweets, funny gifs, all welcome! My favourite? Lots of ???. Oh, and banana bread.

我在Twitter上为@ biz84 。 您还可以看到我的GitHub页面。 反馈,鸣叫,有趣的GIF,欢迎您! 我的最爱? 很多 ???。 哦,还有香蕉面包。

翻译自: https://www.freecodecamp.org/news/how-i-got-1000-on-my-github-project-654d3d394ca6/

我如何在GitHub Project上获得1,000个星星,以及在此过程中学到的教训相关推荐

  1. 如何在Github Pages上生成部署简历

    一.项目介绍 1.1 背景 每年的金三银四都是人员流动最大,找工作最好的时间段之一.而找工作就不得不需要更新简历,想到自己也会有这么一天,那么就来一起好好写一份简历吧.期间在网上找了不少写简历的资源, ...

  2. html显示宇宙星星,css 如何在html页面上输出一个六角星星呢?

    摘要: 下文讲述使用css脚本在页面上绘制一个六角星星的方法分享,如下所示: 实现思路: 使用一个向上三星形和一个向下三角形进行叠加,即可形成一个六角的星星,如下所示: 例: 使用css绘制一个六角星 ...

  3. 如何在Github上找到“最受欢迎的存储库”? [关闭]

    本文翻译自:How to find out "The most popular repositories" on Github? [closed] Once upon a time ...

  4. 手把手教你如何在GitHub上搭建属于自己的免费网站

    本文主要讲如何在GitHub上搭建属于自己的个人免费网站,如何得到属于自己的域名,免费的服务器,域名怎么和服务器捆绑,打造属于自己的炫酷的网站,可以在上面展示自己的作品,微信,QQ,邮箱,Twitte ...

  5. 如何在GitHub上收集Star?

    https://www.zhihu.com/question/23748804 # 0 链接:https://www.zhihu.com/question/23748804/answer/121413 ...

  6. 如何在github上fork一个项目来贡献代码以及同步原作者的修改

    如何在github上fork一个项目来贡献代码以及同步原作者的修改 作为一个IT人,通过github进行学习是最快的成长手段.我们可以浏览别人的优秀代码.但只看不动手还是成长得很慢,因此为别人贡献代码 ...

  7. 关于如何在github上创建团队开发环境

    今天想写个如何在github上创建团队开发环境的博客.送给那些还不知道如何在github上创建团队开发环境的开发人员. 1.首先,当然你要有个github的账号.具体怎么注册我这里就不说了.可以上gi ...

  8. github 生产环境_如何在GitHub上提高生产力

    github 生产环境 by Darren Burns 达伦·伯恩斯(Darren Burns) 如何在GitHub上提高生产力 (How to be more productive on GitHu ...

  9. 如何在GitHub上发现优秀的开源项目

    如何在GitHub上发现优秀的开源项目 如果作为一名程序员,你连GitHub都没有听过或者用过的话,那真是太遗憾了.GitHub的使用可是程序员在职业生涯中的一项必备技能啊,最近在网上搜了一下,发现有 ...

最新文章

  1. 如果提高声音测距的分辨率?
  2. linux shell seq 序列生成命令 可用于for循环 简介
  3. php首页下雪源码代码,HTML5实现下雪效果的实例代码分享
  4. 瞬间带你了解如何优化 Mysql 数据库,老板再也不担心客户投诉了
  5. Windows操作系统的发展历史
  6. 【java学习之路】(java SE篇)(讨论与思考)关于继承,封装,多态,接口的简单实现与思考
  7. python自动化办公入门书籍-Python如此神奇,让繁琐工作自动化 (文中含Python基础)...
  8. JNDI 是什么,怎么理解
  9. mac安装win7之后鼠标失灵_苹果电脑装win7后键盘鼠标没有反应未响应的解决方法...
  10. 给信号添加指定信噪比的带限白噪声
  11. 考取FRM证书的三大好处,可能你还不知道
  12. R语言使用lm函数构建简单线性回归模型(建立线性回归模型)、拟合回归直线、使用attributes函数查看线性回归模型的属性信息、获取模型拟合对应的残差值residuals
  13. 量化选股策略模型大全
  14. 银企直连增加支付货币的配置方法 :事务FBZP
  15. 5G,上天了!卫星和基站擦出了火花?
  16. PHP单例模式的本质
  17. css中的px与屏幕实际的分辨率的关系
  18. amt是什么意思_变速箱中的at、mt和amt是什么意思啊?
  19. 大数据产业 能否带领内蒙古跨越资源陷阱?
  20. OV5640 sensor 偏绿调试记录

热门文章

  1. 主动式PFC与被动式FPC浅析
  2. 新春快乐!马年大吉!518
  3. CAD教程:CAD联动模式的使用技巧
  4. 关于纯净的win7旗舰版安装后无无线网驱动问题
  5. 2021年我的21个感悟(1/3)
  6. 全云端万能小程序_百搜全云端万能门店小程序v4.0.13五端独家2次开发升级独立版...
  7. 泰克MSO2014B|MSO2024B|MSO2022B混合信号示波器使用教程
  8. html导出excel合并单元格,JS导出EXCEL,动态设置单元格格式,合并单元格(横向或纵向)等操作...
  9. 你怎么看欧阳娜娜空降阿里p8?
  10. 鲁大师升级“Pro”,2B领域谋篇布局