从零开始成为一名开源程序员

Looking out at the world of technology is exciting. It has a lot of moving parts, and it seems the further you dig into it, the deeper it gets, and then it's turtles all the way down. For that very reason, technology is also overwhelming. Where do you start if you're keen to join in and help shape the way the modern world functions? What's the first step? What's the twentieth step?

The first thing to understand is that open source is open. This might seem obvious, but the phrase "open source" is thrown around so often these days that sometimes people forget it's just a description of a cultural phenomenon, not the name of a Fortune 500 company. Unlike other jobs or groups, you don't have to interview or complete a sign-up sheet or registration form to become an open source programmer. All you do to become an open source programmer is programand then share your code, ideally with a guarantee that the code remains open regardless of how it's used.

That's it. You're an open source programmer!

You now have your destination, but what about the logistics?

Skill trees

Have you ever played an RPG? In these games, there's the concept of linear "skill trees". When you play, you acquire basic skills that you build upon to "level up" and get new skills, which you use to acquire new ones and "level up" again. And so on.

Becoming a programmer is a little like adding to your skill tree. You get some basic skills, you practice them until they're second nature, and then you get new skills, and so on, and then you are progressing along your chosen skill tree.

You'll find you'll encounter more than one skill tree. Open source has many entry points and many individuals with their own unique strengths, talents, and interests. However, certain definable skills contribute to being a great programmer, and developing them is an important part of participating successfully in open source projects.

Scripting

Scroll--How to program

One of the biggest advantages of a POSIX system like Linux or BSD is that every time you use your computer, you've got the opportunity to practice a little programming. If you have no idea where to start programming, then begin with how you work. Find repetitive tasks that you perform every day, and start automating them. This step can be something simple, like converting or re-sizing batches of photos, checking email, or even just getting the five applications you use each day launched with one click. Whatever the task, take the time to automate something for yourself.

If you can do something from a terminal, then it can be scripted. Learn bash ortsch and let system scripting be your introduction to writing code and to how your system works.

Sysadmin

Caesar head

From this point, you can continue on to become a programmer, or you can cross over to a different skill tree entirely: that of systems administration. The two careers have some overlap (a good sysadmin ought to have a little programming experience, and should be ready to wield Python, Perl, or a similar language to develop unique solutions), but a programmer is someone who builds with code day in and day out.

Programmer

Wizard hat--How to program

Open source is a great way to learn programming skills; you get to look at other people's code, borrow ideas and techniques, learn from their mistakes, get a critique of your own code, and if you use Linux or BSD, the entire stack is open to you—as far as the eye can see, it's all yours for the taking.

That's what the travel brochure says, anyway. The reality is that you're probably not going to start digging into the source code of a project and come out the other side with the sudden realization that you accidentally learned to code. Programming is hard work. If it wasn't, everyone would do it.

Luckily, programming is logical and structured, so it builds upon itself. You might not fall into programming, but the more you poke at it, the more you start to understand it.

Understanding how to control and automate a computer is one thing, but knowing how to write the stuff that other people want to automate is the point that you cross over into the realm of programming.

Polyglot

Parrot--How to Program

All programming languages aim to do the same thing: make computers compute. Choosing one is a mix of what you think you want to do, what (if any) language is in common use in the industry you are targeting, and what language you happen to best understand given the materials available to you and your learning style.

With a little bit of research, you can get a good idea of a language's complexity, and then decide what to try first based on your own level of comfort.

Another way to choose a language is to look at your goal, find out if other people are working toward the same thing, and then look at what they're using. If your aim is to develop desktop tools, you might learn C and Vala for one, or C++ for another.

At the end of the day, though, don't get overwhelmed with all the available choices. Languages stack well. Once you learn one programming language well enough to fall back on it when you need to get something done, you'll find it a lot easier to pick up another one. A "language" is just a set of syntax and rules, after all; learn one, and it's fairly trivial to superimpose new rules over the same theory.

The primary goal is to learn a language. Pick the one that makes sense to you or the one that's most appealing to you or the one that your friends are using or the one that has the documentation you understand best, but focus on one and learn it.

Open Whazzit?

