2007年11月1日 星期四

Programming Habits 1

發現一篇關於程式設計的好文章,可以當作做好編程工作的內功心法,試著將其譯成中文,原作著為 Alexey Radul,目前是MIT的博士班研究生,原著請參考附件連結。

Over the years, I have discovered many things about the art of programming. Some I later discovered to be wrong, others I forgot and then rediscovered, others yet were discoveries of the extent of what I must yet discover. I also developed a set of habits in the domain of administering programming projects, whether they be my own, or by a small group, or larger, corporate affairs. These habits are, on the one hand, essential to the success of any software (that is not so small or so lucky that it manages regardless by sheer chance), on the other hand sufficiently easy to describe as to fit in a single essay, and on the third hand not known and loved as universally as they should be. Therefore, I wrote that single essay, and you are now reading it.

數年以來,我發現許多關於程式設計的藝術。 其中有一些是我之後發現是錯誤的,也有些是我忘記了然後又再想起,更有些是從我已知的知識再加以擴充延展而得。 我也在程式專案管理的領域中找到一些好習慣,無論他們是我自己所發現的或藉助一個小組而來,又或是從更大的企業專案中獲得。 這些習慣一方面是任何成功軟體所不可或缺的 (不是那種太小或太幸運而不需特別管理的軟體), 另一方面它們也十分簡單到容易在一篇文章中描述,更另一方面是它們還未受到世人應有的關注和喜愛。 因此,我寫了這一篇論文,而且你現在正在讀著它。

This document is organized as a collection of individual, bite-sized pieces of advice, grouped about six general topics. One reason for this is that they interact with each other, enough that it is impossible to write them down linearly, without forward references. The other reason is to allow you to jump around, to skip the bits you already know, to revisit bits you want to think about again, or to just run down the list without having to sift through the explanations.

這篇文章是以獨立的、片段式的忠告所組成,並且匯聚成六個主題。 這麼做的一個理由是文章內容與彼此充份互動,不可能直線地把他們依順寫下來而不往後方參考。 另一個理由是允許你得以跳躍式閱讀,略過你已經知道的部份,重訪想再複習的地方,或僅僅略讀標題而不詳看內容。

Version Control 版本控制

Version Control is a means to systematically track the history of a piece of software as it is being developed. This task is carried out by a thing called a version control system, such as CVS or Subversion. Said thing maintains, explicitly or otherwise, a history of the code being controlled, and provides operations to acquire (usually called check out) the current version of the code, to check in or commit one's modifications to it, and to update one's working copy to incorporate changes made by others. The version control system also provides functions for examining the history of the code in various ways, for undoing various changes made and/or returning to previous points in the software's history, and for resolving conflicts (two people changing the same code at the same time in different ways).

版本控制意指系統性地追蹤一個軟體的發展歷史。 這個任務由一個叫做版本控制系統,像是 CVS 或 Subversion, 的東西所進行。 明白地或是暗中地維護著程式碼的修訂歷史,而且提供獲得 (通常被稱為簽出)程式碼的目前版本,簽入交付某人的修改,而且合併他人的修改至某人的工作複本上的功能。這個版本控制系統也提供回覆至先前程式版本與解決衝突(二個人同時針對相同的內容作修改)的功能。

~待續

沒有留言: