《程序员修炼之道》读书笔记

本书分享了编程领域的智慧,强调了持续学习、质量优先、模块化设计等原则,并探讨了如何通过重构、自动化测试等手段提高软件质量。

#这是一本值得每个程序员细细品味的书。

P5 编程是一种技艺,一种用心学习的技艺。 Someone who loves program and being clever about it.
#对于任何一种工作都是如此,不只是编程。

P12 Care about your craft
Think your work
#学而不思则罔,思而不学则怠。其实工作和学习也是一样,是边干边思考的过程,二者有机的结合才能进步。

P14 It's a Continuous Process
A tourist visiting England's Eton College asked the gardener how he got the
lawns so perfect. "That's easy," he replied, "You just brush off the dew every
morning, mow them every other day, and roll them once a week."
"Is that all?" asked the tourist.
"Absolutely," replied the gardener. "Do that for 500 years and you'll have a
nice lawn, too."
#研发管理改进同样是个持续的过程,没有所谓的上帝,也不能一蹴而就。

P22 The greatest of all weaknesses is the fear of appearing weak.
J. B. Bossuet, Politics from Holy Writ, 1709
#不暴漏问题,不能解决问题,也就不能取得进步,对人和系统都一样。
P25 Provide Options, Don't Make Lame Excuses
#不能提供解决方案的话,最好闭嘴。
P27 Don't Live with Broken Windows
#对Bug零容忍

P28 All the rest of this code is crap, I'll just follow suit.
#破窗理论
P30 Be a Catalyst for Change
#原文注释:你不能强迫别人改变,相反,要向他们展示未来可能会怎样,并帮助他们参与对未来的改造。
P30 Remember the Big Picture
#眼望星空,脚踏实地。
P32 Make Quality a Requirements Issue
#质量是基础
P33 An investment in knowledge always pays the best interest.
Benjamin Franklin
#知识真正被消化了,才能产生效益。
P34 As the value of your knowledge declines, so does your value to your
company or client. We want to prevent this from ever happening.
#作为一个IT人,需要不断学习,更新知识结构,这是幸运,也是不幸,但是你在这个行业,就无法改变。
P34 Your Knowledge Portfolio
1. Serious investors invest regularly—as a habit.
2. Diversification is the key to long-term success.
3. Smart investors balance their portfolios between conservative
and high-risk, high-reward investments.
4. Investors try to buy low and sell high for maximum return.
5. Portfolios should be reviewed and rebalanced periodically.

P35 Invest Regularly in Your Knowledge Portfolio
#技能都是相通的,编程也罢,投资也罢。
P37 Critically Analyze What You Read and Hear
#批判性思维
P42 It's Both What You Say and the Way You Say It
#方式很重要,特别是对于中国。
P46 DRY—Don't Repeat Yourself
#当你看到系统充满来Copy/Paste的时候,想起这句话不知作何感想?

P52 Make It Easy to Reuse
#易用性是法宝。
P54 Eliminate Effects Between Unrelated Things
#对于JEE项目,软件分层是个最基本的原则,但是经常看到的系统连这个都不能坚持。
#软件平台化,模块化,是个大家都认为对的事情,但是往往作为重要不紧急的事项,被一拖再拖,其作用无法发挥,同时公司越来越陷于低水平重复,到处救火的状态,而不能自拔。

P62 Nothing is more dangerous than an idea if it's the only one you have.
Emil-Auguste Chartier, Propos sur la religion, 1938
#破釜沉舟,成果其实是偶然。
P64 There Are No Final Decisions
#变化才是王道,不变是不可能,特别对于软件开发来讲。
P65 Schrodinger's cat
#很有意思,那么世界是多少维呢?

P67 Use Tracer Bullets to Find the Target
#敏捷开发,快速构建。

P82 Estimate to Avoid Surprises
#估计是需要历史数据作为支持的,有模型的支持。

P92 Unix is famous for being designed around the philosophy of small,
sharp tools, each intended to do one thing well.
#笨重的紧密耦合的系统,是开发的噩梦。
P98 Use a Single Editor Well
#用一个工具,把它用好,而不是很多工具,这和练武一样,关键是把一种功夫搞精通,而不是学习很多花架子。

