- Update developers-handbook/introduction to SVN#900 !

PR:		docs/10811
Submitted by:	chinsan.tw at gmail.com
This commit is contained in:
Vanilla I. Shu 2006-07-26 03:55:46 +00:00
parent 47d7f7933f
commit 39b9bf4156
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=28374

View file

@ -2,6 +2,7 @@
The FreeBSD Documentation Project
$FreeBSD$
Original revision: 1.18
-->
<chapter id="introduction">
@ -18,83 +19,65 @@
</author>
</authorgroup>
</chapterinfo>
<title>Introduction</title>
<title>簡介</title>
<sect1 id="introduction-devel">
<title>Developing on FreeBSD</title>
<para>So here we are. System all installed and you are ready to
start programming. But where to start? What does FreeBSD
provide? What can it do for me, as a programmer?</para>
<para>These are some questions which this chapter tries to answer.
Of course, programming has different levels of proficiency like
any other trade. For some it is a hobby, for others it is their
profession. The information in this chapter might be aimed
toward the beginning programmer; indeed, it could serve useful
for the programmer unfamiliar with the &os; platform.</para>
<title>在 FreeBSD 開發程式</title>
<para>好了我們開始吧!我想你的 FreeBSD 已經安裝好了,而且已經準備好要用它寫點程式了吧?
但是要從哪裡開始呢?&os; 有提供寫程式的程式或環境嗎?
身為 programer 的我可以做什麼呢?</para>
<para>本章試著回答你一些問題,當然,單就 programming 程度來說可分很多種層次,
有的人只是單純當興趣,有的則是他的專業,
本章主要內容是針對程式初學者,
當然,對於那些不熟 &os; 的程式開發者而言,本文件內容也是十分實用的。</para>
</sect1>
<sect1 id="introduction-bsdvision">
<title>The BSD Vision</title>
<para>To produce the best &unix; like operating system package
possible, with due respect to the original software tools
ideology as well as usability, performance and
stability.</para>
<para>為了讓你寫出來的程式在 &unix; like系統上具有良好的使用性、效能和穩定性
我們必須跟你介紹一些程式概念(original software tools ideology)。 </para>
</sect1>
<sect1 id="introduction-archguide">
<title>Architectural Guidelines</title>
<title>程式架構指南</title>
<para>Our ideology can be described by the following
guidelines</para>
<para>我們想介紹的概念如下</para>
<itemizedlist>
<listitem><para>Do not add new functionality unless an
implementor cannot complete a real application without
it.</para></listitem>
<listitem><para>在整個程式還沒寫完前,不要增加新的功能。</para></listitem>
<listitem><para>It is as important to decide what a system is
not as to decide what it is. Do not serve all the world's
needs; rather, make the system extensible so that additional
needs can be met in an upwardly compatible
fashion.</para></listitem>
<listitem><para>另外一個重點就是,讓你自己選擇你的程式將會具有何種功能,
而不是讓別人決定,不想要去滿足全世界的需求,除非你想讓你的程式具有擴充性或相容性。</para></listitem>
<listitem><para>The only thing worse than generalizing from one
example is generalizing from no examples at
all. </para></listitem>
<listitem><para>千萬記住:在沒有相關經驗時,參考範例程式碼所寫出來的程式,
會比自己憑空寫出來的好。</para></listitem>
<listitem><para>If a problem is not completely understood, it is
probably best to provide no solution at all.</para></listitem>
<listitem><para>當你寫的程式沒辦法完全解決問題時,最好的方法就是不要試著要去解決它。</para></listitem>
<listitem><para>If you can get 90 percent of the desired effect
for 10 percent of the work, use the simpler
solution.</para></listitem>
<listitem><para>若用 10% 的心力就能輕鬆完成 90% 的工作份量,就用這個簡單法子吧。</para></listitem>
<listitem><para>Isolate complexity as much as
possible.</para></listitem>
<listitem><para>盡可能地簡化問題的複雜。</para></listitem>
<listitem><para>Provide mechanism, rather than policy. In
particular, place user interface policy in the client's
hands.</para></listitem>
<listitem><para>提供機制(mechanism),而非原則(policy)。
比方說,把使用者介面選擇權交由使用者來決定。</para></listitem>
</itemizedlist>
<para>From Scheifler & Gettys: "X Window System"</para>
<para>以上摘自 Scheifler & Gettys 的 "X Window System" 論文</para>
</sect1>
<sect1 id="introduction-layout">
<title>The Layout of
<filename class="directory">/usr/src</filename></title>
<title><filename class="directory">/usr/src</filename> 的架構</title>
<para>The complete source code to FreeBSD is available from our
public CVS repository. The source code is normally installed in
<filename class="directory">/usr/src</filename> which contains the
following subdirectories:</para>
<para>
完整的 FreeBSD 原始碼都在公開的 CVS repository 中。
通常 FreeBSD 原始碼都會裝在 <filename class="directory">/usr/src</filename>
而且包含下列子目錄:
</para>
<para>
<informaltable frame="none" pgwide="1">