编程语录Word格式.docx
- 文档编号:4684432
- 上传时间:2023-05-03
- 格式:DOCX
- 页数:18
- 大小:44.74KB
编程语录Word格式.docx
《编程语录Word格式.docx》由会员分享,可在线阅读,更多相关《编程语录Word格式.docx(18页珍藏版)》请在冰点文库上搜索。
除了数学爱好,对于一个有能力的程序员来说,出色地掌握自己的母语是最宝贵的财富。
–EdsgerDijkstra
Cmakesiteasytoshootyourselfinthefoot;
C++makesitharder,butwhenyoudo,itblowsawayyourwholeleg.—BjarneStroustrup,developeroftheC++programminglanguage
C很容易使你搬起石头砸自己的脚,而C++把这事变得更难,但是如果一定要这么做,那么你的整条腿都会被炸飞-BjarneStroustrup,C++语言的发明者
Commentary:
mostdebuggingproblemsarefixedeasily;
identifyingthelocationoftheproblemishard.—unknown
修复bug很容易,但是定位bug却很困难–匿名
Consideringthecurrentsadstateofourcomputerprograms,softwaredevelopmentisclearlystillablackart,andcannotyetbecalledanengineeringdiscipline.—BillClinton,formerPresidentoftheUnitedStates
看看当前计算机程序糟糕的事态,软件开发明显一直是一门妖术,其仍然不能被称为一个工程学。
–比尔.克林顿美国前总统
Foralongtimeitpuzzledmehowsomethingsoexpensive,soleadingedge,couldbesouseless,andthenitoccurredtomethatacomputerisastupidmachinewiththeabilitytodoincrediblysmartthings,whilecomputerprogrammersaresmartpeoplewiththeabilitytodoincrediblystupidthings.Theyare,inshort,aperfectmatch.—BillBryson,author,fromNotesfromaBigCountry
长期以来,有个事一直困扰着我,那就是越是昂贵的,越是前沿的,就越可能是没用的。
然后,困扰我的另一个事是,计算机是一个死的机器,却可以不可思议地去完成那些巧妙的事情,而计算机程序员是那么聪明人却在做着不可思议的愚蠢的事情,简而言之,他们真是天生的一对。
–BillBryson旅游文学作家BigCountry中的笔记
Givenenougheyeballs,allbugsareshallow(e.g.,givenalargeenoughbeta-testerandco-developerbase,almosteveryproblemwillbecharacterizedquicklyandthefixobvioustosomeone).—EricS.Raymond,programmerandadvocateofopensourcesoftware,fromTheCathedralandtheBazaar
足够多的眼睛,就可让所有问题浮现(比如:
只要给于足够多的beta测试者和开发人员一起工作,那么,几所所有的问题都会很快的出现,而修正也会是显而易见的)
Goodcodeisitsownbestdocumentation.Asyou’reabouttoaddacomment,askyourself,‘HowcanIimprovethecodesothatthiscommentisn’tneeded?
’Improvethecodeandthendocumentittomakeitevenclearer.—SteveMcConnell,softwareengineerandauthor,fromCodeComplete
好的代码自己本身就是最好的文档。
当你打算加注释的时候,问问自己‘我如何才能把我的代码改善到不需增加注释?
’重构自己的代码,然后使文档让其更清楚。
—SteveMcConnell《代码大全》的作者
Hey!
Itcompiles!
Shipit!
—unknown
嘿,编译通过了!
出货!
–匿名
Insideeverywell-writtenlargeprogramisawell-writtensmallprogram.—CharlesAntonyRichardHoare,computerscientist
在每个编写精良的大程序里面都是一个编写精良的小程序。
–CharlesAntonyRichardHoare,计算机科学家
Itshouldbenotedthatnoethically-trainedsoftwareengineerwouldeverconsenttowriteaDestroyBaghdadprocedure.BasicprofessionalethicswouldinsteadrequirehimtowriteaDestroyCityprocedure,towhichBaghdadcouldbegivenasaparameter.—NathanielS.Borenstein,computerscientist
需要注意的是,没有哪个经过规范培训的工程师会赞成写一个DestoryBaghdad(摧毁巴克达)的函数。
最基本的职业规范会告诉他们应该去写一个叫DestoryCity的函数,然后把“Baghdad”(巴克达)当成这个函数的参数。
—— NathanielS.Borenstein, 计算机科学家
Managingprogrammersislikeherdingcats.—unknown
管理程序员就如同养一群猫一样–匿名
Measuringprogrammingprogressbylinesofcodeislikemeasuringaircraftbuildingprogressbyweight.—BillGates,co-founderofMicrosoftCorporation
用代码行数来衡量编程的进度,就如同用航空器零件的重量来衡量航空飞机的制造进度一样。
——BillGates,微软创始人
Moregoodcodehasbeenwritteninlanguagesdenouncedasbadthaninlanguagesproclaimedwonderful—muchmore.—BjarneStroustrup,fromTheDesignandEvolutionofC++
好的代码都都在的批评声中写成的,而差的则是在表杨声中写成的。
——BjarneStroustrup,摘自《TheDesignandEvolutionofC++》
Programsmustbewrittenforpeopletoread,andonlyincidentallyformachinestoexecute.—HaroldAbelsonandGeraldJaySussman,computerscientistsandauthors,fromTheStructureandInterpretationofComputerPrograms
代码应该是写给其他人来读的,而能让机器运行的仅仅是附带着的。
—— HaroldAbelson与GeraldJaySussman,计算机科学家和作家,摘自《TheStructureandInterpretationofComputerPrograms》
Realprogrammersdon’tcommenttheircode.Ifitwashardtowrite,itshouldbehardtounderstand.—unknown
真正程序员从来不写代码的注释,如果代码非常难写,那么同样代码的注释也会非常难懂–匿名
Simplicityisprerequisiteforreliability.—EdsgerDijkstra
简单是可靠的前提条件—迪杰斯特拉
TheCprogramminglanguage—alanguagewhichcombinestheflexibilityofassemblylanguagewiththepowerofassemblylanguage.—unknown
C语言——一门同时具有了汇编语言灵活性和汇编语言强大能力的语言。
–匿名
Thefirst90%ofthecodeaccountsforthefirst90%ofthedevelopmenttime.Theremaining10%ofthecodeaccountsfortheother90%ofthedevelopmenttime.—TomCargill,object-orientedprogrammingexpertatBellLabs
开始的90%的代码用了90%的开发时间,而剩下的最后的10%的代码会需要另外90%的开发时间。
–TomCargill,面向对象编程专家,贝尔实验室
Theimportantpointisthatthecostofaddingafeatureisn’tjustthetimeittakestocodeit.Thecostalsoincludestheadditionofanobstacletofutureexpansion.Sure,anygivenfeaturelistcanbeimplemented,givenenoughcodingtime.Butinadditiontocomingoutlate,youwillusuallywindupwithacodebasethatissofragilethatnewideasthatshouldbedead-simplewinduptakinglongerandlongertoworkintothetangledexistingweb.Thetrickistopickthefeaturesthatdon’tfighteachother.—JohnCarmack,computergameprogrammer
增加一个功能特性的成本并不单单是为这些功能编码所花费时间的成本,还这个成本应该包括特性扩展的障碍成本。
当然,任何的功能清单都可以被实现,只需要有足够的时间。
但是除些之外,你应该对你的代码库的脆弱性感到紧张,而那些新的想法应该足够的简单,而不是去花费更多更多的时间去纠缠于现有的蜘蛛网。
这里的决窃是挑选那些不会和别人冲突的的功能。
Thekeytoperformanceiselegance,notbattalionsofspecialcases.Theterribletemptationtotweakshouldberesistedunlessthepayoffisreallynoticeable.—JonBentlyandM.DouglasMcIlroy,bothcomputerscientistsatBellLabs
表现的关键是精美和典雅的,并不是使用大量的特殊案例。
对于任何调整的冲动都应该是被限制的,除非其回报真的是值得注意的。
–JonBentlyandM.DouglasMcIlroy,二者都是贝尔试验实的计算机科学家
ThelastgoodthingwritteninCwasFranzSchubert’sSymphonyNumber9.—ErwinDieterich,programmer
最后一件用C做的好作品就是弗朗茨.舒伯特的C大调第9交响曲—ErwinDieterich,programmer程序员
TheproblemwithusingC++…isthatthere’salreadyastrongtendencyinthelanguagetorequireyoutoknoweverythingbeforeyoucandoanything.—LarryWall,developerofthePerllanguage
使用C++最大的问题是..在C++语言里,存在这一种很强的趋势,就是如果你不明白C++语言的细节,你就无法做好任何事情。
–LarryWall,developerofthePerllanguage
Thesooneryoustarttocode,thelongertheprogramwilltake.—RoyCarlson,UniversityofWisconsin
你越早开始都手编码,你所花费来编程的时间就越长—RoyCarlson,UniversityofWisconsin
Thevalueofaprototypeisintheeducationitgivesyou,notinthecodeitself.—AlanCooper,softwareauthor,fromTheInmatesareRunningtheAsylum
原型的价值在于他给你的教训,而不是代码自身—AlanCooper,softwareauthor,fromTheInmatesareRunningtheAsylum
Thereareonlytwokindsofprogramminglanguages:
thosepeoplealwaysbitchaboutandthosenobodyuses.—BjarneStroustrup
世界上只有两类编程语言:
人们都抱怨的语言和从来没有人使用的语言—BjarneStroustrup
Therearetwowaysofconstructingasoftwaredesign.Onewayistomakeitsosimplethatthereareobviouslynodeficiencies.Andtheotherwayistomakeitsocomplicatedthattherearenoobviousdeficiencies.—CharlesAntonyRichardHoare
世界上有两个设计软件的方法,一种方法是设计的尽量简单,以至于明显的没有什么缺陷,另外一种方式是使他尽量的复杂,以至于其缺陷不那么明显。
Uglyprogramsarelikeuglysuspensionbridges:
they’remuchmoreliabletocollapsethanprettyones,becausethewayhumans(especiallyengineer-humans)perceivebeautyisintimatelyrelatedtoourabilitytoprocessandunderstandcomplexity.Alanguagethatmakesithardtowriteelegantcodemakesithardtowritegoodcode.—EricS.Raymond
丑陋的程序就像一座丑陋的吊桥:
他们相比漂亮的良好的吊桥起来,更有可能会坍塌,这是因为人类(尤其是工程师)感知漂亮的东西是和我们处理和理解复杂问题的能力相关的。
所以,一个程序语言如果很难以优雅地方式编程,那么其就很难写出好的代码。
Weeksofprogrammingcansaveyouhoursofplanning.—unknown
多做几周的编程可以节省你做计划的时间——匿名(意思为,只有实践过了,你才更容易做计划,没有实践过,做起计划来将会很头痛)
WhenaprogramminglanguageiscreatedthatallowsprogrammerstoprograminsimpleEnglish,itwillbediscoveredthatprogrammerscannotspeakEnglish.—unknown
当程序语言被设计成允许程序以很简单的英语来编程的时候,人们将会发现编写程序的程序员都来自不会说英语的地方。
–匿名
(全文完,翻译水平有限,如果有误,还请批评指正!
)
22条经典的编程引言编辑本段回目录
下面的这些经典的引言来自英文,也许有些我翻译的是不很好,所以,我提供了中英对照,如果有问题,请大家指正。
过早的优化是万恶之源。
Prematureoptimizationistherootofallevil!
-DonaldKnuth
在水里行走和以一个需求规格进行软件开发,有一点是相同的,那就是如果水或需求都被冻住不了,那么行走和软件开发都会变得容易。
Walkingonwateranddevelopingsoftwarefromaspecificationareeasyifbotharefrozen
-EdwardVBerard
Hofstadter定理:
“一件事情总是会花费比你预期更多的时间,就算是你已经考虑过本条Hofstadter定理”。
Italwaystakeslongerthanyouexpect,evenwhenyoutakeintoaccountHofstadter’sLaw.
-Hofstadter’sLaw
有些遇到问题的人总是会说“我知道,我会使用正则表达式”,那么,你现在有两个问题了。
(意思是:
你本想用正则表达式来解决你已有问题,但实际上你又引入了“正则表达式”的一个新问题)Somepeople,whenconfrontedwithaproblem,think“Iknow,I’lluseregularexpressions.”Nowtheyhavetwoproblems
-JamieZawinski
调试程序的难度是写代码的两倍。
因此,只要你的代码写的尽可能的清楚,那么你在调试代码时就不需要那么地有技巧。
Debuggingistwiceashardaswritingthecodeinthefirstplace.Therefore,ifyouwritethecodeascleverlyaspossible,youare,bydefinition,notsmartenoughtodebugit.
-BrianKernighan
用代码行来衡量开发进度,无异于用重量来衡量制造飞机的进度。
Measuringprogrammingprogressbylinesofcodeislikemeasuringaircraftbuildingprogressbyweight.
-BillGates
PHP被一些不合格的业余人员造就成了一个小恶魔;
而Perl则是被一些熟练的但不正当的专业人员造就成了一个超级大恶魔。
PHPisaminorevi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 编程 语录