Gists 摘要

注重实效的项目

  • 注重实效的团队
    Organize around functionality, not job functions.

  • 无处不在的自动化
    Don’t use manual procedures .

  • 无情的测试
    Test early. Test often. Test automatically.
    Coding ain’t done till all the tests run.
    Use saboteurs to test your testing.
    Test state coverage, not code coverage.
    Find bugs once.

  • 全部都是写
    Treat English as just another programming language.
    Build documentation in, don’t bolt it on.

  • 极大的期望
    Gently exceed your users’ expectations.

  • 傲慢与偏见
    Sign your work.

在项目开始之前

  • 需求之坑
    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 formal methods.
    Expensive tools do not produce better designs.

当你编码时

  • 靠巧合编程
    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.

弯曲,或折断

  • 解耦与得墨忒耳法则
    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.

  • 它只是视图
    Model-View-Controller:Separate views from models.

  • 黑板
    Use blackboards coordinate workflow .

注重实效的偏执

  • 断言式编程
    If it can’t happen, use assertions to ensure that it won’t.

  • 何时使用异常
    Use exceptions for exceptional problems.

  • 配平资源
    Finish what you start.

注重实效的途径

  • 重复的危害
    Don’t repeat yourself .
    Make it easy to reuse.

  • 正交性
    Eliminate effects between unrelated things.

  • 可撤销性
    There are no final decisions.

  • 曳光弹
    Use tracer bullets to find target.

  • 原型与便签
    Prototype to learn.

  • 领域语言
    Program close to problem domain.

  • 估算
    Estimate to avoid surprises.
    Iterate the schedule with the code.

注重实效的哲学

  • 负责
    Provide options, don’t make lame excuses.


  • Don’t live with broken windows.

  • 知识资产
    1、严肃的投资者定期投资–作为习惯
    2、多元化是长期成功的关键
    3、聪明的投资者在保守的投资和高风险高回报的投资之间平衡他们的资产
    4、投资者设法低买高卖,以获得最大回报
    5、周期性的重新评估和平衡资产

    Invest regularly in your knowledge portfolio .

  • 思考
    Critically Analyze what you read and hear.

  • 交流
    It’s both what you say and the way you say it .

基本工具

  • 纯文本的威力
    Keep knowledge in plain text.

  • Shell游戏
    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.
    Don’t assume it, prove it.

  • 文本操纵
    Learn a text manipulation language .

  • 代码生成器
    Write code that writes code.

Reference 参考

[1] The Pragmatic Programmer: From Journeyman to Master