# How to be a Programmer 中文版

Robert L. Read with Community \[//]: # (Version:1.0.0) Copyright 2002, 2003, 2016 Robert L. Read

Licensed under [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).

翻译：[梦里风林](https://github.com/ahangchen)

原文：[HowToBeAProgrammer](https://github.com/braydie/HowToBeAProgrammer)

如果您希望改进这份中文翻译，请向这个[分支](https://github.com/ahangchen/HowToBeAProgrammer)提交Pull request。

[可以在gitbook在线阅读或导出PDF。](https://braydie.gitbooks.io/how-to-be-a-programmer/content/zh/index.html)

文章中出现的一些词汇往往有特殊的含义，可以在[4-词汇表](zh-traditional/4-glossary)找到注释。

## 引言

　　做一个好的程序员，困难而高尚。将一个软件工程集体愿景变为现实，最困难的地方在于与你的同事和顾客相处。编程很重要，这需要强大的智力和技能。 但在好的程序员看来，相比构建一个让客户和各种各样的同事都满意的软件系统，（纯粹的）编程真的只是小孩子的玩意。在这篇文章里，我尝试尽可能简洁地总结那些当我21岁时，希望别人告诉我的事。

　　这可能很主观的，所以，这篇文章注定不适用于所有人，并且有的内容有点武断。我尽量写一些程序员在ta的工作中，非常可能会遇到的事情。大部分这些问题以及它们的解决方案在人们的环境中如此普遍，以至于我(说的)可能有点唠叨。尽管如此，我还是希望这篇文章是有用的。

　　我们在课堂上学习编程。 那些著作: The Pragmatic Programmer \[Prag99], Code Complete \[CodeC93], Rapid Development \[RDev96], 以及 Extreme Programming Explained \[XP99] 都传授编程（知识），并阐述做一个好的程序员这个大话题。 在读这篇文章之前，或者就是现在，你当然也应该读一读Paul Graham \[PGSite] 和 Eric Raymond \[Hacker] 的文章。 但与那些著作不同，这篇文章强调社交问题并且总结了整套我所知的必须的技能。

　　在这篇文章里，boss这个词指的是任何一个交给你工程去做的人。 除了一些语境外，我会同义地使用交易，公司，集体这些词，比如，交易意味着赚钱，公司意味着现代的工作空间，集体一般是那些你一起工作的人。

　　欢迎来到这个群体。

## 目录

1. [入门](zh-traditional/1-beginner)
   * 个人技能
     * [学会 Debug](zh/1-beginner/personal-skills/01-learn-to-debug)
     * [如何通过分割问题 Debug](zh-traditional/1-beginner/personal-skills/02-how-to-debug-by-splitting-the-problem-space)
     * [如何移除一个错误](zh-traditional/1-beginner/personal-skills/03-how-to-remove-an-error)
     * [如何使用日志调试](zh-traditional/1-beginner/personal-skills/04-how-to-debug-using-a-log)
     * [如何理解性能问题](zh-traditional/1-beginner/personal-skills/05-how-to-understand-performance-problems)
     * [如何解决性能问题](zh-traditional/1-beginner/personal-skills/06-how-to-fix-performance-problems)
     * [如何优化循环](zh-traditional/1-beginner/personal-skills/07-how-to-optimize-loops)
     * [如何处理 I/O 开销](zh-traditional/1-beginner/personal-skills/08-how-to-deal-with-io-expense)
     * [如何管理内存](zh-traditional/1-beginner/personal-skills/09-how-to-manage-memory)
     * [如何处理偶现的 Bug](zh-traditional/1-beginner/personal-skills/10-how-to-deal-with-intermittent-bugs)
     * [如何学习设计技能](zh-traditional/1-beginner/personal-skills/11-how-to-learn-design-skills)
     * [如何进行实验](zh-traditional/1-beginner/personal-skills/12-how-to-conduct-experiments)
   * 团队技能
     * [为什么预估很重要](zh-traditional/1-beginner/team-skills/01-why-estimation-is-important)
     * [如何预估编程时间](zh-traditional/1-beginner/team-skills/02-how-to-estimate-programming-time)
     * [如何搜索信息](zh-traditional/1-beginner/team-skills/03-how-to-find-out-information)
     * [如何把人们作为信息源](zh-traditional/1-beginner/team-skills/04-how-to-utilize-people-as-information-sources)
     * [如何优雅地写文档](zh-traditional/1-beginner/team-skills/05-how-to-document-wisely)
     * [如何在垃圾代码上工作](zh-traditional/1-beginner/team-skills/06-how-to-work-with-poor-code)
     * [如何使用源代码控制](zh-traditional/1-beginner/team-skills/07-how-to-use-source-code-control)
     * [如何进行单元测试](zh-traditional/1-beginner/team-skills/08-how-to-unit-test)
     * [毫无头绪？休息一下](zh-traditional/1-beginner/team-skills/09-take-breaks-when-stumped)
     * [如何决定下班时间](zh-traditional/1-beginner/team-skills/10-how-to-recognize-when-to-go-home)
     * [如何与不好相处的人相处](zh-traditional/1-beginner/team-skills/11-how-to-deal-with-difficult-people)
2. [进阶](zh-traditional/2-intermediate)
   * 个人技能
     * [如何保持活力](zh-traditional/2-intermediate/personal-skills/01-how-to-stay-motivated)
     * [如何才能被广泛信任](zh-traditional/2-intermediate/personal-skills/02-how-to-be-widely-trusted)
     * [在时间和空间之间该如何权衡](zh-traditional/2-intermediate/personal-skills/03-how-to-tradeoff-time-vs-space)
     * [如何进行压力测试](zh-traditional/2-intermediate/personal-skills/04-how-to-stress-test)
     * [如何权衡简洁与抽象](zh-traditional/2-intermediate/personal-skills/05-how-to-balance-brevity-and-abstraction)
     * [如何学习新技能](zh-traditional/2-intermediate/personal-skills/06-how-to-learn-new-skills)
     * [学会打字](zh-traditional/2-intermediate/personal-skills/07-learn-to-type)
     * [如何进行集成测试](zh-traditional/2-intermediate/personal-skills/08-how-to-do-integration-testing)
     * [交流语言](zh-traditional/2-intermediate/personal-skills/09-communication-languages)
     * [重型工具](zh-traditional/2-intermediate/personal-skills/10-heavy-tools)
     * [如何分析数据](zh-traditional/2-intermediate/personal-skills/11-how-to-analyze-data)
   * 团队技能
     * [如何管理开发时间](zh-traditional/2-intermediate/team-skills/01-how-to-manage-development-time)
     * [如何管理第三方软件风险](zh-traditional/2-intermediate/team-skills/02-how-to-manage-third-party-software-risks)
     * [如何管理咨询](zh-traditional/2-intermediate/team-skills/03-how-to-manage-consultants)
     * [如何适度交流](zh-traditional/2-intermediate/team-skills/04-how-to-communicate-the-right-amount)
     * [如何直言异议以及如何避免](zh-traditional/2-intermediate/team-skills/05-how-to-disagree-honestly-and-get-away-with-it)
   * 评判
     * [如何权衡开发质量与开发时间](zh-traditional/2-intermediate/judgment/01-how-to-tradeoff-quality-against-development-time)
     * [如何管理软件系统依赖](zh-traditional/2-intermediate/judgment/02-how-to-manage-software-system-dependence)
     * [如何评判软件是否太不成熟了](zh-traditional/2-intermediate/judgment/03-how-to-decide-if-software-is-too-immature)
     * [如何决定购买还是构建](zh-traditional/2-intermediate/judgment/04-how-to-make-a-buy-vs-build-decision)
     * [如何专业地成长](zh-traditional/2-intermediate/judgment/05-how-to-grow-professionally)
     * [如何评估面试者](zh-traditional/2-intermediate/judgment/06-how-to-evaluate-interviewees)
     * [如何决定什么时候使用奇妙的计算机科学](zh-traditional/2-intermediate/judgment/07-how-to-know-when-to-apply-fancy-computer-science)
     * [如何与非工程师交谈](zh-traditional/2-intermediate/judgment/08-how-to-talk-to-non-engineers)
3. [高级](zh-traditional/3-advanced)
   * 技术评判
     * [如何从不可能中找到困难的部分](zh-traditional/3-advanced/technical-judgment/01-how-to-tell-the-hard-from-the-impossible)
     * [如何使用嵌入型语言](zh-traditional/3-advanced/technical-judgment/02-how-to-utilize-embedded-languages)
     * [选择语言](zh-traditional/3-advanced/technical-judgment/03-choosing-languages)
   * 机智地妥协
     * [如何与时间压力作斗争](zh-traditional/3-advanced/compromising-wisely/01-how-to-fight-schedule-pressure)
     * [如何理解用户](zh-traditional/3-advanced/compromising-wisely/02-how-to-understand-the-user)
     * [如何获得晋升](zh-traditional/3-advanced/compromising-wisely/03-how-to-get-a-promotion)
   * 服务你的团队
     * [如何发展才能](zh-traditional/3-advanced/serving-your-team/01-how-to-develop-talent)
     * [如何选择工作内容](zh-traditional/3-advanced/serving-your-team/02-how-to-choose-what-to-work-on)
     * [如何让你队友的价值最大化](zh-traditional/3-advanced/serving-your-team/03-how-to-get-the-most-from-your-teammates)
     * [如何划分问题](zh-traditional/3-advanced/serving-your-team/04-how-to-divide-problems-up)
     * [如何处理无聊的问题](zh-traditional/3-advanced/serving-your-team/05-how-to-handle-boring-tasks)
     * [如何为工程获取支持](zh-traditional/3-advanced/serving-your-team/06-how-to-gather-support-for-a-project)
     * [如何发展一个系统](zh-traditional/3-advanced/serving-your-team/07-how-to-grow-a-system)
     * [如何有效地沟通](zh-traditional/3-advanced/serving-your-team/08-how-to-communicate-well)
     * [如何告诉人们他们不想听的东西](zh-traditional/3-advanced/serving-your-team/09-how-to-tell-people-things-they-dont-want-to-hear)
     * [如何处理管理神话](zh-traditional/3-advanced/serving-your-team/10-how-to-deal-with-managerial-myths)
     * [如何处理混乱的组织](zh-traditional/3-advanced/serving-your-team/11-how-to-deal-with-organizational-chaos)
4. [词汇表](zh-traditional/4-glossary)
5. [附录 A - 书籍/网站](zh-traditional/5-bibliography)
6. [附录 B - 历史 (至2016年1月)](zh-traditional/6-history)
7. [附录 C - 贡献 (至2016年1月)](zh-traditional/7-contributions)

[![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)\
How To Be A Programmer: Community Version by Robert L. Read with Community is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