Whether or not you're just learning to program or you're an old pro just getting into open source, before jumping head first into this brave new world, you need to learn what makes open source, well, "open source."

Claiming software is open source is the latest marketing approach some software vendors are wielding. Unfortunately, some vendors just mean they've released a public API or that they're receptive ("open") to suggestions from their users. The word "open" isn't trademarked and no committee governs how or when the word is used. However, the Open Source Initiative, co-founded by the late Ian Murdock of Debian Linux, defines what open source means (licenses that "allow software to be freely used, modified, and shared"), and formally approves and trackslicenses deemed truly "open."

Apply one of those licenses to your code, and you're an open source programmer. Congratulations!

Community

Community--How to program

Ask any open source enthusiast and they'll tell you the most important thing about open software is the people. Without motivated contributors, software stagnates. Computers need users, bug reporters, designers, and programmers.

If you want to join or cultivate the global open source community, you need to become a part of the community, even if you're not a people person. This usually encompasses subscribing to mailing lists, joining IRC channels, or hopping onto forums, and starting at the bottom of the totem pole. Any mature community has been around long enough to see prospective members come and go, so you have to understand that when you saunter in ready to change their world, before they all agree to your master plan, you have to prove that you're not going to disappear after three months when something sparkly on the other side of the Net catches your eye. Be ready for the long haul if you aspire to something big.

If you're just around to lend a hand, then that's acceptable, too. I myself have submitted small patches to projects, and sometimes the project leads think these are good and other times they reject them. If the rejected patch is important to me, I maintain it for myself and clients, and otherwise I move forward.

It's part of the process.

Where do these communities exist? It depends on the project. Some projects have dedicated community managers who help bring everyone together in public spaces for everyone to see. Other projects form around forums, use mailing lists, or even issue trackers. Look for the communities, and you'll find them.

Just as importantly, though, look at the code! They call it open "source" for a reason, so be sure to find the code and take a peek. Even if it's still above your level of full comprehension, it gives you an idea of how the software project organizes itself and possibly where they might need assistance. How is the code organized? Does the code have comments? Is it tidy with a consistent style? Review the documentation, particularly the README, LICENSE, or COPYING files.

Don't under estimate the importance of following through on the promise of open code. It's the reason you're getting involved, so look at it critically from every angle to see what you can learn from it and how you might contribute.

Finding the best community is a lot like dating, but specifically it's like dating inGroundhog Day. It takes time, and the first couple of tries might fall flat. The more you go through the process, the more you start to feel déjà vu. Eventually, though, you learn enough about yourself and your interests, you find the right combination of other people, and you settle in somewhere. Have patience, and let it happen naturally.

Actions > Words

Wingfoot--How to Program

Being an open source programmer is about the code (the "source" part of open source), and ideas are a dime a dozen. What speaks volumes is producing. You need to show you know what you're doing, willing to get your hands dirty, spend your time on the project, and can back up your ideas with something that compiles.

To do that effectively, of course, you should do your homework on the project itself, including learning how a project prefers to receive submissions and which branches are the stable and development ones.

To approach getting started:

  • Get familiar with a project and its development culture, and be respectful of it.
  • Write patches, bug fixes, or small, requested features, and submit them.
  • Don't get discouraged if your work is rejected. You are not being rejected personally, your work was evaluated and the development team made a call.
  • Don't get discouraged if your work is accepted, but changed beyond recognition.
  • Rinse, repeat, and try new and bigger changes.

Leaderboard--How to program

There is no leaderboard in open source. Some sites try to make it seem like they have such a thing, but there isn't one. Participate, contribute, add to the pool of ideas, add to the stash of commits, and you're doing it right.

Develop

Treasure Map--How to Program

Programming in any environment is always, ultimately, about personal development. Whether you're searching for new ways of solving problems, looking for new ways to optimize code, learning a new language, or learning how to deal with other people better, you never want to stop growing. The more you develop yourself, the more a project benefits.

Growth, both personal and professional, is the final one on the list, but it actually persists through the entire process. Becoming an open source programmer isn't like getting a government job; it's a process. You learn, you share, you keep learning, you get distracted and write a Game of Life implementation, and you learn some more.

