程序员修炼之道

Don't Live with Broken Windows
Be a Catalyst for Change
Remember the Big Picture
Make Quality a Requirements Issue
Invest Regularly in Your Knowledge Portfolio

  • 每年至少学习一种新语言
  • 每季度阅读一本技术书籍
  • 也要阅读非技术书籍
  • 上课
  • 参加本地用户组织
  • 实验不同的环境
  • 跟上潮流
  • 上网

Critically Analyze What You Read and Hear
WISDOM 离合诗

  • 你想让他们学到什么?
  • 他们对你讲的什么感兴趣?
  • 他们有多富有经验?
  • 他们想要什么细节?
  • 你先要让谁拥有这些信息?

It's Both What You Say and the Way You Say It

DRY - Don't Repeat Yourself
重复是如何发生的

  • 强加的重复
  • 无意的重复
  • 无耐性的重复
  • 开发者之间的重复

把低级的知识放在代码中,把注释保留给其他的高级说明

Make it Easy to Reuse
Eliminate Effects Between Unrelated Things
There Are No Final Decisions
Use Tracer Bullets to Find the Target

  • 用户能够及早看到能工作的东西
  • 开发者构建里一个它们能在其中工作的结构
  • 你有了一个集成平台
  • 你有了可用于演示的东西
  • 你见更能够感受到工作进度

语言的界限就是一个人的世界的界限
Program Close to the Problem domain
Estimate to Avoid Surprises

时长 报出估算的单位
1~15 天
3~8 周
8~30 周
30+ 周 在给出估算前努力思考一下

Iterate the Schedule with the Code
Keep Knowledge in Plain Text
Use the Power of Command Shells
Use a Single Editor Well
Always Use Source Code Control
Fix the Problem,Not the Blame
Don't Panic
"Select" Isn't Broken
Don't Assume it - Prove It
Learn a Text Manipulation Language
Write Code That Writes Code
You Can't Write Perfect Software
Design with Contracts
Crash Early
If it Can't Happen,Use Assertions to Ensure That it Won't
Use Exceptions for Exceptional Problems
Finish What You Start
Minimize Coupling Between Modules
Configure,Don't Integrate
Put Abstractions in Code,Details in Metadata
Analyze Workflow to Improve Concurrency
Design Using Services
Always Design for Concurrency
Separate Views from Models
Use Blackboards to Coordinate Workflow
Don't Program by Coincidence

怎样深思熟虑地编程

  • 总是意识到你在做什么
  • 不要盲目地编程
  • 按照计划行事
  • 依靠可靠的事物
  • 为你的假定建立文档
  • 不要只是测试你的代码,还要测试你的假定
  • 为你的工作划分优先级
  • 不要做历史的奴隶

Estimate the Order of Your Algorithms
Test Your Estimates
Refactor Early,Refactor Often
Design to Test
Test Your Software,or Your Users Will
Don't Use Wizard Code You Don't Understand
完美,不是在没有什么需要增加,而在没有什么需要去掉时达到的
Don't Gather Requirements - Dig for Them
Work with a User to Think Like a User
Abstractions Live Longer than Details
Use a Project Glossary
Don't Think Outside the Box - Find the Box
Listen to Nagging Doubts - Start When You're Ready
Some Things Are Better Done than Described
Don't Be a Slave to Format Methods
Expensive Tools Do Not Produce Better Designs
Organize Around Functionality,Not Job Functions
Test Early. Test Often. Test Automatically.
Coding Ain't Done Til All the Tests Run
Use Saboteurs to Test Your Testing
Find Bugs Once
Treat English as Just Another Programming Language
Build Documentation In,Don't Bolt It On
Gently Exceed Your Users' Expectaions
Sign Your Work