The Rules of Programming - HOW TO WRITE BETTER CODE,Chris Zimmerman

这本书阐述了21条编程规则,旨在帮助开发者写出更简洁、可维护的代码。强调了避免过度优化,重视代码审查,消除错误情况,以及适应不同规模团队的工作规范。提倡让代码自我表达,并通过平行工作提高效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The Rules of Programming HOW TO WRITE BETTER CODE

by Chris Zimmerman
Released December 2022
Publisher(s): O'Reilly Media, Inc.
ISBN: 9781098133115

Rule 1 | As Simple as Possible, but No Simpler
Rule 2 | Bugs Are Contagious
Rule 3 | A Good Name Is the Best Documentation
Rule 4 | Generalization Takes Three Examples
Rule 5 | The First Lesson of Optimization Is Don’t Optimize
           | Interlude: In Which the Previous Chapter Is Criticized
Rule 6 | Code Reviews Are Good for Three Reasons
Rule 7 | Eliminate Failure Cases
Rule 8 | Code That Isn’t Running Doesn’t Work
Rule 9 | Write Collapsible Code
Rule 10 | Localize Complexity
Rule 11 | Is It Twice as Good?
Rule 12 | Big Teams Need Strong Conventions
Rule 13 | Find the Pebble That Started the Avalanche
Rule 14 | Code Comes in Four Flavors
Rule 15 | Pull the Weeds
Rule 16 | Work Backward from Your Result, Not Forward from Your Code
Rule 17 | Sometimes the Bigger Problem Is Easier to Solve
Rule 18 | Let Your Code Tell Its Own Story
Rule 19 | Rework in Parallel
Rule 20 | Do the Math
Rule 21 | Sometimes You Just Need to Hammer the Nails
             | Conclusion: Making the Rules Your Own
          A | Reading C++ for Python Programmers
          B | Reading C++ for JavaScript Programmers

【Bing Microsoft Translator - 从英语翻译】
编程规则 如何编写更好的代码

规则 1 |尽可能简单,但不简单
规则 2 |虫子具有传染性
规则 3 |一个好的名字是最好的文档
规则 4 |泛化有三个例子
规则 5 |优化的第一课是不要优化
           |插曲:其中批评了前一章
规则 6 |代码审查有好处,原因有三
规则 7 |消除故障案例
规则 8 |未运行的代码不起作用
规则 9 |编写可折叠代码
规则 10 |本地化复杂性
规则 11 |是两倍好吗?
规则 12 |大团队需要强大的惯例
规则 13 |找到引发雪崩的鹅卵石
规则 14 |代码有四种风格
规则 15 |拔除杂草
规则 16 |从结果向后工作,而不是从代码向前工作
规则 17 |有时更大的问题更容易解决
规则 18 |让您的代码讲述自己的故事
规则 19 |并行返工
规则 20 |算一算
规则 21 |有时你只需要敲钉子
             |结论:制定自己的规则
          A |Python 程序员阅读C++
          B |面向 JavaScript 程序员的阅读C++

参考资料
1. The Rules of Programming. https://www.oreilly.com/library/view/the-rules-of/9781098133108/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值