Live data from Hacker News

Zed finishes Learn Python The Hard Way

sheddingbikes.com

81–90 of 115 posts

Re: Zed finishes Learn Python The Hard Way

#81
post #66

Earlier quoted context omitted.

If I remember correctly, he's also currently unemployed. This may be relevant :-)

I am, but to be honest, I got more done when I had a job. See all those sites? I did all of those, wrote for them, worked on LPTHW, wrote mulletdb.com, hacked on lamson, a few other projects, and still played guitar about 4 hours a day. Now that I'm just working on Mongrel2 it feels like I do less. Weird.

Geez, man. Do you ever sleep? :-)

Oh, and just out of curiosity, what guitar music are you spending the most time on? Is it mostly your own stuff, or are you learning a lot of things written by others?

Re: Zed finishes Learn Python The Hard Way

#82
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.…

In the book "The Pragmatic Programmer" they refer to this as "rubber ducking". The origin of the term was from a particular programmer who kept a rubber duck sitting near his computer (I believe on his monitor, I don't have the book handy right now). When questioned about why the duck was there, he said that when he got stuck on a problem, he would explain the problem to the rubber duck (full well knowing that the duck was not going to respond :-D ). The purpose of having the duck was just to have a target to explain the problem to, knowing that the act of explaining the problem would often lead him to the solution.

There's a wiki article about it here:

http://www.c2.com/cgi/wiki?RubberDucking

Re: Zed finishes Learn Python The Hard Way

#83
post #80

Earlier quoted context omitted.

Probably to use a list comprehension: suffix_str_lst = [x + "_suffix" for x in str_lst] If you are okay with a generator instead of a list, then you can flip the square brackets to parentheses and then you do not need to hold the whole thing in memory at once. EDIT: You can add a filter in a similar way: suffix_str_list = [x for x in str_list if x.startswith("meep")]

Is there a tutorial on learning simple one liners like this? I find myself frustrated after seeing simple and obvious solutions like the above, but can never bring myself to code them as such.

http://learnyouahaskell.com

I'm only half kidding. The best way to get used to using functional concepts is to actually use them in their native setting, and then apply (giggle) them elsewhere. When you _have_ to solve problems this way, at some point, it clicks.

Re: Zed finishes Learn Python The Hard Way

#84
post #65
post #13

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

I keep meaning to write some kind of blog about this, but I call it "time opportunism" as opposed to "time management". That's the best name I could come up with for this thing I do that keeps me creative and flexible yet still getting things done. In a nutshell, I quit trying to explicitly plan and organize my life (not that I was any good at that) and instead I have a giant bag of things I need to do. There's usual…

Sounds like Structured Procrastination to me.

http://structuredprocrastination.com/

Re: Zed finishes Learn Python The Hard Way

#85
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.

Also you can crop the margins of pages so that they fit better without zooming in. It can convert pdf to text on the fly too, though of course there are formatting issues.

Re: Zed finishes Learn Python The Hard Way

#86
post #72

Earlier quoted context omitted.

"Higher-order functions, ... list transformations" you just said four words that are an entire book on their own.

Sure, that's why Graham Hutton can do it in one chapter. Most books discuss lists and functions anyway, and from there is not such a big step to give an introduction to lambdas/closures, maps, folds, and filters. It's not as if we are discussing monads (which are also easy to understand, given a good teacher).

Doubt it. He may have used a chapter of text to explain something, but who he explained it to probably could understand it in a chapter of text.

Re: Zed finishes Learn Python The Hard Way

#87
post #81
post #66

Earlier quoted context omitted.

I am, but to be honest, I got more done when I had a job. See all those sites? I did all of those, wrote for them, worked on LPTHW, wrote mulletdb.com, hacked on lamson, a few other projects, and still played guitar about 4 hours a day. Now that I'm just working on Mongrel2 it feels like I do less. Weird.

Geez, man. Do you ever sleep? :-) Oh, and just out of curiosity, what guitar music are you spending the most time on? Is it mostly your own stuff, or are you learning a lot of things written by others?

I work on Jazz mostly, but older Jazz. Which means I play a lot of scales. :-)

Re: Zed finishes Learn Python The Hard Way

#88
post #75
post #74

Earlier quoted context omitted.

Please don't put it online in HTML just yet. I need to get it edited, and I'm afraid people will put versions of the book up in HTML format with errors and problems. Once the book is 1.0 then I'll have it online and anyone else can put it online. Can you take your link down please?

I've taken down the doc.

Thanks. I appreciate it.

Re: Zed finishes Learn Python The Hard Way

#89

Very nice. I just randomly choose to view the arguments unpacking section and found a defect (no example given on pg 36 for passing in only two args instead of all three, but later cited as "see how I passed in two args"). Created a ticket.

Thanks, I think I fixed it but the ticket is kind of vague:

http://learnpythonthehardway.org/tktview/08a86ff3098eae91d8c...

Update it for me if I didn't understand what you think should be done.

Re: Zed finishes Learn Python The Hard Way

#90
post #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.

Yeah generators are awesome. +1 for a chapter on them with small sprinkles of functional programming.
Post reply on HN