﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-冉翔的技术专栏-文章分类-10.Other</title><link>http://www.blogjava.net/ranxiang/category/4390.html</link><description>关注于J2SE，J2EE以及开源方面的技术。</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 22:39:46 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 22:39:46 GMT</pubDate><ttl>60</ttl><item><title>注重实效的程序员之快速参考指南 - The Pragmatic Programmer Quick Reference Guide</title><link>http://www.blogjava.net/ranxiang/articles/30317.html</link><dc:creator>冉翔</dc:creator><author>冉翔</author><pubDate>Sat, 11 Feb 2006 19:06:00 GMT</pubDate><guid>http://www.blogjava.net/ranxiang/articles/30317.html</guid><wfw:comment>http://www.blogjava.net/ranxiang/comments/30317.html</wfw:comment><comments>http://www.blogjava.net/ranxiang/articles/30317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/ranxiang/comments/commentRss/30317.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/ranxiang/services/trackbacks/30317.html</trackback:ping><description><![CDATA[<P><STRONG>1.关心你的技艺<BR>&nbsp; Care About Your Craft</STRONG><BR>&nbsp; 如果你不在湖能否漂亮的开发出软件，你又为何要耗费生命去开发软件呢？</P>
<P><STRONG>2.思考！你的工作<BR>&nbsp; Think! About Your Work</STRONG><BR>&nbsp; 关掉自动驾驶仪，接管操作。不断地批评和评估你的工作。</P>
<P><STRONG>3．提供各种选择，不要找蹩脚的借口<BR>&nbsp; Provide Options, Don't Make Lame Excuses</STRONG><BR><STRONG>&nbsp; </STRONG>要提供各种选择，而不是找借口。不要说事情做不到；说明能够做什么。</P>
<P><STRONG>4.不要容忍破窗户<BR>&nbsp; Don't Live with Broken Windows</STRONG><BR><STRONG>&nbsp; </STRONG>当你看到糟糕的设计、错误的决策和糟糕的代码时，修正它们。</P>
<P><STRONG>5.做变化的催化剂<BR>&nbsp; Be a Catalyst for Change</STRONG><BR><STRONG>&nbsp; </STRONG>你不能强迫人们改变。相反，要向他们展示未来可能会怎样，并帮助他们参与对未来的创造。</P>
<P><STRONG>6.记住大图景<BR>&nbsp; Remember the Big Picture</STRONG><BR><STRONG>&nbsp; </STRONG>不要太过专注于细节，以至忘了查看你周围正在发生什么。</P>
<P><STRONG>7.使质量成为需求问题<BR>&nbsp; Make Quality a Requirements lssue</STRONG><BR><STRONG>&nbsp; </STRONG>让你的用户参与确定项目真正的质量需求。</P>
<P><STRONG>8.定期为你的知识资产投资<BR>&nbsp; Invest Regularly in Your Knowledge Portfolio</STRONG><BR><STRONG>&nbsp; </STRONG>让学习成为习惯。</P>
<P><STRONG>9.批判地分析你读到的和听到的<BR>&nbsp; Critically Analyze What You Read and Hear</STRONG><BR><STRONG>&nbsp; </STRONG>不要被供应商、媒体炒作、或教条左右。要依照你自己的看法和你的项目的情况去对信息进行<BR><STRONG>&nbsp; </STRONG>分析。</P>
<P><STRONG>10.你说什么和你怎么说同样重要<BR>&nbsp; It's both What You Say and the Way You Say it</STRONG><BR><STRONG>&nbsp; </STRONG>如果你不能有效地向他人传达你的了不起的想法，这些想法就毫无用处。</P>
<P><STRONG>11.不要重复你自己<BR>&nbsp;&nbsp;&nbsp;&nbsp; DRY - Don't Repeat Yourself</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>系统中的每一项知识都必须具有单一、无歧义、权威的表示。</P>
<P><STRONG>12.让复用变得容易<BR>&nbsp;&nbsp;&nbsp;&nbsp; Make It Easy to Reuse</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>如果复用很容易，人们就会去复用。创造一个支持复用的环境。</P>
<P><STRONG>13.消除无关事物之间的影响<BR>&nbsp;&nbsp;&nbsp;&nbsp; Eliminate Effects Between Unrelated Things</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>设计自足、独立、并具有单一、良好定义的目的的组件。</P>
<P><STRONG>14.不存在最终决策<BR>&nbsp;&nbsp;&nbsp;&nbsp; There Are No Final Decisions</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>没有决策是浇铸在石头上的。相反，要把每项决策都视为是写在沙滩上的，并为变化做好<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>计划。</P>
<P><STRONG>15.用曳光弹找到目标<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use Tracer Bullets to Find the Target</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>曳光弹能通过试验各种事物并检查它们离目标有多远来让你追踪目标。</P>
<P><STRONG>16.为了学习而制作原型<BR>&nbsp;&nbsp;&nbsp;&nbsp; Prototype to Learn</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>原型制作是一种学习经验。其价值并不在于所产生的代码，而在于所学到的经验教训。</P>
<P><STRONG>17.靠近问题领域编程<BR>&nbsp;&nbsp;&nbsp;&nbsp; Program Close to the Problem domain</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>用你的用户的语言进行设计和编码。</P>
<P><STRONG>18.估算，以避免发生意外<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Estimate&nbsp;to Avoid Surprises<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在着手之前先进行估算。你将提前发现潜在的问题。</P>
<P><STRONG>19.通过代码对进度表进行迭代<BR>&nbsp;&nbsp;&nbsp;&nbsp; Iterate the Schedule with the Code<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>用你在进行实现时获得的经验提炼项目的时间标度。</P>
<P><STRONG>20.用纯文本保存知识<BR>&nbsp;&nbsp;&nbsp;&nbsp; Keep Knowledge in Plain Text</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>纯文本不会过时。它能够帮助你有效利用你的工作。并简化掉时和测试。</P>
<P><STRONG>21.利用命令shell的力量<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use the Power of Command Shells</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>当图形用户界面无能为力时使用shell。</P>
<P><STRONG>22.用好一种编辑器<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use a Single Editor Well</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>编辑器应该是你的手的延伸；确保你的编辑器是可配置、科扩展和可编程的。</P>
<P><STRONG>23.总是使用源码控制<BR>&nbsp;&nbsp;&nbsp;&nbsp; Always Use Source Code Control</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>源码控制是你的工作的时间机器--你能够回到过去。</P>
<P><STRONG>24.要修正问题，而不是发出指责<BR>&nbsp;&nbsp;&nbsp;&nbsp; Fix the Problem, Not the Blame</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>bug是你的过错还是别人的过错，并不是真的很有关系--它仍然是你的问题，它仍然需要<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>修正。</P>
<P><STRONG>25.调试时不要恐慌<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Panic When Debuging</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>做一次深呼吸，思考什么可能是bug的原因。</P>
<P><STRONG>26.“Select”没有问题<BR>&nbsp;&nbsp;&nbsp;&nbsp; "Select" Isn't Broken</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在OS或编译器、甚或是第三方产品或库中很少发现bug。bug很可能在应用中。</P>
<P><STRONG>27.不要假定，要证明<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Assume It - Prove It</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在实际环境中--使用真正的数据和辩解条件--证明你的假定。</P>
<P><STRONG>28.学习一种文本操纵语言<BR>&nbsp;&nbsp;&nbsp;&nbsp; Learn a Text Manipulation Language</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>你用每天的很大一部分时间处理文本，为什么不让计算机替你完成部分工作呢？</P>
<P><STRONG>29.编写能编写代码的代码<BR>&nbsp;&nbsp;&nbsp;&nbsp; Write Code That Writes Code</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>代码生成器能提高你的生产率，并有助于避免重复。</P>
<P><STRONG>30.你不可能写出完美的软件<BR>&nbsp;&nbsp;&nbsp;&nbsp; You Can't Write Perfect Software</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>软件不可能完美。保护你的代码和用户，使它（他）们免于能够预见的错误。</P>
<P><STRONG>31.通过合约进行设计<BR>&nbsp;&nbsp;&nbsp;&nbsp; Design with Contracts</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>使用合约建立文档，并检验代码所做的事情正好是它声明要做的。</P>
<P><STRONG>32.早崩溃<BR>&nbsp;&nbsp;&nbsp;&nbsp; Crash Early</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>死程序造成的危害通常比有问题的程序要小得多。</P>
<P><STRONG>33.用断言避免不可能发生的事情<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use Assertions to Prevent the Impossible</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>断言验证你的各种假定。在一个不确定的世界里，用断言保护你的代码。</P>
<P><STRONG>34.将异常用于异常的问题<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use Exceptinos for Exceptional Problems</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>异常可能会遭受经典的意大利面条式代码的所有可读性和可维护性问题的折磨。将异常保留给<BR>&nbsp;&nbsp;&nbsp;&nbsp; 异常的事物。</P>
<P><STRONG>35.要有始有终<BR>&nbsp;&nbsp;&nbsp;&nbsp; Finish What You Start</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>只要可能，分配某资源的例程或对象也应该负责解除其分配。</P>
<P><STRONG>36.使模块之间的耦合减至最少<BR>&nbsp;&nbsp;&nbsp;&nbsp; Minimize Coupling Between Modules</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>通过编写“羞怯的”代码并应用得墨忒耳法则来避免耦合。</P>
<P><STRONG>37.要配置，不要集成<BR>&nbsp;&nbsp;&nbsp;&nbsp; Configure, Don't Integrate</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>要将应用的各种技术选择实现为配置选项，而不是通过集成或工程方法实现。</P>
<P><STRONG>38.将抽象放进代码，细节放进元数据<BR>&nbsp;&nbsp;&nbsp;&nbsp; Put Abstractions in Code, Details in Metadata</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>为一般情况编程，将细节放在被编译的代码库之外。</P>
<P><STRONG>39.分析工作流，以改善并发性<BR>&nbsp;&nbsp;&nbsp;&nbsp; Analyze Workflow to Imporve Concurrency</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>利用你的用户的工作流中的并发性。</P>
<P><STRONG>40.用服务进行设计<BR>&nbsp;&nbsp;&nbsp;&nbsp; Design Using Services</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>根据服务--独立的、在良好定义、一致的接口之后的兵法对象--进行设计。</P>
<P><STRONG>41.总是为并发进行设计<BR>&nbsp;&nbsp;&nbsp;&nbsp; Always Design for Concurrency<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>容许并发，你将会设计出更整洁、具有更少假定的接口。</P>
<P><STRONG>42.使视图与模型分离<BR>&nbsp;&nbsp;&nbsp;&nbsp; Separate Views from Models<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>要根据模型和视图设计你的应用，从而以低廉的代码获取灵活性。</P>
<P><STRONG>43.用黑板协调工作流<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use Blackboards to Coordinate Workflow<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>用黑板协调完全不同的事实和因素，同时又使各参与方保持独立和隔离。</P>
<P><STRONG>44.不要靠巧合编程<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Program by Coincidence<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>只依靠可靠的事物。注意偶发的复杂性，不要把幸运的巧合与有目的的计划混为一谈。</P>
<P><STRONG>45.估算你的算法的阶<BR>&nbsp;&nbsp;&nbsp;&nbsp; Estimate the Order of Your Algorithms<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在你编写代码之前，先大致估算事情需要多长时间。</P>
<P><STRONG>46.测试你的估算<BR>&nbsp;&nbsp;&nbsp;&nbsp; Test Your Estimates<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>对算法的数学分析并不会告诉你每一件事情。在你的代码的目标环境中测定它的速度。</P>
<P><STRONG>47.早重构，常重构<BR>&nbsp;&nbsp;&nbsp;&nbsp; Refactor Early, Refactor Often<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>就和你会在华园里除草、并重新布置一样，在需要时对代码进行重写、重做和重新架构。要<BR>&nbsp;&nbsp;&nbsp;&nbsp; 铲除问题的根源。</P>
<P><STRONG>48.为测试而设计<BR>&nbsp;&nbsp;&nbsp;&nbsp; Design to Test<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在你还没有编写代码时就开始思考测试问题。</P>
<P><STRONG>49.测试你的软件，否则你的用户就得测试<BR>&nbsp;&nbsp;&nbsp;&nbsp; Test Your Software, or Your Users Will<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>无情地测试。不要让你的用户为你查找bug。</P>
<P><STRONG>50.不要使用你不理解的向导代码<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Use Wizard Code You Don't Understand<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>想到可以生成大量代码。在你把它们合并进你的项目之前，确保你理解全部这些代码。</P>
<P><STRONG>51不要搜集需求--挖掘它们<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Gather Requirements - Dig for Them<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>需求很少存在于表面上。它们深深地埋藏在层层假定、误解和政治手段的下面。</P>
<P><STRONG>52.与用户一同工作，以像用户一样思考<BR>&nbsp;&nbsp;&nbsp;&nbsp; Work with a User to Think Like a User<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>要了解系统实际上将如何被使用，这是最好的方法。</P>
<P><STRONG>53.抽象比细节活得更长久<BR>&nbsp;&nbsp;&nbsp;&nbsp; Abstractions Live Longer than Details<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>“投资”于抽象，而不是实现。</P>
<P><STRONG>54.使用项目词汇表<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use a Project Glossary<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>创建并维护项目中使用的专用术语和词汇的单一信息源。</P>
<P><STRONG>55.不要在盒子外面思考--要找到盒子<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Think Outside the Box - Find the Box<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在遇到不可能解决的问题时，要确定真正的约束。问问你自己：“它必须以这种方式完成吗？<BR>&nbsp;&nbsp;&nbsp;&nbsp; 它真的必须完成吗？”</P>
<P><STRONG>56.等你准备好再开始<BR>&nbsp;&nbsp;&nbsp;&nbsp; Start When You're Ready<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>你的一生都在积累经验。不要忽视反复出现的疑惑。</P>
<P><STRONG>57.对有些事情“做”胜于“描述”<BR>&nbsp;&nbsp;&nbsp;&nbsp; Some Things Are Better Done than Described<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>不要掉进规范的螺旋</P>
<P><STRONG>58.不要做形式方法的奴隶<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Be a Slave to Formal Methods<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>如果你没有把某项技术放进你的开发时间和能力的语境中，不要盲目地采用它。</P>
<P><STRONG>59.昂贵的工具不一定能制作出更好的设计<BR>&nbsp;&nbsp;&nbsp;&nbsp; Costly Tools Don't Produce Better Disigns<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>小心供应商的炒作，行业教条，以及价格标签的诱惑。要根据工具的价值判断它们。</P>
<P><STRONG>60.围绕功能组织团队<BR>&nbsp;&nbsp;&nbsp;&nbsp; Organize Teams Around Fucntionality<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>不要把设计师与编码员分开，也不要把测试员与数据建模员分开。按照你构建代码的方式构建<BR>&nbsp;&nbsp;&nbsp;&nbsp; 团队。</P>
<P><STRONG>61.不要使用手工流程<BR>&nbsp;&nbsp;&nbsp;&nbsp; Don't Use Manual Procedures<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>shell脚本或批文件会一次次地以同一顺序执行同样的指令。</P>
<P><STRONG>62.早测试，常测试，自动测试。<BR>&nbsp;&nbsp;&nbsp;&nbsp; Test Early. Test Often. Test Automatically<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>与呆在书架上的测试计划相比，每次构建试运行的测试要有效得多。</P>
<P><STRONG>63.要到通过全部测试，编码才算完成。<BR>&nbsp;&nbsp;&nbsp;&nbsp; Coding Ain't Done 'Til All the Tests Run<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>就是这样。</P>
<P><STRONG>64.通过“蓄意破坏”测试你的测试。<BR>&nbsp;&nbsp;&nbsp;&nbsp; Use Saboteurs to Test Your Testing<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在单独的软件副本上故意引入bug，以检验测试能够抓住它们。</P>
<P><STRONG>65.测试状态覆盖，而不是代码覆盖<BR>&nbsp;&nbsp;&nbsp;&nbsp; Test State Coverage, Not Code Coverage<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>确定并测试重要的程序状态。只是测试代码行是不够的。</P>
<P><STRONG>66.一个bug只抓一次<BR>&nbsp;&nbsp;&nbsp;&nbsp; Find Bugs Once</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>一旦测试员找到一个bug，这应该是测试员最后一次找到它。此后自动测试应该对其进行<BR>&nbsp;&nbsp;&nbsp;&nbsp; 检查。</P>
<P><STRONG>67.英语就是一种编程语言<BR>&nbsp;&nbsp;&nbsp;&nbsp; English is Just a Programming Language</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>像你编写代码一样编写文档：遵守DRY原则、使用元数据、MVC、自动生成、等等。</P>
<P><STRONG>68.把文档建在里面，不要栓在外面<BR>&nbsp;&nbsp;&nbsp;&nbsp; Build Documentation In, Don't Bolt It On</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>与代码分离的文档不太可能被修正和更新。</P>
<P><STRONG>69.温和地超出用户的期望<BR>&nbsp;&nbsp;&nbsp;&nbsp; Gently Exceed Your Users' Expectations</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>要理解你的用户的期望，然后给他们的东西要多那么一点。</P>
<P><STRONG>70.在你的作品上签名<BR>&nbsp;&nbsp;&nbsp;&nbsp; Sign Your Work</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>过去时代的手艺人为能在他们作品上签名而自豪。你也应该如此。</P>
<P><BR><BR><BR><FONT size=4><EM><STRONG>检查清单<BR>---------------------------</STRONG></EM></FONT></P>
<P><STRONG>71.要学习的语言</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>厌倦了C、C++和JAVA？试试CLOS、Dylan、Eiffel、Objectve C、Prolog、Smailltalk或TOM。它们每一种都有不同的能力和不同的“风味”。用其中的一种或多种语言在家里开发一个小项目。</P>
<P><STRONG>72.WISDOM离合诗</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>What do you want them to learn?&nbsp;&nbsp; 你想让他们学到什么？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>What is their interest in what you've got to say?&nbsp;&nbsp; 他们对你讲的什么感兴趣？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>How sophisticated are they?&nbsp;&nbsp; 他们有多富有经验？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>How much detail do they want?&nbsp;&nbsp; 他们想要多少细节？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>Whom do you want to own the information?&nbsp;&nbsp; 你想要让谁拥有这些信息？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>How can you motivate them to listen to you?&nbsp;&nbsp; 你如何促使他们听你说话？</P>
<P><STRONG>73.怎样维持正交性</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·设计独立、良好定义的组件。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·使你的代码保持解耦。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·避免使用全局数据。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·重构相似的函数。</P>
<P><STRONG>74.应制作原型的事物</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·架构<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·已有系统中的新功能<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·外部数据的结构或内容<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·第三方工具或组件<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·性能问题<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·用户界面设计</P>
<P><STRONG>75.架构问题</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·责任是否得到了良好定义？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·写作是否得到了良好定义？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·耦合是否得以最小化？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·你能否确定潜在的重复？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·接口定义和各项约束是否可接受？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·模块能否在需要时访问所需数据？</P>
<P><STRONG>76.调试检查清单</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·正在报告的问题是底层bug的直接结果，还是只是症状？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·bug真的在编译器里？在OS里？或者是在你的代码里？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·如果你向同事详细解释这个问题，你会说什么？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·如果可疑代码通过了单元测试，测试是否足够完整？如果你用该数据运行单元测试，会发生什么？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·造成这个bug的条件是否存在于系统中的其它任何地方？</P>
<P><STRONG>77.函数的得墨忒耳法则</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>某个对象的方法应该只调用属于以下情况的方法：<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·它自身<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·传入的任何参数<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·它创建的对象<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·组件对象</P>
<P><STRONG>78.怎样深思熟虑地编程</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·总是意识到你在做什么。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·不要盲目地编程。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·按照计划行事。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·依靠可靠的事物。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·为你的假定建立文档。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·不要只是测试你的代码，还要测试你的假定。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·维尼的工作划分优先级。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·不要做历史的奴隶。</P>
<P><STRONG>79.何时进行重构</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·你发现了对DRY原则的违反。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·你发现事物可以更为正交。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·你的知识扩展了。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·需求演变了。<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·你需要改善性能。</P>
<P><STRONG>80.劈开戈尔迪斯结</STRONG><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>在解决不可能解决的问题时，问问你自己：<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·有更容易的方法吗？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·我是在解决正确的问题吗？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·这件事情为什么是一个问题？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·是什么使它如此难以解决？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·它必须以这种方式完成吗？<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·它真的必须完成吗？</P>
<P><STRONG>81.测试的各个方面<BR>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·单元测试<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·集成测试<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·炎症和校验<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·资源耗尽、错误及恢复<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·性能测试<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·可用性测试<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp; </STRONG>·对测试自身进行测试<BR><BR><BR><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 以上内容摘自《程序员修炼之道》</P><img src ="http://www.blogjava.net/ranxiang/aggbug/30317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/ranxiang/" target="_blank">冉翔</a> 2006-02-12 03:06 <a href="http://www.blogjava.net/ranxiang/articles/30317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>