This process is what open source is about: the freedom to develop, in every sense of the word. So go find your skill tree, choose your super powers, pay your dues, level up, and get involved.


译文:

探索技术世界,是一件非常令人兴奋的事情。你会发现有非常非常多的领域,等待你去学习,去深挖。如果有兴趣参与和帮助创造更好的功能,加入到开源的队伍当中,你知道要从哪里开始吗?第一步该做什么?第二十步又是什么?

首先要明白,开源是开放的。这听起来似乎是句废话,但现实中有很多人恰恰就忘记它只是一个文化现象的描述,而不是一家500强公司的名字。不需要去面试或完成注册表或注册表单才能成为开源程序员。只需要做好程序,然后共享代码。在理想情况下保证代码能保持开放,不管它被如何使用。

就是这样,你就是一名开源程序员!

那现在目标已经有了,过程要怎么样呢?

第一步:找到和选择自己的 Skill trees (技能树)

玩过 RPG 游戏的人应该知道,这些游戏中会有“技能树”的概念。 最开始的时候,会获得基础技能,然后不断“升级”和获得新技能,再用新技能获取更新的技能……

成为一名程序员有点像往你的技能树上不断添加新技能的过程。 先得到一些基本的技能,持续练习直到它们进入第二阶段,然后获得新的技能。最终沿着你选择的技能树不断进步。

在这个过程中你会遇到许多技能树。就像开源有很多切入点,每个人都有自己独特的优势、才能和兴趣。 但是,某些积累下来的悟到的心得技能有助于你成为一名伟大的程序员,并且它们是成功参与到开源项目的重要组成部分。

第二步:编程,从 Scripting 开始

POSIX 系统(如 Linux 和 BSD )的优点之一是每次使用电脑时,都有机会练习一些小编程。 如果不知道要从哪里开始学习编程,那么就从你的工作方式开始。找出自己每天需要重复执行的任务,开始自动执行。 这个步骤其实很简单,例如批量转换或调整照片,检查电子邮件,甚至只是每天自动点击启动五个应用程序。反正不管是什么任务,花时间为自己的东西自动化。

如果你可以从终端做一些事情,那么它可以脚本化。 学习 bash 或 tsch ,让系统 Scripting 引导你学习如何编写代码和告诉你系统如何工作。

第三步:找准自己的发展方向

从这里开始,你可以选择继续成为一个程序员,或者可以完全跨越到另一个不同的技能树:系统管理。 这两个职业有一些重叠,一个好的系统管理员应该有一点编程经验,可以随时准备好使用 Python、Perl 或类似的语言来开发独特的解决方案,但程序员更偏向是一个日夜以代码为伴的人。

第四步:学习别人的开源代码

开源是学习编程技巧的好方法, 你可以查看其他人的代码,借鉴别人的想法和技巧,从他们的错误中学习,积累自己的代码经验,如果你使用 Linux 或 BSD ,整个堆栈是开放的 - 只要是眼睛可以看到的,都是你可以采用的。

实际情况是,你可能不会去深挖项目的源代码,而是从侧面突然意识到自己意外地学会了代码。 编程是一项艰苦的工作。 如果不是的话,所有人都去做了。

但又幸运的是,编程是逻辑化和结构化的。你不会深陷其中,因为越捅破它,就会越理解它。

理解如何控制和自动化电脑是一回事,但知道如何编写其他人想要自动化的东西是你跨入编程领域的关键点。

第五步:选择最适合自己的语言

所有编程语言的目的都是做同样的事情:让电脑计算。选择一个你想做的、你想针对的行业中常用的语言,并考虑是否现有的资料和你的学习方式能让自己更好地去理解它。

通过一点点研究,你会得到一个关于语言复杂性的参考,然后根据自己当前的水平尝试最适合自己的。

选择一种语言的另一种方法是观察你的目标,找出朝着同样的方向努力的其他人,然后看看他们在使用什么。如果你的目的是开发桌面工具,你可能会学 C 和 Vala 中的一个,或 C ++。

一旦你学会了一种编程语言,当你需要完成一些工作时,你会发现拿起另一种语言会比较容易。毕竟“语言”只是一套语法和规则,学会一个,在同一个理论上叠加新规则是相当微不足道的事情。

