TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Zed Shaw is Writing A Book Teaching Beginner Python

179 点作者 sverrejoh大约 15 年前

36 条评论

pavelludiq大约 15 年前
Mr. Shaw, i am once again impressed. This is not the first time I've seen Zed Shaw rant about something he dislikes and then goes off and attempts to fix it.
评论 #1291765 未加载
评论 #1291481 未加载
评论 #1293150 未加载
fretlessjazz大约 15 年前
"If a programmer tells you to use vim or emacs tell them no. These editors are for when you are a better programmer. All you need right now is an editor that lets you put text into a file."<p>Ha! When I started to program, everyone told me the opposite. After weeks of head scratching and spending more time learning editors than coding, I secretly switched to Pico. But man could I use the hell out of Pico.
评论 #1291540 未加载
评论 #1291772 未加载
评论 #1292788 未加载
评论 #1291697 未加载
callahad大约 15 年前
I suggest reading the nascent PDF that he's posted, it's very good in some ways, less good in others, but if Zed keeps it up and is willing to have others help shape his voice, then this could end up as a very valuable project.
评论 #1291774 未加载
ivenkys大约 15 年前
From the book: "You might not really learn “programming” from this book, but you will learn the foundation skills you need to start learning the language. "<p>This is good. There is a place for books like these.<p>If nothing else, he is at least following-up his "DiveIntoPython is crap" words with concrete action.
simonista大约 15 年前
It would be really interesting to sit someone down who is fairly comfortable surfing the web, answering emails, using iphoto or microsoft word, but who has never had any experience programming before, and see where they trip up and where they are bored in working through this.<p>I know a few people I might be able to talk into it. If I do, I'll report back.
评论 #1291779 未加载
petercooper大约 15 年前
FWIW, the concept of getting people programming ASAP in order to learn has been sort of poo-pooed by findings in the ACM:<p><a href="http://cacm.acm.org/blogs/blog-cacm/45725-how-we-teach-introductory-computer-science-is-wrong/fulltext" rel="nofollow">http://cacm.acm.org/blogs/blog-cacm/45725-how-we-teach-intro...</a><p>I'm on the fence. I see the music-style logic to picking things up and working on the practical stuff right away, but, hey, studies are studies.
评论 #1292335 未加载
评论 #1292060 未加载
pgbovine大约 15 年前
skimming thru it now, pretty amusing in parts ... from the beginning of chapter 5:<p><i>Every programming language has some kind of way of doing numbers and math. Don’t worry, programmers lie frequently about being math geniuses when they really aren’t. If they were math geniuses, they would be doing math not writing ads and social network games to steal people’s money.</i><p>jokes aside, this could serve as a good syllabus for giving classroom Python tutorials for absolute beginners
motter大约 15 年前
I'd like to hear his opinion on "How to Think Like a Computer Scientist", which (approximately) matches his description of a beginner's book, and uses python for the examples.<p><a href="http://openbookproject.net/thinkcs/python/english2e/" rel="nofollow">http://openbookproject.net/thinkcs/python/english2e/</a>
评论 #1291782 未加载
tel大约 15 年前
I love this style. Notably: "if X doesn't look like Y, something broke. <i>Figure out why.</i>"<p>Nothing is more important in learning any task than learning how to <i>keep</i> learning, and holding someone's hand too tightly might keep them from trying. Sink or swim.<p>Great start, Zed.
iamdave大约 15 年前
This is the way absolutely every book that aims to teach people a language should be written. When Ruby on Rails hit it big, I picked up two books and couldn't get past the first two chapters.<p>Why?<p>The first two chapters were filler chapters. The history of ruby, the history of taking application languages and putting them on the web. An entire quarter of the book in pages was full of back-story, it was chapter 4 before I even saw any code, and chapter 6 before the actual instruction even began.<p>I will certainly buy this book, and if Zed produces any more about other programming languages in this format, I'm buying them too.
评论 #1291789 未加载
评论 #1291695 未加载
d0m大约 15 年前
From my experience, the coolest thing to do when beginning is to work with a GUI because you really have the feeling to do something great (contrary to print hello in a terminal which is more than useless (from a novice point of view, of course)).<p>So, my suggestion is to put a small bundle library with a main.py to modify and learn. For instance, that library could only show a simple dialog which you can draw and fun with it.<p>And the exercice might be more about: - Print the current time in this GUI (which might be useful) - Create a small game (such as guess the number, lower/bigger), - Generate a close-me button that move when you try to aim on it.<p>Etc.. you get the point: easy and fun exercises.<p>Finally, there are software which abstract the terminal and merge the editing window with the interpreter. I think this might be way better than saying: try to find the terminal, learn to create a directory, etc.. Why not creating the directory directly from the explorer if the user wants to? More particularly, when you start learning something, <i>everything</i> is new. So it's important to separate the concept of what you <i>should</i> know and what you are <i>supposed</i> to learn. So by this respect, creating a directory shouldn't be part of the same as creating a .py file and writing something in edit for instance.<p>That's my 2 cents. Good luck and have fun with that :-D
评论 #1291666 未加载
评论 #1291783 未加载
评论 #1291750 未加载
评论 #1291673 未加载
anujseth大约 15 年前
I could have called this yesterday, after the spat on twitter, that he's going to write one. Soldier on Zed.
migiale大约 15 年前
Hi,<p>There's a long tradition in ex-USSR math schools and math department of "teaching by doing", or by solving to be more precise. And I think it gives superior results given talented and motivated students. have you ever seen this book?<p><a href="http://www.amazon.co.uk/Algorithms-Programming-Undergraduate-Mathematics-Technology/dp/1441917470/ref=sr_1_3?ie=UTF8&#38;s=books&#38;qid=1272203235&#38;sr=8-3" rel="nofollow">http://www.amazon.co.uk/Algorithms-Programming-Undergraduate...</a><p>it would be really cool to have a book of the same level for python.
rabidgnat大约 15 年前
Before now, I assumed that teaching programming meant giving exercises where students figure out how to piece together the fundamentals of programming languages, and then try to build them up to harder programs. After reading through Zed's PDF, I realize I may have been wrong! If you let people absorb ideas by typing existing programs, they won't need to be taught how to decompose ideas, they'll try new things themselves. To teach game programming, you don't need to teach every single fundamental and build the user up to making a full fledged game. You just need to get them to install PyGame and draw a rectangle that they can move with the keyboard arrows, and tell them where the documentation is. Anyone who is really interested will do the rest themselves.
_b8r0大约 15 年前
Interesting. Having read the PDF I think this could do well. I did think that it was unfairly skewed toward Macs. I know Zed mentioned in the PDF that later versions would be more Windows/Linux friendly - I guess there's just a need to try to keep things as agnostic as possible to minimise the effort. I'd be happy to help with the Windows side where I can if there's alternative stuff that needs writing for what is likely to be the majority of users.<p>It might also be worth considering using PyGame later on if there's an interest in creating more visual programs. I know that it's important to maintain the interest of people, that's why a lot of the awesome 80s type and run books would include graphical programs. Again, I'm happy to contribute where I can.
julio_the_squid大约 15 年前
A lot of people mention Dive into Python. I'm curious, what are the opinions out there regarding this online Python book?<p><a href="http://homepage.mac.com/s_lott/books/python.html" rel="nofollow">http://homepage.mac.com/s_lott/books/python.html</a>
Avshalom大约 15 年前
I like the idea, though I know enough python that it's not for me.<p>The design/typography kinda sucks though, of course even Zed has pointed out how hard it is make a good looking code book.
jcdreads大约 15 年前
Had I had this book when I was ten or eleven I think I would have been the happiest ten-or-eleven-year-old in the entire world. Like many technical things, programming is typically either self-taught or taught horribly; this seems like a completely reasonable attempt to do it right.<p>Especially since every kid these days knows how to look stuff up online, but almost no adults know how to teach them how to program from scratch.
Kilimanjaro大约 15 年前
Easy read, I'd use it if I were learning python.<p>Now to the critics:<p>- Change the book title. If I see it on a shelf I wouldn't pick it. "Easy Python", "Python: First Steps", "Become a Pythonista" or something more approachable to the unwashed.<p>- PDF sucks for online reading. Big time. Make it one huge html file, no page breaks, no headers and footers on every page, it sucks. Epub may be a good choice but I rather use one single html file.<p>Good work!
评论 #1294329 未加载
overgard大约 15 年前
I really like this idea of learning things the "hard" way, of doing something and then figuring out why without a lot of handholding. I think it works for beginners, but it also works equally well for experts -- for instance if I'm learning a new language I'd rather just do something and figure out why it's acting in the way it is, rather than read through a chapter explaining it.
stcredzero大约 15 年前
What I've found is that the best thing for learning programming is something that can run programs, and example programs to run and debug. That's been true ever since I started playing with BASIC on the Apple II. I've also found that dynamic languages are better, since they provide immediate feedback.
Chuuwudo大约 15 年前
I looked through what he has written so far and it seems to be really nice. I might give it a try as I have no experience in Python (my only programming experience is writing simple Bash and PowerShell scripts). I do, however, wish he had made it available in HTML as well as PDF.
brianjherman大约 15 年前
Can he make a mean, dirty, nasty version? Like the former blog. I miss the angry in your face Zed Shaw.
leed25d大约 15 年前
I think that David Beazley's "Essential Python" is the best introduction to Python that I have seen.
jpwagner大约 15 年前
<i>Search online for all of the Python format characters.</i> - page 16<p>Awesome! Not your usual textbook exercise.
评论 #1294333 未加载
heresy大约 15 年前
Look forward to seeing where this goes.<p>My girlfriend asked me to teach her Python - she's doing her masters in statistics, so she's coming from an R/SAS background.<p>Apparently Python is useful to know in the investment banking arena, which surprised me.
评论 #1291792 未加载
grandalf大约 15 年前
This is pretty darn good. I would probably do it a bit differently but I think he's off to a very good start.<p>I think an example like:<p>print "hi there", "how are you"<p>with a brief explanation of the argument structure of print would be helpful.<p>This makes me want to write a tutorial.
DarwinLann大约 15 年前
I have to admit that I find Zed's comments about DiP to be spot on. I hate saying that, because I actually have a favorable opinion of both Mark Pilgrim and his blog.
gastlygem大约 15 年前
Chapter 10.2 -- "False or True" should be "True" I think..
cracki大约 15 年前
i see some strange things in the truth tables.<p>first, the left and right operands are ordered differently. on second glance, this smells like gray code, so only one operand changes to the next line. nevermind my reaction here.<p>then, the NOT AND table contradicts what python evaluates the forms to.
评论 #1300935 未加载
theBobMcCormick大约 15 年前
So is that why he was trashing Dive Into Python? Trying to discredit the competition?
评论 #1291472 未加载
评论 #1291469 未加载
bcl大约 15 年前
Post the Sphinx source to github so we can start submitting patches.
giardini大约 15 年前
re Section 10.2: I'd suggest defining operator precedence rather than asking the programmer to, for example, memorize tables of logical operations.
bslatkin大约 15 年前
Go for it, Zed!
dotandimet大约 15 年前
The first example print statements in Zed's book have backticks (`foo`). I don't know Python, but I'm guessing those should be single ticks ('foo')?
评论 #1292808 未加载
terra_t大约 15 年前
zed's dead baby
评论 #1292510 未加载