什么是自由/开源软件
“简单地说,开源/自由程序是这样一种程序:它们的发布协议给用户自由来以任何目的运行程序、来研究和修改程序,以及传播原始的或经过修改的程序(而不需要支付原开发者权利金)。”
——David Wheeler[1]
自由/开源软件已经成为一种国际现象,在短短几年里从少有人知变成了最新的热门词语。然而,对于什么真正构成了自由/开源软件和这个新概念的影响还是缺少理解。为了更好的解释这个现象,我们来研究一下自由/开源软件背后的理念和开发方法。
=自由/开源软件理念=
自由/开源软件世界中有两种主流的理念:自由软件基金会(Free Software Foundation, FSF)的理念和开放源代码运动(Open Source Initiative, OSI)的理念。因为 FSF 的历史比较悠久,并在整个运动中处于先驱的地位(见下一节,“自由/开源运动简史”),我们先讨论 FSF 的理念。
自由软件基金会认为,自由软件应保护用户的如下四大自由:
- 运行任何程序实现任何目的的自由;
- 研究程序如何工作并按个人需要修改的自由。能够获取源代码是其先决条件;
- 分发拷贝以便帮助身边其他人的自由,以及
- 改进程序并向公众发布的自由,以便让整个社群受益。能够获取源代码是其先决条件。[2]
FSF 的理念核心是合作的自由。因为非自由软件限制人们合作的自由,FSF 认为非自由软件是不道德的。FSF 也反对软件专利和除现有版权法以外的其他限制。所有这些都限制了以上列出的用户四大自由。关于软件自由的必要性请参看 FSF 的解释:“Why Software Should Be Free”,在
http://www.fsf.org/philosophy/shouldbefree.html
OSI 的理念则有些不同:
开源背后的基本想法非常简单:当程序员能够阅读,分发,和修改某个软件的源代码时,软件就能进步。许多人改进它,许多人改造它,许多人为它除错。而这可以以一个——在习惯于常规软件开发的缓慢节奏的人看来——惊人的速度发生。[3]
OSI 专注于制造强大可靠的软件的技术价值,因此相比 FSF 更容易被业界接纳。它不像自由软件那样考虑道德要求而是更多地专注于开源软件分布式开发方法的实用优势。
虽然这两种运动的理念有不同,FSF 和 OSI 享有同样的空间并在共同的立场上就软件开发、对抗私有软件,软件专利和类似事由进行合作。如 Richard Stallman 所说,自由软件和开源软件运动是同一阵营内的两个政党。
=自由/开源软件开发方法=
因特网的产生和随之迅速发展的通讯使得自由/开源软件独特的开发模式成为可能。传统软件开发方法和自由/开源软件开发模型之间的差别可以用大教堂和市集[4]的比喻来说明。
传统软件开发方法就像古代建造大教堂的方式。一小队技艺精湛的匠人孤立地设计,一切都是独立地完成。大教堂一旦竣工就几乎不再改动。传统上的软件也是这样生产的。一群群程序员在细致的计划和管理下孤立地工作,直到完成程序并向外界发布。发布后的程序被认为是成品,后续的工作非常有限。
相反,自由/开源软件开发就像一个有机地扩展的集市。最初的商人来到这里,建立起货架并开始做生意。后来的商人们也建立起自己的货架,集市就这样以一种看起来非常纷乱的方式发展。商人们所关心的只是建立起最简单可用的货架以便开始做生意。后来附加的功能都是由环境决定。自由/开源软件的开发也是从类似的无结构的状态开始。开发者向公众发布最初的只有最基本功能的代码,然后根据公众的反馈修改他们的程序。其他开发者也可以加入进来,参与修改或发展现有的代码。假以时日,整套操作系统和应用套件都可以被开发出来并不断演化。
在长期的应用中,集市开发方法已被证明有如下几个优点:
1) 减少重复劳动
通过在开发初期发布程序并允许用户修改和再发布源代码,自由/开源软件开发者可以利用同行的成果。这样做的规模效应是巨大的。与10个公司里各有5名开发者编写一个网络应用程序相比,50名开发者现在有可能合力编写这个程序。减少的重复劳动使得自由/开源软件可以达到闻所未闻的规模,由世界各地的数千名开发者共同开发。
2) 在他人工作基础上发展
由于可以利用现有的源代码继续编写程序,开发的时间缩短了。许多自由/开源软件项目利用其他项目的软件产品实现需要的功能。例如,Apache 万维网服务器使用了 OpenSSL 项目的成果实现加密,而不是自己从头编写加密代码,因而节省了数千小时的编写和测试时间。即使在源码无法直接整合的情况下,开发者也可以通过学习现有代码了解另一个项目如何解决类似的问题。
3) 更好的质量控制
“只要眼球足够多,所有臭虫都好捉”[5]是自由/开源软件界的一句名言,意思是说只要有足够多合格的开发者使用程序并检查其源代码,程序中的错误将能更快地被发现和修正。私有软件也接受错误报告,但由于用户无法看到源代码,他们只能报告错误的症状。而自由/开源软件的用户能够查看源代码,他们不但报告问题,还常常指出原因所在,有时还提供改正方案。这大大减少了开发和质量控制环节的耗时。
4) 减少维护费用
维护任何一个软件包的费用常常相当于甚至超过初始开发的费用[6]。对于单个组织而言,维护软件的工作耗费不菲。而在自由/开源软件开发模式中,维护费用可以由软件的数千名潜在用户分担。软件的功能增强也可以由最精通该领域的组织/个人完成,因而实现了资源的更有效利用。
What is Free/Open Source Software?
“Briefly, OSS/FS programs are programs whose licenses give users the freedom to run the program for any purpose, to study and modify the program, and to redistribute copies of either the original or modified program (without having to pay royalties to previous developers).”
David Wheeleri
Free and Open Source Software (FOSS) has become an international phenomenon, moving from relative obscurity to being the latest buzzword in a few short years. However, there is still a lack of understanding about what really constitutes FOSS and the ramifications of this new concept. To better explain this phenomenon, we will examine the philosophy and development methods behind FOSS.
The FOSS philosophy
There are two major philosophies in the FOSS world: the Free Software Foundation (FSF) philosophy and the Open Source Initiative (OSI) philosophy. We begin with the FSF philosophy, due to its historical precedence (see the following section, “A Brief History of FOSS”) and pioneering position in the movement.
According to the FSF, free software is about protecting four user freedoms:
The freedom to run a program, for any purpose;
The freedom to study how a program works and adapt it to a person’s needs. Access to the source code is a precondition for this;
The freedom to redistribute copies so that you can help your neighbour; and
The freedom to improve a program and release your improvements to the public, so that the whole community benefits. Access to the source code is a precondition for this.ii
At the heart of FSF is the freedom to cooperate. Because non-free (free as in freedom, not price) software restricts the freedom to cooperate, FSF considers non-free software unethical. FSF is also opposed to software patents and additional restrictions to existing copyright laws. All of these restrict the four user freedoms listed above. For a more detailed explanation of why software needs to be free, please refer to the FSF explanation, “Why Software Should Be Free”, found at http://www.fsf.org/philosophy/shouldbefree.html
The OSI philosophy is somewhat different:
The basic idea behind open source is very simple: When programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People improve it, people adapt it, people fix bugs. And this can happen at a speed that, if one is used to the slow pace of conventional software development, seems astonishing.iii
The OSI is focused on the technical values of making powerful, reliable software, and is more business-friendly than the FSF. It is less focused on the moral issues of Free Software and more on the practical advantages of the FOSS distributed development method.
While the fundamental philosophy of the two movements are different, both FSF and OSI share the same space and cooperate on practical grounds like software development, efforts against proprietary software, software patents, and the like. As Richard Stallman says, the Free Software Movement and the Open Source Movement are two political parties in the same community.
The FOSS development method
The FOSS development model is unique and became possible only with the advent of the Internet and the communication boom caused by it. The cathedral and bazaar analogiesiv are used to contrast the FOSS development model with traditional software development methods.
Traditional software development is likened to the way cathedrals were built in ancient times. Small groups of skilled artisans carefully planned out the design in isolation and everything was built in a single effort. Once built, the cathedrals were complete and little further modification was made. Software was traditionally built in a similar fashion. Groups of programmers worked in isolation, with careful planning and management, until their work was completed and the program released to the world. Once released, the program was considered finished and limited work was subsequently done on it.
In contrast, FOSS development is more akin to a bazaar, which grows organically. Initial traders come, establish their structures, and begin business. Later traders come and establish their own structures, and the bazaar grows in what appears to be a very chaotic fashion. Traders are concerned primarily with building a minimally functional structure so that they can begin trading. Later additions are added as circumstances dictate. Likewise, FOSS development starts off highly unstructured. Developers release early minimally functional code to the general public and then modify their programs based on feedback. Other developers may come along and modify or build upon the existing code. Over time, an entire operating system and suite of applications develops and evolves continuously.
The bazaar method of development has been proven over time to have several advantages:
1.Reduced duplication of effort
By releasing programs early and granting users the right to modify and redistribute the source code, FOSS developers reuse the work produced by compatriots. The economies of scale can be enormous. Instead of five software developers in 10 companies writing a single networking application, there is the potential for the combined efforts of 50 developers. The reduced duplication of effort allows FOSS development to scale to massive, unheard of levels involving thousands of developers around the world.
2.Building upon the work of others
With the availability of existing source code to build on, development times are reduced. Many FOSS projects rely on software built by other projects to supply needed functionality. For example, instead of writing their own cryptographic code, the Apache web server project uses the OpenSSL project’s implementation, thereby saving thousands of hours of coding and testing. Even in cases where source code cannot be directly integrated, the availability of existing source code allows developers to learn how another project has solved a similar problem.
3.Better quality control
“Given enough eyeballs, all bugs are shallow”v is an oft-cited quotation in the FOSS world. It means with enough qualified developers using the application and examining the source code, errors are spotted and fixed faster. Proprietary applications may accept error reports but because their users are denied access to the source code, users are limited to reporting symptoms. FOSS developers often find that users with access to the source code not only report problems but also pinpoint the exact cause and, in some cases, supply the fixes. This greatly reduces development and quality control time.
4.Reduced maintenance costs
Maintenance of any software package can often equal or exceed the cost of initial software developmentvi. When a single organization has to maintain software, this can be an extremely expensive task. However, with the FOSS development model, maintenance costs can be shared among the thousands of potential users of a software application, reducing per-organization costs. Likewise, enhancements can be made by the organization/individual with the best expertise in the matter, which results in a more efficient use of resources.
最新评论
2 周 2 天 前
7 周 1 天 前
10 周 4 天 前
20 周 2 天 前
20 周 3 天 前
21 周 5 天 前
24 周 6 天 前
32 周 6 天 前
33 周 3 天 前
33 周 5 天 前