Live data from Hacker News

Zed finishes Learn Python The Hard Way

sheddingbikes.com

111–115 of 115 posts

Re: Zed finishes Learn Python The Hard Way

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

If you're not teaching pythons functional concepts, then you're not teaching python.

However I think you have accidentally... consider this short example which shows off first class functions, map, reduce, no side effects, and filtering.

  [(lambda a,b,p:(a+p,b+p))(x,y,2) for x in (1,4) for y in (10,15,22) if x*y > 25]
Python does functional programming without people even knowing that it is functional programming :)

Re: Zed finishes Learn Python The Hard Way

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

Thank you for posting this comment. I don't know why but this completely makes me think of context switching in the kernel and everything then becomes clear. I am guilty of "multitasking" and at the end of it accomplishing almost nothing, only recently have I realised the error in my ways. Your recent work and comment are confirmation that focusing on one thing at a time is the way forward when working on substantial tasks.

Re: Zed finishes Learn Python The Hard Way

#113
post #106
post #100

Earlier quoted context omitted.

It's a lovely chapter! Thanks for pointing it out. Programming as an intellectual activity is the only art form that allows you to create interactive art. ... . The world needs more weird people who know how things work and who love to figure it all out. It's inspiring to see him talking about the beauty of (software) engineering as a means of making which has the quality of an art.

The chilling part is Programming as a profession is only moderately interesting. It can be a good job, but if you want to make about the same money and be happier you could actually just go run a fast food joint. You are much better off using code as your secret weapon in another profession. People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology,…

Yes. As a physician (pathologist) who is also a hobby-hacker that is particularly inspiring.
Post reply on HN