原文:推荐一本书:《A P… - @黄岩gg的微博 - 微博 (weibo.com)


推荐一本书:《A Philosophy of Software Design》
内容是:如何写高质量代码。我才读到第二章,就已经被征服了。感觉比《Clean Code》写的更好。好像没有中文版,但是这本书的英文不难懂。书中金句叠出,下面是一些例子。
1、Complexity is more apparent to readers than writers. If you write a piece of
code and it seems simple to you, but other people think it is complex, then it is
complex. (复杂性是相对读者而言的。作者认为他自己写的代码简单,这不管用;只要读者认为复杂,它就是复杂)
2、Your job as a developer is not just to create code that you can
work with easily, but to create code that others can also work with easily. (程序员的职责不是写自己看起来简单的代码,而是要写别人认为简单的代码)
这是第1版: https://milkov.tech/assets/psd.pdf
这是第2版中对于第1版修改的部分: https://web.stanford.edu/~ouster/cgi-bin/aposd2ndEdExtract.pdf
作者John Ousterhout是一位大牛,领导开发了Tcl/Tk脚本语言,参与开发了第一个LFS文件系统,后来的LSM-tree就是受LSM文件系统启发,然后才有BigTable、LevelDB、RocksDB等。他还参与发明了Raft共识协议。虽然他几十年来一共只写过20多万行代码,但是他完全有资格写这本《软件设计哲学》。