⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csdn_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).htm

📁 csdn10年中间经典帖子
💻 HTM
📖 第 1 页 / 共 3 页
字号:
            <P>"But we need this system immediately or even sooner! How long 
            will it take it I assign ten programmers to it?" 
            <BR>“但是我们等不了那么长时间,越快越好,如果10程序员呢?” </P>
            <P>The master programmer frowned. "In that case, it will take two 
            years." <BR>大师皱了一下眉头说:“那就要花2年”。 </P>
            <P>"And what if I assign a hundred programmers to it?" 
            <BR>“那,100年程序员呢?” </P>
            <P>The master programmer shrugged. "Then the design will never be 
            completed," he said. <BR>大师耸了耸肩说:“那这个项目就永远完不成了。” </P>
            <P>&nbsp;</P>
            <P>--------------------------------------------------------------------------------</P>
            <P>Coding<BR>Book Four<BR>Thus spake the master programmer: 
            <BR>编程大师如是说: </P>
            <P>"A well-written program is its own heaven;<BR>a poorly-written 
            program is its own hell." <BR>“写的好的程序是它自己的天堂,写的不好的程序是它自己的地狱” </P>
            <P>4.1<BR>A program should be light and agile, its subroutines 
            connected like a strings of pearls. The spirit and intent of the 
            program should be retained throughout. There should be neither too 
            little nor too much, neither needless loops nor useless variables, 
            neither lack of structure nor overwhelming rigidity. 
            <BR>一个程序应该是轻灵自由的,它的子过程就象串在一根线上的珍珠。自始至终,目标明确。增之一字节则太长,减之一字节则太短。既没有不必要的循环也没有没有被引用的变量,既不缺少结构化也不至于僵硬呆板。 
            <BR>A program should follow the Law of Least Astonishment. What is 
            this law? It is simply that the program should always respond to the 
            user in the way that astonishes him least. 
            <BR>一个程序应该遵循``最小惊讶原则'',什么是``最小惊讶原则''?就是说一个程序应该最小程度地引起用户的惊讶。 </P>
            <P>A program, no matter how complex, should act as a single unit. 
            The program should be directed by the logic within rather than by 
            outward appearances. 
            <BR>无论一个程序无论有多么复杂都应该是一个单一的整体。程序是被它的内部逻辑所指引而不是它的外观表现。 </P>
            <P>If the program fails in these requirements, it will be in a state 
            of disorder and confusion. The only way to correct this is to 
            rewrite the program. 
            <BR>如果一个程序不能满足所要的需求,它就会处于混乱无序的状态中。唯一的出路就是重写这个程序。 </P>
            <P>4.2<BR>A novice asked the master: "I have a program that 
            sometimes runs and sometimes aborts. I have followed the rules of 
            programming, yet I am totally baffled. What is the reason for this?" 
            <BR>一个初学者问大师:“我的一个程序有时正常有时不正常。我已经完全遵循编程的规则,而且我完全被它弄糊涂了,到底是什么原因会导致这样呢?” 
            <BR>The master replied: "You are confused because you do not 
            understand the Tao. Only a fool expects rational behavior from his 
            fellow humans. Why do you expect it from a machine that humans have 
            constructed? Computers simulate determinism; only the Tao is 
            perfect. 
            <BR>大师说:“你困惑是因为你不了解道。只有傻瓜才会相信只要遵循别人所说就能得到想当然的结果。为什么你要从一个人类自己构造的机器中去得到想当然的结果呢?计算机只是决定论的产物;只有道才是唯一完美的。 
            </P>
            <P>The rules of programming are transitory; only the Tao is eternal. 
            Therefore you must contemplate the Tao before you receive 
            enlightenment." <BR>任何编程的规则都只适合于特定的情况,只有道才是永恒不变的。所以在你受到指引之前要先去思考道。” 
            </P>
            <P>"But how will I know when I have received enlightenment?" asked 
            the novice. <BR>“但是我怎么知道我何时受到指引呢?” </P>
            <P>"Your program will then run correctly," replied the master. 
            <BR>“当你的程序正确运行时”。大师说。 </P>
            <P>4.3<BR>A master was explaining the nature of the Tao to one of 
            his novices, "The Tao is embodied in all software -- regardless of 
            how insignificant," said the master. 
            <BR>初学者请大师解释“道法自然”。大师说:“道存在于任何软件中--无论是多么没有意义的软件”。 <BR>"Is the Tao in 
            a hand-held calculator?" asked the novice. 
            <BR>“难道也存在于手持式的计算嚣里?”,初学者问。 </P>
            <P>"It is," came the reply. <BR>“是的,” </P>
            <P>"Is the Tao in a video game?" continued the novice. 
            <BR>“也在游戏机里?”,初学者又<BR></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE align=center bgColor=#006699 border=0 cellPadding=0 cellSpacing=0 
