Live data from Hacker News

Zed finishes Learn Python The Hard Way

sheddingbikes.com

21–30 of 115 posts

Re: Zed finishes Learn Python The Hard Way

#21
post #5

Unless I'm mistaken there's no chapter about functional programming in Python (lambda functions, filter(), map() and reduce()). I really think it's acceptable to introduce these function to newbies, I'll go as far as saying it's actually a good thing. I like the chapter on automated testing.

The Python community has frowned on functional programming, reduce isn't in basic Python anymore, and they almost took out lambda: http://www.artima.com/weblogs/viewpost.jsp?thread=98196

Re: Zed finishes Learn Python The Hard Way

#22
post #16

Earlier quoted context omitted.

He does not give the answer. Welcome to graduate school! (And, for that matter, real life.) As in grad school, the secret is: If you can't figure it out, ask around. Form teams that stay up until 3am waving their hands and sketching on chalkboards. If nothing else, it's a bonding experience that you'll treasure for life.

I get your message, but the problem is this is not grad school. This is a book; one way communication. I have no one to ask, as I am the only one I know who has an interest in coding. Of course I can always ask on the web, but having to break off from coding, pose a question, and then wait for it to get answered before I can continue really breaks up my learning curve.

>Of course I can always ask on the web, but having to break off from coding, pose a question, and then wait for it to get answered before I can continue really breaks up my learning curve.

You're skipping a vital step. Searching for the answer on the web. Most of the time the question you want to ask has already been answered.

Re: Zed finishes Learn Python The Hard Way

#23
post #14

Earlier quoted context omitted.

In the absence of an epub, GoodReader on the ipad is very handy for reading PDFs as books. The type is a little small on this document, but I am able to read it without zooming and panning.

What does GoodReader have over using iBooks? I've mostly just used it for storing manuals for tech products so far, but it seems like a reasonable way to read PDFs.

Mainly performance and options. Page turns, navigation, zooming are all faster. iBooks is my favorite eBook reader but GoodReader is noticeably better for reading pdfs. A mandatory app for iPad, along with Dropbox, SimpleNote and Instapaper.

Re: Zed finishes Learn Python The Hard Way

#24
post #16

Earlier quoted context omitted.

He does not give the answer. Welcome to graduate school! (And, for that matter, real life.) As in grad school, the secret is: If you can't figure it out, ask around. Form teams that stay up until 3am waving their hands and sketching on chalkboards. If nothing else, it's a bonding experience that you'll treasure for life.

I get your message, but the problem is this is not grad school. This is a book; one way communication. I have no one to ask, as I am the only one I know who has an interest in coding. Of course I can always ask on the web, but having to break off from coding, pose a question, and then wait for it to get answered before I can continue really breaks up my learning curve.

Asking clear questions will help you learn. You can ask on Stack Overflow (or #python) - make sure to credit the source of your question[0] and at what point you are stuck. Often by trying to explain the precise thing that you don't understand, you will have a moment of zen.

[0] People will be a lot more helpful if they know you are trying to learn, rather than posting a "send me teh codes plz" request. Also they will hopefully give you just enough of a hint and not spoil the whole thing for you.

Re: Zed finishes Learn Python The Hard Way

#27
post #5

Unless I'm mistaken there's no chapter about functional programming in Python (lambda functions, filter(), map() and reduce()). I really think it's acceptable to introduce these function to newbies, I'll go as far as saying it's actually a good thing. I like the chapter on automated testing.

Ditto for generators. In the process you could introduce pipelining and thus give a window into the Unix way which is probably pretty relevant for a newcomer. Or I've just been around too long to know what's relevant for a newcomer.

Re: Zed finishes Learn Python The Hard Way

#30
post #5

Unless I'm mistaken there's no chapter about functional programming in Python (lambda functions, filter(), map() and reduce()). I really think it's acceptable to introduce these function to newbies, I'll go as far as saying it's actually a good thing. I like the chapter on automated testing.

He didn't cover defining first-class functions that I could see in a quick check, didn't cover generators, and I think most disappointingly, didn't cover __metaclass__. That's some critical stuff for Python programming right there, everybody needs __metaclass__.

Ahem.

You have to pick what to cover. For a beginning Python book, I'm underwhelmed by the need to drag an entirely new and foreign(-to-Python) paradigm into the beginning Python. I say this as someone who does a lot of functional programming, someone who is using a lot of lambda, filter, map, and reduce is someone who is stubbornly refusing to program with the native idioms, which are named functions (defined inline is fine), list comprehension or loop, list comprehension or loop, and loop respectively. It is not that enormous a gain, and will lose from Python fighting you all the way. (Plus you'll probably miss some opportunities to use generators, overload the special methods, and the other things you can do with native idioms, if you're trying to program Haskell in Python.)

Post reply on HN