P102 Progress, far from consisting in change, depends on retentiveness. Those
who cannot remember the past are condemned to repeat it.
George Santayana, Life of Reason
#忘记过去,就是背叛,就要挨打。
P106 Fix the Problem, Not the Blame
#抱怨很多时候是没有用的,关键是能够真正的解决问题。

P112 Don't Assume It—Prove It
#工程师的基本素质。
P117 Write Code That Writes Code
#合适的代码生成器,会节约很多工作量。

P144 Finish What You Start
#有始有终,才能取得成就。
P153 Decoupling and the Law of Demeter
Good fences make good neighbors.
Robert Frost, "Mending Wall"
#真正的模块化,而不只是表面的,才能真正形成规模效应,才能提高生存率。
P154 Minimize Coupling
#降低耦合,是系统成功的关键。
P160 Configure, Don't Integrate
#分清楚哪些参数是需要可配置的。对于注解,哪些是和程序紧密绑定的,哪些是需要灵活配置的。

P166 Analyze Workflow to Improve Concurrency
#并发设计,是提高工作效率和性能的主要手段。如果软件能够支持横向扩展,基本就不担心性能的问题。

P171 Always Design for Concurrency
#水平扩展,是系统设计非常重要的方面,特别是对于机器相对于人力极为廉价的时代。
P172 Still, a man hears
What he wants to hear
And disregards the rest
La la la…
Simon and Garfunkel, "The Boxer"
#奥秘需要细细体会。
P189 How to Program Deliberately
1. Always be aware of what you are doing.
2. Don't code blindfolded.
3. Proceed from a plan.
4. Rely only on reliable things.
5. Document your assumptions.
6. Don't just test your code, but test your assumptions as well.
7. Prioritize your effort.
8. Don't be a slave to history.

P199 Refactor Early, Refactor Often
#重构,需要建立基本原则和方法
P205 Design to Test
#对于框架来讲,单元测试的重要性不言而喻。

P211 Don't Use Wizard Code You Don't Understand
#熟练使用Visual C++,但是不会C++的人一定深有体会。

P214 Perfection is achieved, not when there is nothing left to add, but when there
is nothing left to take away….
Antoine de St. Exupery, Wind, Sand, and Stars, 1939
#作减法往往需要更大的勇气,也往往能够取得更大的成效,“约法三章”如此。

P216 Work with a User to Think Like a User
#鞋只有试过才知道是否合脚。

P225 Gordius, the King of Phrygia, once tied a knot that no one could untie. It
was said that he who solved the riddle of the Gordian Knot would rule all of
Asia. So along comes Alexander the Great, who chops the knot to bits with
his sword. Just a little different interpretation of the requirements, that's
all… and he did end up ruling most of Asia.
#换个角度看问题。
P226 Don't Think Outside the Box—Find the Box
#站在别人的角度看问题。
P230 Some Things Are Better Done than Described
#行胜于言
P232 Don't Be a Slave to Formal Methods
#对于艺术的工作,管理也罢,架构也罢,不能成为定式的奴隶,但是也不能没有原则。
P234 Expensive Too Do Not Produce Better Designs
#合适的工具而不是昂贵的工具。

P235 At Group L, Stoffel oversees six first-rate programmers, a managerial
challenge roughly comparable to herding cats.
The Washington Post Magazine, June 9, 1985
#架构师需要激励,而不是控制。管理者同理。
P241 Civilization advances by extending the number of important operations we
can perform without thinking.
Alfred North Whitehead
#习惯决定命运。
P242 Don't Use Manual Procedures
#自动化
P246 Suppose you wanted to automate code review scheduling and approval. You
might put a special marker in each source code file:
/* Status: needs_review */
#it seems one good choice.

P248 Test Early. Test Often. Test Automatically.
#测试,不是可有可无。
P249 Coding Ain't Done 'Til All the Tests Run
#测试完成,才是开发结束。
P249 There are several major types of software testing that you need to perform:
? ? Unit testing
? ? Integration testing
? ? Validation and verification
? ? Resource exhaustion, errors, and recovery
? ? Performance testing
? ? Usability testing

P265 Gently Exceed Your Users' Expectations
#这个度该如何把握?

P267 Sign Your Work
#对自己成果的尊重,爱惜。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值