pragmatic-programmer-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePragmatic Programmer Guide
《程序员修炼之道》指南
Quick start
快速开始
- Load and
references/index.md.references/foundations.md - Ask the user which mode they want (guided workflow):
- Quick checklist (short, actionable)
- Chapter scan (pick relevant chapters, then synthesize)
- Tip-by-tip (list tips that apply, with concrete actions)
- Working agreement (define "how we'll work" for this task/project)
- Identify context: task type, stage (kickoff vs review), constraints, and risk level.
- 加载和
references/index.md文件。references/foundations.md - 询问用户想要使用哪种模式(引导式工作流):
- 快速检查清单(简短、可执行)
- 章节扫描(挑选相关章节,然后整合内容)
- 逐个技巧(列出适用的技巧及具体行动)
- 工作约定(定义本次任务/项目的“协作方式”)
- 明确场景:任务类型、阶段(启动 vs 评审)、约束条件以及风险等级。
Chapter selection (fast map)
章节选择快速映射
Use this to decide which chapter files to load:
- Chapter 1 (Philosophy): quality, culture, responsibility, communication, docs.
- Chapter 2 (Approach): duplication, coupling, prototypes, estimates, reversibility.
- Chapter 3 (Tools): automation, shell/text tooling, reproducibility, version control.
- Chapter 4 (Paranoia): contracts, error handling, defensive design, small steps.
- Chapter 5 (Bend, or Break): modularity, data flow, state management, architecture.
- Chapter 6 (Concurrency): workflow, shared state, coordination patterns.
- Chapter 7 (While You Are Coding): refactoring, complexity, testability, security, naming.
- Chapter 8 (Before the Project): requirements, users, glossary, constraints, policy.
- Chapter 9 (Pragmatic Projects): testing practice, automation, documentation, ownership.
使用以下内容决定加载哪些章节文件:
- 第1章(理念):质量、文化、责任、沟通、文档。
- 第2章(方法):重复代码、耦合、原型、估算、可回退性。
- 第3章(工具):自动化、Shell/文本工具、可复现性、版本控制。
- 第4章(谨慎原则):契约、错误处理、防御式设计、小步迭代。
- 第5章(灵活应变):模块化、数据流、状态管理、架构。
- 第6章(并发):工作流、共享状态、协调模式。
- 第7章(编码过程中):重构、复杂度、可测试性、安全性、命名。
- 第8章(项目启动前):需求、用户、术语表、约束条件、政策。
- 第9章(务实项目):测试实践、自动化、文档、所有权。
Output structure
输出结构
- Start with a short "context summary" based on the task.
- Provide only relevant tips (with titles) and paraphrased guidance.
- For each tip: include "Why it applies," "How to apply now," and "What to watch for."
- If in code review, tie guidance to the diff or files under review.
- If at task start, propose a first slice (tracer bullet/prototype) and a checklist.
- 首先基于任务生成简短的“场景摘要”。
- 仅提供相关技巧(含标题)及转述后的指导内容。
- 每个技巧需包含“适用原因”、“当前应用方法”和“注意事项”。
- 若用于代码评审,需将指导内容与评审的代码差异或文件关联。
- 若用于任务启动阶段,需提议首个最小可执行单元(追踪子弹/原型)及检查清单。
Behavioral rules
行为规则
- Always apply Foundations (tips 1-2) implicitly.
- If no tips are relevant, say so and explain why.
- Paraphrase guidance; avoid long quotes. Tip titles are ok.
- Keep recommendations optional and invite the user's preference.
- 需默认应用基础技巧(第1-2条)。
- 若无适用技巧,需明确说明并解释原因。
- 转述指导内容;避免长篇引用。可保留技巧标题。
- 建议内容需保持可选性,并询问用户偏好。
References
参考资料
- for the full tip list and chapter mapping.
references/index.md - for a fast signals to tips crosswalk.
references/signals-to-tips.md - for tips 1-2.
references/foundations.md - Chapter files: through
references/chapter-1-philosophy.md.references/chapter-9-projects.md
- :完整技巧列表及章节映射。
references/index.md - :信号与技巧的快速对照表。
references/signals-to-tips.md - :第1-2条基础技巧。
references/foundations.md - 章节文件:至
references/chapter-1-philosophy.md。references/chapter-9-projects.md