Learn Python the Hard Way

Zed A. Shaw

出版时间

2013-10-11

ISBN

9780321884916

评分

★★★★★
书籍介绍
这本书最反常识的地方,恰恰是它的书名。作者Zed Shaw写书时已掌握约20种编程语言,坦言编程对他而言早已乏味——于是他得出结论:语言本身并不重要,重要的是你用代码做了什么。全书52个练习刻意不追求
作者简介
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 like Mongrel, Lamson, Mongrel2, and has been programming and writing for nearly 20 years.
AI导读
核心看点
  • 通过52个练习强制动手,拒绝复制粘贴
  • 强调纪律、练习与坚持,培养编程直觉
  • 作者风格幽默犀利,穿插大量吐槽与梗
读者共识
  • 书名虽叫Hard Way,实际入门门槛并不高
  • 作者个性鲜明,行文傲娇有趣,阅读体验独特
  • 作为入门书足够,进阶需搭配其他资料补充
精彩摘录
  • "我从事编程已经太长时间,长到对我来说编程已经是非常乏味的事情了。我写这 本书的时候,已经懂得大约 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."
用户评论
心情复杂
花了半年算是读完了。学到不少东西。下一步,是玩ScraPy,挖网站信息的;Natural Language Tool Kit是分析文本的;The Django Tutorial是建设网站的。
快速教你如何用python写点儿程序的实用入门书,作者很强势,不过对于弱小的编程零基础人士来说还是蛮受用。在学习python前应先学命令行的使用,如果不会,从此书最后的附录开始学习。
今晚在地铁上的时候一个男生跟我搭讪,原因是因为看到我在读这本书所以想问我这本书怎样。。。我觉得从今以后我每天上班都读O'Reilly's的书
终于有条目了。我的python第二本。
too simple. just had a quick flip through.
很适合入门 看过之后还是入门阶段并没有进阶 离看懂别人的代码还差得远 作者说了相关的方法和心得 情真意切
感觉都是学过的 但是还是掌握了新知识
17年转行时靠的就是这本书。不如vamei的那本入门书写得好,但也还行。
还行
下载
收藏