admin管理员组

文章数量:1582691

新手开源安卓项目

Starting a completely new open-source project is a lot of work, but it’s much easier once you know the basics, and it’s 100% worth the effort.

开始一个全新的开源项目需要做很多工作,但是一旦您了解了基础知识,这会变得容易得多,而且值得100%的努力。

This article aims to teach you everything there is to know about starting and maintaining an open-source project, but it is not focused on the programming aspect. Rather, you will learn everything from getting contributors for your project to maintaining it over time.

本文旨在教您有关启动和维护开源项目的所有知识,但它并不专注于编程方面。 相反,您将学到一切,从为项目争取捐助者到长期维护它。

为什么要开源? (Why Open Source?)

First of all, why should you even share your project’s source code in the first place? There are many benefits to open-sourcing your project!

首先,为什么首先还要共享项目的源代码? 开源项目有很多好处!

合作 (Working together)

Great minds think alike, and the only way to attract those great minds is to share your work rather than keeping it under lock and key.

伟大的思想者的想法是一样的,吸引这些伟大的思想者的唯一方法是分享您的工作,而不是将其锁定和锁定。

When you invite others to work on your project, your project can improve with the help of more great ideas and code from others.

当您邀请其他人参与您的项目时,您的项目可以在其他更出色的想法和代码的帮助下进行改进。

透明度 (Transparency)

When potential users see that you share your source code, they’ll have a certain sense of security. After all, if you aren’t afraid to share the source, then it’s fairly obvious you aren’t hiding anything malicious.

当潜在的用户看到您共享您的源代码时,他们就会有一定的安全感。 毕竟,如果您不怕共享源代码,那么很明显您没有隐藏任何恶意软件。

Transparency also means that anyone at all can see how you accomplished your project’s goals, and they may even use the same concepts in their own code.

透明还意味着任何人都可以看到您如何实现项目目标,甚至可以在自己的代码中使用相同的概念。

添加到您的简历 (Adding to your résumé)

By making your project open-source, you’re allowing potential employers (and anyone else) to see how you work.

通过使您的项目开源,可以使潜在的雇主(和其他任何人)了解您的工作方式。

Showing that you have a great open-source project under your belt can help you get a great job in the future.

表明您拥有一个出色的开源项目可以帮助您将来获得出色的工作。

您要提供什么? (What Are You Providing?)

Before you even begin work on your project, there are two questions you should ask yourself. The first is, “What will this project accomplish?” Begin with the end in mind and have a clear vision of what your work will actually do.

在开始进行项目之前,您应该问自己两个问题。 第一个是“该项目将完成什么?” 从结局开始,对您的工作实际有清晰的认识。

The second question you need to ask yourself is, “Why do people need this?” Your project should provide some sort of value to others.

您需要问自己的第二个问题是:“为什么人们需要这个?” 您的项目应该为他人提供某种价值。

不只是复制 (Don’t just copy)

An important part of providing a valuable resource is that it shouldn’t be a copy of another project.

提供有价值的资源的重要部分是,它不应该是另一个项目的副本。

If another project with the same general features as your idea already exists, but isn’t well maintained or updated, you may still be providing value to your users! The same applies if you want to add or change features to improve on the concept of another similar project.

如果已经存在具有与您的想法相同的一般功能的另一个项目,但是没有很好地维护或更新,则您可能仍在为用户提供价值! 如果要添加或更改功能以改进另一个类似项目的概念,则同样适用。

奠定基础 (Laying the Groundwork)

You can’t expect everyone to understand what you’re trying to accomplish without a proper starting point. You have to lay some of the groundwork first if you expect others to be able to contribute.

如果没有适当的起点,您不能指望每个人都能理解您要实现的目标。 如果您希望其他人能够做出贡献,则必须首先奠定一些基础。

选择一个名字 (Choosing a name)

The name you pick for your project will represent your work for all to see. It should unique, easy to remember, and related to the project’s goal.

您为项目选择的名称将代表您的作品,所有人都可以看到。 它应该是唯一的,易于记忆的并且与项目目标相关。

For example, Sentry monitors apps for crashes and bugs. The name Sentry is easy to remember and clearly represents what the app does.

例如, Sentry监视应用程序的崩溃和错误。 Sentry这个名字很容易记住,并且清楚地代表了应用程序的功能。

一切都以自述文件开头 (It all starts with a README)