width=770>
  <TBODY>
  <TR bgColor=#006699>
    <TD align=middle bgColor=#006699 id=white><FONT 
    color=#ffffff>对该文的评论</FONT></TD>
    <TD align=middle>
      <SCRIPT 
src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/readnum.htm"></SCRIPT>
    </TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; Poor <I>(2001-1-12 22:55:54)</I> 
    </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 
      width=532><BR>有意思,只可惜没看全,能不能也给俺一份。(Baihaiber@163.net) 
<BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; WANGYISE <I>(2001-1-12 
      22:50:43)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 width=532><BR>何谓道?世本无道 走的人多了 道自然而生 所以 “道本无道 
      又何来悟道“ <BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; WANGYISE <I>(2001-1-12 
      22:49:45)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 width=532><BR>何谓道?世本无道 走的人多了 道自然而生 所以 “道本无道 
      又何来悟道“ <BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; crazy_ax <I>(2001-1-12 
      21:50:13)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 
      width=532><BR>看起来不舒服?能给我发一份吗?crazy_ax@sina.com <BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; zhangzhonghua <I>(2001-1-12 
      20:59:38)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 width=532><BR>有时候还被撑成10公里那么长!痛苦! 
  <BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; zhangzhonghua <I>(2001-1-12 
      20:57:14)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 
      width=532><BR>不单存在个长度限制,而且字母全改成小写,用的又是看不清楚的楷体小字。这文档中心是谁搞成这样的?痛苦,不如找原文看去。 
      <BR></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#666666 border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TD bgColor=#cccccc colSpan=3><SPAN style="COLOR: #cccccc"><IMG height=16 
      hspace=1 src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/ico_pencil.gif" 
      width=16> </SPAN>&nbsp;&nbsp;&nbsp;&nbsp; Virtual <I>(2001-1-12 
      16:20:59)</I> </TD></TR>
  <TR>
    <TD bgColor=#ffffff colSpan=3 width=532><BR>呼 怎么搞的 又是只得半截 嘿 大家凑合着看吧 另一篇是下节 
      看来这里存在个长度限制 <BR></TD></TR></TBODY></TABLE><BR>
<DIV align=center>
<TABLE align=center bgColor=#cccccc border=0 cellPadding=2 cellSpacing=1 
width=770>
  <TBODY>
  <TR>
    <TH bgColor=#006699 id=white><FONT 
color=#ffffff>我要评论</FONT></TH></TR></TBODY></TABLE></DIV>
<DIV align=center>
<TABLE border=0 width=770>
  <TBODY>
  <TR>
    <TD>你没有登陆,无法发表评论。 请先<A 
      href="http://www.csdn.net/member/login.asp?from=/Develop/read_article.asp?id=3325">登陆</A> 
      <A 
href="http://www.csdn.net/expert/zc.asp">我要注册</A><BR></TD></TR></TBODY></TABLE></DIV><BR>
<HR noShade SIZE=1 width=770>

<TABLE border=0 cellPadding=0 cellSpacing=0 width=500>
  <TBODY>
  <TR align=middle>
    <TD height=10 vAlign=bottom><A 
      href="http://www.csdn.net/intro/intro.asp?id=2">网站简介</A> - <A 
      href="http://www.csdn.net/intro/intro.asp?id=5">广告服务</A> - <A 
      href="http://www.csdn.net/map/map.shtm">网站地图</A> - <A 
      href="http://www.csdn.net/help/help.asp">帮助信息</A> - <A 
      href="http://www.csdn.net/intro/intro.asp?id=2">联系方式</A> - <A 
      href="http://www.csdn.net/english">English</A> </TD>
    <TD align=middle rowSpan=3><A 
      href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010"><IMG 
      border=0 height=48 
      src="CSDN_文档中心_《编程之道》(之前的那篇好象出错了 重贴一次).files/biaoshi.gif" 
  width=40></A></TD></TR>
  <TR align=middle>
    <TD vAlign=top>百联美达美公司 版权所有 京ICP证020026号</TD></TR>
  <TR align=middle>
    <TD vAlign=top><FONT face=Verdana>Copyright &copy; CSDN.net, Inc. All rights 
      reserved</FONT></TD></TR>
  <TR>
    <TD height=15></TD>
    <TD></TD></TR></TBODY></TABLE></DIV>
<DIV></DIV><!--内容结束//--><!--结束//--></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -