像计算机科学家一样思考Python(第2版)

[美] Allen B. Downey

出版时间

2016-07-01

ISBN

9787115425515

评分

★★★★★

标签

编程

书籍介绍
市面上Python入门书汗牛充栋,大多把重心放在语法细节和API罗列上,读者翻完仍不知如何动手。这本书的独特之处在于它刻意把语言降为媒介,真正要教的是'像计算机科学家那样思考':如何把大问题拆解成可逐步推进的小步,如何用'增量开发'保证每一步都留下一个能运行的程序,如何在函数调用时想象一个'栈图'来追踪局部变量的去向。它把'调试'视为一种思维习惯而非排错技巧,从语法错误、运行时错误一直讲到最隐蔽的语义错误。正因如此,它被不少读者评为'最好的CS专业入门教材',也适合零基础的自学者。它不追求覆盖知识点的广度,而是执着于编程'道'一层的培养,愿意沉下心读完的人,往往收获的是面对未知代码时的从容。
作者简介
Allen B. Downey 是欧林工程学院的计算机科学教授,曾任教于韦尔斯利学院、科尔比学院和加州大学伯克利分校。他是加州大学伯克利分校的计算机科学博士,并拥有MIT的硕士和学士学位。
AI导读
核心看点
  • 侧重培养计算机科学家思维,而非单纯语法
  • 每章专设调试章节,系统讲解排错技巧
  • 从基础概念循序渐进至面向对象编程
读者共识
  • 内容组织清晰,语言简练易理解
  • 重编程之道轻语言之技,思路独特
  • 适合小白入门,老手仅作复习参考
精彩摘录
  • "For some people, programming and debugging are the same thing. That is, programming is the process of gradually debugging a program until it does what you want. The idea is that you should start with a program that does something and make small modifications, debugging them as you go, so that you al"
  • "The final version of the function doesn`t display anything when it runs;it only returns a value.The print statements we wrote are useful for debugging,but once you get the function working,you should remove them.Code like that is called scaffolding because it is helpful for building the program but "
  • "If you were really thinking like a computer scientist, you would have recognized that uses_all was an instance of a previously-solved problem,and you would have written:"
  • "This is an example of a program development method called problem recognition,which means that you recognize the problem you are working on as an instance of a previously-solved problem,and apply a previously-developed solution"
  • "Every time a funtion gets called, Python creates a new [function frame], which contains the function's [local variables and parameters]."
  • "It is important to distinguish between operations that [modify] lists and operations that [creat] new lists."
  • "A [hash] is a function that takes a value (of any kind) and return a integer. Dictionaries use these intergers, called [hash values] to store and look up key-value pairs."
  • "for [instances], the default behavior of the == operator ist the same as the is operator; it checks [object identity], not [object equivalence]."
目录
第1章 程序之道 1
1.1 什么是程序 1
1.2 运行Python 2
1.3 第一个程序 3
1.4 算术操作符 3

显示全部
用户评论
2018-03-20完成
程序员入门书
github上有中文翻译版:https://github.com/bingjin/ThinkPython2-CN
很适合小白来看。以及我总算从头到尾翻完了。
讲调试和一个文本分析的程序有点意思之外都太过于纠结入门了
特别适合刚学编程的小白
因为太久没用到过复杂技巧,读《Fluent Python》有些吃力,所以把这本先读了一遍作为复习,除了作为Fluent Python的先导意外的合适外,没想到还有很多意外收获,里面的各种参考资料尤其棒,我已经又被成功安利了《Think Complexity》,今天读了一章很痛快;Car Talk这种网站也可以激发编程灵感,差点以为是什么取了诡异名字的程序教学网站,去看了一眼还真是“车迷天下”…
有些无聊
#好书传阅#helen0147,挺适合编程入门的一本书,内容组织非常清晰、容易理解。
哈哈,python。
下载
收藏