所以说,最主要目标是先去学习一门语言。选择一个有意义的,或者最有吸引力的,或者你的朋友正在使用的,或者有你最能读懂文档的,然后集中注意力,专注去学习它。

第六步:了解开源背后的知识,如协议

不管是正在学习编程的新人,还是准备进入开源的老司机,在跳入这个新世界的大门之前,你需要了解什么是开源。

“Open”一词不是商标,没有委员会管辖要如何或何时才能使用这个词。 然而,由 Debian Linux 已故的 Ian Murdock 共同创办的开源计划(Open Source Initiative)定义了开源的含义(允许软件被自由使用、修改和共享的许可),正式认可和履行 licenses 才被认为是真正的 “Open”。

将其中一个许可证应用于你的代码,你就是一个真正的开源程序员。 恭喜!

第七步:加入开源社区,了解开源项目运作

做开源项目最重要的就是人,如果没有积极的贡献者,项目就很容易停滞。

如果想加入一个开源社区,你需要成为这个社区的一部分。这通常包括订阅邮件列表,加入 IRC 频道,或跳到论坛,并从团队的底部干起。任何成熟的社区都已经发展了足够长的时间,他们看惯了潜在的成员来来去去,所以你必须明白,当你在准备改变他们的世界,让他们都同意你的规划之前,你必须先证明你不是闹着玩的,不会在三个月后消失。如果你想把事情做大,就准备好足够的时间吧。

如果你只是想借力,那也是可以被接受的。比如向项目提交小补丁,有时项目管理会认为这些都是好的,有时候会被拒绝。如果被拒绝的补丁对自己来说很重要,可以自己去维护它。因为它也是过程的一部分。

这些社区在哪里存在?这取决于项目。一些项目有专门的社区管理者,会在公共场所发布让每个人看到。还有一些项目围绕论坛、使用邮件列表,甚至是问题跟踪等等。

此外,这里还有一个同样重要的步骤,那就是看代码!既然是开源,就务必去多找代码查看。即使它仍然高于你的理解水平,但它会提供给你如何自己组织一个项目的经验,以及目前这个项目可能需要的帮助方向。代码是如何组织的?代码有注释吗?风格是否整洁?多查看文档,特别是 README、LICENSE 和 COPYING 文件。

不要低估开放代码的承诺的重要性。这是你参与的原因,所以从各个角度去想想你可以从中学到什么,以及你要如何贡献。

第八步:少说多写,为开源项目做贡献

作为一个开源程序员,想得多不如代码敲的多。你需要告诉自己在做什么,愿意把时间花在项目上,并备份你的想法和编译的东西。

为了做到这一点,你应该对项目本身做一些“家庭作业”来提高自己对它的熟悉度。包括学习一个项目怎么接受别人的提交,哪些分支是稳定的等等。

准备开始:

  • 熟悉项目及其发展文化,并尊重它。
  • 编写补丁,bug 修复或一些小的功能,并提交。
  • 如果你的工作被拒绝,不要灰心。 你的能力不会被拒绝,你做的工作会被评估,开发团队会和你电话联系。
  • 如果你的工作被接受,改变就建立在认可之上。
  • 不断重复,并尝试新的和更大的变化。

开源中没有排行榜。只有你做的所有的正确的参与和贡献,比如添加到 pool 中的想法,添加到 commits 中的 stash。

第九步:扩展新的技能,持续成长

不管是在任何环境中的编程最终总是会涉及到个人发展。 无论你是寻找新的方法来解决问题,寻找新的方法来优化代码,还是学习一种新的语言,或学习如何更好地与其他人打交道,你永远都不会想停止成长。 把自己开发的越全,项目就越有利。

成长,无论是个人和专业,最后呈现在一个 list 上,但它实际上持续整个过程。 成为开源程序员不像是一份稳定的政府工作,而更像是一个不断分裂的过程。 学习,分享,再学习,分心去做一件其他的事情,然后学习更多。

以上就是关于开源的过程: open source,自由发展,每一个字的意义其实就是开源最终的意义。 所以快去找你的技能树,选择你最强的能力,支付你在这个过程中的学费(或时间、或金钱),升级,并参与!


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值