Start off by making a detailed and concise README file that tells the most important things about your project. Most people who see your project will start with the README, so it’s important that you share all you need to share.

首先制作一个详细,简洁的自述文件,该文件讲述有关项目的最重要内容。 大多数看到您的项目的人都将从README开始,因此共享您需要共享的所有内容很重要。

You’ll know your README is complete when someone is able to use the basic functionality of your project without looking at the code or too much documentation.

当某人能够使用项目的基本功能而无需查看代码或过多的文档时,您就会知道README是完整的。

The README should include what your project is, what it looks like in action, how to use it, and any other relevant details. Just remember that the README should be as short as it can be without being any shorter. You may also want to add in details on contributing and license information.

自述文件应包括您的项目是什么,实际情况如何,如何使用它以及任何其他相关细节。 请记住,自述文件应尽可能短,而不要短一些。 您可能还需要添加有关贡献和许可证信息的详细信息。

The Make a README website has a template you can use to get your README file started.

Make README网站上有一个模板,可用于启动README文件。

开始代码 (Getting the code started)

It’s a good idea to start coding yourself so others know a bit more about your project, what to expect, and if they want to lend a hand.

开始编写自己的代码是个好主意,这样其他人可以对您的项目有更多了解,可以期望什么,以及他们是否愿意伸出援手。

This also means you’ll be able to publish a beta-type version of your project to increase visibility.

这也意味着您将能够发布项目的Beta版,以提高可见性。

Begin with well-formatted code and even throw in some comments. This will help others understand the thinking that went into the code as well as what the purpose of the project is.

从格式正确的代码开始,甚至添加一些注释。 这将帮助其他人理解代码中的想法以及项目的目的。

选择许可证 (Picking a license)

Without a license, no one will really be able to contribute to your project. A great resource for choosing a license is the website Choose an open source license by GitHub, which gives you great info on each license option available to you.

没有许可证,没有人真正能够为您的项目做出贡献。 选择许可证的绝佳资源是网站GitHub的“选择开源许可证” ,它为您提供了有关每个可用许可证选项的详细信息。

The most common licenses used in open-source software are the MIT License, the Apache License 2.0, and the GNU General Public License v3.0. Each license features unique permissions, conditions, and limitations, so it’s always best to look carefully for the license that’s right for your project.

开源软件中最常用的许可证是MIT许可证 , Apache许可证2.0和GNU通用公共许可证v3.0 。 每个许可证都具有独特的权限,条件和限制,因此始终最好仔细查找适合您的项目的许可证。

贡献准则 (Contributing guidelines)

It’s important to establish clear contributing guidelines so that others know how they can help out with your project. This is often placed in a file named CONTRIBUTING or CONTRIBUTING.md in the root directory to make the guidelines easy to find.

建立明确的贡献准则非常重要,这样其他人才能知道他们如何为您的项目提供帮助。 通常将其放在根目录下的名为CONTRIBUTING或CONTRIBUTING.md的文件中,以使准则易于查找。

You may want to include information telling:

您可能需要包括以下信息:

  • How to file a bug report

    如何提交错误报告
  • How to request a feature

    如何申请功能
  • How to set up a development environment and run tests

    如何设置开发环境并运行测试

Your contributing guidelines should be kept short and sweet, while still mentioning everything that needs to be included.

您的贡献准则应简短明了,同时还要提及所有需要包括的内容。

记录您的工作 (Documenting your work)

Even if you don’t start off with much code, it’s important to document everything you do from the start.

即使您没有太多的代码,从一开始就记录您所做的一切也很重要。

You can even make your documentation part of your project’s source code so that other contributors can add to it when they add to the code.

您甚至可以将文档作为项目源代码的一部分,以便其他贡献者在添加到代码中时也可以将其添加到项目中。

Tools like GitHub Pages and Read the Docs allow you to host documentation on a nice-looking site for no cost at all.

诸如GitHub Pages和Read the Docs之类的工具使您可以免费在美观的网站上托管文档。

主持项目 (Hosting the Project)

Once you have a project ready to share, you’ll need a place to share it. The most commonly used site for this is GitHub, although there are many other options such as GitLab or Bitbucket.

准备好共享项目后,就需要一个共享空间。 最常用的站点是GitHub ,尽管还有许多其他选项,例如GitLab或Bitbucket 。

