Live data from Hacker News

Zed finishes Learn Python The Hard Way

sheddingbikes.com

61–70 of 115 posts

Re: Zed finishes Learn Python The Hard Way

#62
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…

Hey, can you tell me which ones you got stuck on? I can try give a bit of help either here or in the book.

One thing about those though is that if you can't complete them, then just move on and maybe mark it for later. You should try to figure them out for a bit, but sometimes you just can't and have to come back to it later.

Finally, make sure you have this latest version of the book. I added a small section in the beginning which talks about this, so you might have an older version.

EDIT: Oh I'm assuming you mean the Extra Credits. The lessons you should try really hard to do and figure out before moving on. But skipping Extra Credit is quite alright.

Re: Zed finishes Learn Python The Hard Way

#63

I have read the first 20 pages. Excellent! Very well done. Great advice. Fun / proven way to learn. Thanks Zed!!

You're welcome. Remember if you run into errors, just submit a ticket for it on the learnpythonthehardway.org web site and I'll fix them up.

Re: Zed finishes Learn Python The Hard Way

#64
I am training myself in Python with this book from a week or so.

I know how to code in other languages and programming basic so I am not a first time coder... yet this little book is absolutely useful and I am enjoying it exercise after exercise.

Learning trough practice FTW!

Thank you Zed.

Re: Zed finishes Learn Python The Hard Way

#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 usually a bunch of projects, and each has a todo list. All I do is when I have the time to work on one AND the motivation, then I go bang out as much as I can until I can't. By having lots of different little projects I'm pretty sure I'll always have something to work on that motivates me at that time.

The only caveat on this is I then do one thing at a time. I see too many people who can't get their todo list down are usually trying to do 5 things at once. A good sign you're this kind of person is if you love patch queues. Just do one thing, and make sure before you do it that you can do it. Don't juggle 10 things at once.

Re: Zed finishes Learn Python The Hard Way

#66
post #13

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

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.

Re: Zed finishes Learn Python The Hard Way

#67

I am training myself in Python with this book from a week or so. I know how to code in other languages and programming basic so I am not a first time coder... yet this little book is absolutely useful and I am enjoying it exercise after exercise. Learning trough practice FTW! Thank you Zed.

Fantastic. Keep on plugging through and if you hit any problems just ask me. I'm on twitter @zedshaw so just ask and I'll help.

Re: Zed finishes Learn Python The Hard Way

#68

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.

Don't copy, imitate. The book was very easy to write. Just lay out 52 exercises, 26 for super basic stuff, 26 for progressively more advanced stuff. Take about an hour or two every night and write a couple. Pretty simple really. You may not have my style in your writing, but you'll definitely get a book that is more Ruby than what I've written.

One warning though, if you think it'll be better to have the book crowdsourced, think again. Programmers seem to be pretty bad at teaching programming, so it's best to just write your book and have people give you feedback as you go.

Re: Zed finishes Learn Python The Hard Way

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

You are not mistaken, there is no chapter on functional programming. Why? Because "The Little Schemer" is a way better book for teaching better functional programming than I could possibly do in a Python book. Python's functional concepts are just not really that great, so I couldn't explain them very well.

Re: Zed finishes Learn Python The Hard Way

#70

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")]

You can also combine maps and filters in a list comprehension: suffix_str_lst = ['{0}_suffix'.format(x) for x in str_list if x[:4] == 'meep']

Read that out loud and tell me that doesn't grate on your ears? That's my basic test if code for the book would be understood by the reader. What you have here, this "symbol soup" is what makes programming hard for people in the beginning.
Post reply on HN