Learn Python 3 the Hard Way

Zed A. Shaw

出版社

Addison

出版时间

2017-07-07

ISBN

9780134692883

评分

★★★★★

标签

编程

书籍介绍
这不是一本让你轻松愉快的编程入门书。作者刻意把节奏放慢,要求你逐行手动敲入52个练习的每一行代码——连复制粘贴都被电子书刻意禁止,只为逼你熬过那种"报错找不到原因"的痛苦,再亲手让它跑起来。读者反复提及的,正是这种近乎执拗的笨办法:它不追求让你快速掌握Python语法,而是模拟真实开发中"试错—排查—修复"的完整过程。书里那些"Every if-statement must have an else""出错就写在纸上,别再犯第二次"的碎碎念,看似啰嗦,实则是在培养程序员的习惯与心态。它适合愿意慢下来、能忍受枯燥的初学者;但对有一定基础、想快速上手的读者,后半部分的游戏示例可能显得拖沓。
作者简介
About the Author Zed A. Shaw is the author of the popular online books Learn Python the Hard Way, Learn Ruby the Hard Way, and Learn C the Hard Way. He is also the creator of several open source software projects and has been programming and writing for nearly 20 years. Most of his free time is devoted to the study of painting and art history. Read more
AI导读
核心看点
  • 52个练习强制手动敲代码,拒绝复制粘贴
  • 配套5小时视频演示调试与修复错误过程
  • 强调纪律与坚持,培养真实编程思维习惯
读者共识
  • 适合新手入门,行文接地气,不劝退
  • 老鸟不推荐,内容较基础,进阶需另寻资料
  • 后记建议极佳,鼓励读者坚持并享受编程
精彩摘录
  • "我从事编程已经太长时间,长到对我来说编程已经是非常乏味的事情了。我写这 本书的时候,已经懂得大约 20 种编程语言,而且可以在大约一天或者一个星 期内学会一门编程语言(取决于这门语言有多古怪)。现在对我来说编程这件事情 已经很无聊,已经谈不上什么兴趣了。当然这不是说编程本身是一件无聊的事情, 也不是说你以后也一定会这样觉得,这只是我个人在当前的感觉而已。 在这么久的旅程下来我的体会是:编程语言这东西并不重要,重要的是你用这些 语言做的事情。事实上我一直知道这一点,不过以前我会周期性地被各种编程语 言分神而忘记了这一点。现在我是永远不会忘记这一点了,你也不应该忘记这一 点。 你学到和用到的编程语"
  • "Rules For If-Statements 1.Every if-statement must have an else. 2.If this else should never be run because it doesn't make sense, then you must use a die function in the else that prints out an error message and dies, just like we did in the last exercise. This will find many errors. 3.Never nest if"
  • "If they like control and have a huge beard, they'll tell you to install Linux."
  • "Hit CTRL-D (^D) and get out of python. > mkdir mystuff > cd mystuff > dir"
  • "From now on, when you make mistakes write down on a piece of paper what kind of mistake you made. When you go to the next exercise, look at the last mistakes you made and try not to make them in this new one."
  • "If you're on Windows try python -m pydoc raw_input instead. Get out of pydoc by typing q to quit."
  • "The argv is the "argument variable", a very standard name in programming, that you will find used in many other languages. This variable holds the arguments you pass to your Python script when you run it. In the exercises you will get to play with this more and see what happens. Line 3 "unpacks" arg"
  • "You should immediately notice that we import another handy command named exists. This returns True if a file exists, based on its name in a string as an argument. It returns False if not. Did you see that trick I did with cat? It only works on Linux or OSX, on Windows use type to do the same thing."
目录
Preface xvii
Acknowledgments xx
Exercise 0: The Setup 2
macOS 2

显示全部
用户评论
作者真nice,书里总是在说:嗯,这个是很难,我知道你们很痛苦,痛苦是对的,figure it out! Get through it! 最后:You can code. They cannot. That is pretty damn cool.
不是初学者就不评价了。刷新了一下OOP的概念。
内容很详细并且很基础,所以一本书真正写的内容也有点少。不过对于新手入门可以了,不会劝退😀
整本书的代码跟着pdf码了一遍 最后那个Ex52是什么鬼 pdf上用的是flask 网页版用的是web.py web的跑都跑不起来 session翻了半天源码也没看懂 ..
老鸟不推荐
纯粹为了乐趣看了这本编程书。作为编程入门教程,本书写成了应该有的样子:在基础阶段,练习其实比学习新知识更重要。本书的优点(一些有经验的程序员或许会觉得这是缺点)正是练习量很足,甚至每章标题没有用 Chapter 而是直接写成了 Exercise。 在我看来,唯一的缺点(其实很多教程都有这个缺点,本书不算严重)是最后有点太赶了,扶上马需要送一程,但送得还不够。 小提示:如果是用 Python 3 的最新版本(3.10),nose 大概率不能用,nose2 可以用,但一则是一些表达发生了变化,二则是 nose2 功能本身不是很全(或可认为是 unittest 的补充)。不得已,我用 pytest 把其中的自动测试部分重写了一遍(事实上比用 nose 更简单)。
适合非科班人士想要感受一下coding的冲动。
这书适用于完全无编程基础的人。对于有编程基础的人来说,这书的信息密集度较差,教学效率较低。不如直接上手写,哪里不会搜哪里。
补标。在垃圾语言上写不出好书。(2021-08-16)
比较好follow,不过动脑少一些,学语法还挺合适。书籍有一些版本问题,有时候很麻烦。
下载
收藏