All of the sites listed are fairly easy to use, but you’ll probably need to learn a bit about Git if you want to start an open-source project. You can take a look at the in-depth article “Getting started with Git and GitHub: the complete beginner’s guide” by Anne Bonner for a fantastic tutorial on how to get started with Git and GitHub.

列出的所有站点都非常易于使用,但是如果要启动一个开源项目,可能需要对Git有所了解。 您可以阅读深入的文章“ Git和GitHub入门:完整的初学者指南 ” 安妮·邦纳 ( Anne Bonner)撰写的精彩教程,介绍如何开始使用Git和GitHub。

引起注意 (Drawing Attention)

A project can only grow if other people want it to. You have to share your idea with the world so you can get a few contributors and users to get your project started.

一个项目只有在其他人希望的情况下才能发展。 您必须与世界分享您的想法,以便吸引一些贡献者和用户来启动您的项目。

Once your project gets going, you may want to share the news on Reddit, Hacker News, Quora, or other sites to attract a few users who are interested in what you have to offer.

一旦项目开始,您可能希望在Reddit , Hacker News , Quora或其他站点上共享新闻 ,以吸引一些对您所提供的产品感兴趣的用户。

GitHub问题 (GitHub issues)

One neat feature of GitHub is the Issues section. From GitHub’s guide page on Issues:

GitHub的一项简洁功能是“ 问题”部分。 从GitHub关于问题的指南页面中:

“Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. They’re kind of like email — except they can be shared and discussed with the rest of your team. Most software projects have a bug tracker of some kind. GitHub’s tracker is called Issues, and has its own section in every repository.”

“问题是跟踪项目任务,增强功能和错误的好方法。 它们有点像电子邮件,但可以与您的团队其他成员共享和讨论。 大多数软件项目都有某种错误跟踪器。 GitHub的跟踪器称为Issues ,并且在每个存储库中都有其自己的部分。”

One advantage of using GitHub Issues is that you can add the “good first issue” and “help wanted” labels to make issues more discoverable.

使用GitHub Issues的一个优势是您可以添加“好第一期”和“需要帮助”标签,以使问题更易于发现。

Sites like Up For Grabs (which is even open-source itself!) even aggregate issues with these labels to encourage others to contribute to new projects. This is one big way to get some collaborators on your project who want to help out.

诸如Up For Grabs之类的网站(甚至本身就是开源的 !)甚至将这些标签的问题汇总在一起,以鼓励其他人为新项目做出贡献。 这是让您的项目中的一些合作者想要帮助的一种重要方法。

持续的维护与发展 (Continued Maintenance and Development)

Once your project picks up more steam, there’ll be more to it than just writing code. If all goes well, you’ll end up growing a sizable community around your project.

一旦您的项目蒸蒸日上,除了编写代码之外,还有更多的工作要做。 如果一切顺利,您最终将在您的项目周围建立一个相当大的社区。

With a large community, you have to be professional and polite at all times. After all, the more people stay enthusiastic about your project, the more contributors you’ll get and the more your work will grow. After some time, your project will grow to be the work of an entire community, not just you.

在庞大的社区中,您必须时刻保持专业和礼貌。 毕竟,更多的人对您的项目充满热情,您将获得更多的贡献者,并且您的工作将会增长。 一段时间后,您的项目将成长为整个社区的工作,而不仅仅是您自己。

Here’s a good guide on “Best Practices for Maintainers.”

这是有关“ 维护人员最佳实践 ”的好指南。

结论 (Conclusion)

Starting an maintaining an open-source project can be a lot of work, but it’s worth it. By sharing a new project with the world, you could be helping so many people, not just yourself. These projects can then grow to become something bigger and better, and you can get some happiness from knowing that you started something that people can depend on and help with.

开始维护一个开源项目可能需要很多工作,但这是值得的。 通过与世界共享一个新项目,您可以帮助很多人,而不仅仅是您自己。 这些项目可以成长为更大更好的项目,并且知道自己开始了人们可以依靠和帮助的事情,就可以从中获得快乐。

资源资源 (Resources)

  • Open Source Guides: Fantastic guides to expand even more on the topics in this article

    开源指南 :出色的指南,可扩展本文的主题

  • GitHub Help: All you’ll need to learn how to use GitHub

    GitHub Help :所有您需要学习如何使用GitHub的知识

翻译自: https://medium/better-programming/how-to-start-a-new-open-source-project-9dcc2be49e08

新手开源安卓项目

本文标签: 开源项目新手