Live data from Hacker News

Zed finishes Learn Python The Hard Way

sheddingbikes.com

41–50 of 115 posts

Re: Zed finishes Learn Python The Hard Way

#41
post #24

Earlier quoted context omitted.

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 wil…

Often by trying to explain the precise thing that you don't understand, you will have a moment of zen. This. I often find that I run into a problem, try to solve it on my own, then bring someone unfamiliar in to get a fresh set of eyes on it. It usually goes like this Me: "Hey, I honestly can't figure out why this is doing this particular thing, can you take a look? ...FUCK! Nevermind, I know exactly whats going on.…

I cannot tell you how many time I have have posted a question to USENET, hit send, and then had an AHA! moment.

Re: Zed finishes Learn Python The Hard Way

#42

Earlier quoted context omitted.

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

Strange that they took out reduce() but not map() and filter(), which you can easily replicate with list comprehensions.

Yeah. The argument is based on reduce not being clear and easy to understand, which is frustrating to those of us who actually find map/reduce/filter to be more clear, not less.

Re: Zed finishes Learn Python The Hard Way

#43
post #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…

As far as I know, this piece of code (containing a lambda, map and filter) is standard idiomatic python:

    [ (student.name, 'A') for student in students if student.grade > 90]
I'd assert that first class functions are idiomatic python as well and are also critical for python programming. They play an integral part of django, for example.

Re: Zed finishes Learn Python The Hard Way

#44
post #24

Earlier quoted context omitted.

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 wil…

Often by trying to explain the precise thing that you don't understand, you will have a moment of zen. This. I often find that I run into a problem, try to solve it on my own, then bring someone unfamiliar in to get a fresh set of eyes on it. It usually goes like this Me: "Hey, I honestly can't figure out why this is doing this particular thing, can you take a look? ...FUCK! Nevermind, I know exactly whats going on.…

One of my professors in college would bring a small teddy-bear to the lab. Whenever one student wanted to ask a question, he would just put the teddy bear on top of the monitor, and you'd have to talk to the teddy bear first.

It seemed ridiculous, but it worked wonders. Most of the time said professor didn't have to open his mouth. It was just a matter of organizing your thoughts in a coherent way.

Re: Zed finishes Learn Python The Hard Way

#45
post #6

I am learning python through this book at the moment. It is my first attempt at learning to code, so I have nothing to compare it with, but I must say that this book is very good. My only gripe is that he poses certain questions/exercises that he fully expects us to solve, one way or another. But if we cannot; we're screwed. He does not give the answer. It has only happened once so far, but that was enough for me to…

The #python IRC channel on FreeNode is a great resource for programmers learning python. (But don't expect to be spoonfed, or have everything served on a silver platter, it'll be greatly appreciated if you can show your efforts (using a pastebin site, don't paste into the channel ;-))).

Re: Zed finishes Learn Python The Hard Way

#46
post #13

Mongrel 2 and now a book on Python. The man is a machine.

I don't know why he's wasting time teaching python he could make millions (bwahahaha) giving "getting things done" seminars.

Of course they would probably consist of him saying "find something that pisses you off.Then fix it" over and over.

Re: Zed finishes Learn Python The Hard Way

#47
Nice, but that's an annoying license. I'm tempted into porting his assignments to Ruby, but do to licensing I'll need to do them completely separately - I can't make a cohesive document out of it.

Ah well. His prerogative I suppose. Just makes me feel like "teaching people to program" isn't his primary goal.

Re: Zed finishes Learn Python The Hard Way

#48
post #6

I am learning python through this book at the moment. It is my first attempt at learning to code, so I have nothing to compare it with, but I must say that this book is very good. My only gripe is that he poses certain questions/exercises that he fully expects us to solve, one way or another. But if we cannot; we're screwed. He does not give the answer. It has only happened once so far, but that was enough for me to…

Learning how to Google problems is an important programming skill.

Every programmer in the world is pissed that "I'm not sure - I'd Google It" is not an acceptable answer to a question about "how do I do X in programming language Y". Happens every day.

That being said - a book forum or Q/A section on the site would likely be very helpful. I'm learning Objective-C right now and the book I'm using has a corresponding forum associated which usually has the answers I'm looking for.

Re: Zed finishes Learn Python The Hard Way

#49
post #19

Zed, May I suggest making it available in other formats, assuming that it is possible, once it is finished? Perhaps as text or HTML files in a tarball? Or even as an epub (for Nooks and iPad)?

The source files are written in rst(ReStructured Text) format, the standard documentation format for Python. Specifically using [Sphinx]( http://sphinx.pocoo.org ). One of the default output formats IS HTML. Build instructions on *nix: $ fossil clone http://learnpythonthehardway.org lpthw.fossil $ mkdir lpthw $ cd lpthw $ fossil open ../lpthw.fossil $ make html $ open _build/html/index.html To install sphinx: $ easy_…

Thanks. And thanks for showing how to do this as well.
Post reply on HN