Live data from Hacker News

Ask HN: How did you learn python?

news.ycombinator.com

11–15 of 15 posts

Re: Ask HN: How did you learn python?

#11
The best book I've found for learning how to get the best from Python's language features is Powerful Python: https://www.amazon.com/d/0692878971

'Idiomatic Python' is also good, but I would suggest that more for a beginner, or for someone transitioning to Python from another language. If you have a colleague who loops through a collection by creating an incrementing their own counter variable, then give them a copy of this book.

If you already use most of python's idioms correctly (e.g. if you've learned programming primarily from resources about python), get 'Powerful Python' to learn more about how things work under the hood, and learn ways to make your code more readable and/or more efficient (for CPU and/or memory).

Re: Ask HN: How did you learn python?

#12

The best book I've found for learning how to get the best from Python's language features is Powerful Python: https://www.amazon.com/d/0692878971 'Idiomatic Python' is also good, but I would suggest that more for a beginner, or for someone transitioning to Python from another language. If you have a colleague who loops through a collection by creating an incrementing their own counter variable, then give them a copy…

I just found this post talking about the book 'Idiomatic Python': https://hackernoon.com/going-beyond-the-idiomatic-python-a32...

It points out some limitations of that book, including one specific example (the 'evil robots attacking' part) that bothered me for the same reasons it bothered the article author.

Re: Ask HN: How did you learn python?

#13
post #7

I had prior experience with text processing and small scripting tasks with Perl, so I found it easier to learn Python I started with Automate the boring stuff videos, it was a good refresher to programming concepts as well. I used to conduct Perl basics workshop for my juniors at college, replacing it with Python helped me a lot - both during preparing reference notes as well as while teaching if finding an avenue to…

I used the Automate... book. I must say I never found a really good resource to move from that to OOP, unit testing etc. I put a lot of scraps together for that. 'Python 3 Object Oriented Programming' by Dusty Phillips was a help, but not the answer. Lot's of Googling did that.

I have not much personal experience with OOP either.. but have seen 'Fluent Python' recommended a lot for this..

Re: Ask HN: How did you learn python?

#14
I wrote a version control system for academics in it for a course in college with no training in it and a 4 week deadline. Then I forgot about it for a year or so and when I'd picked up and played around with 10+ languages in college under similar circumstances, I remembered it was nice and switched all my hobby projects to it. I think a year later I got a paying job using it, and properly "learnt" it by working through getting awesome at something I'd screwed up or done imperfectly in a code review every week.

Re: Ask HN: How did you learn python?

#15
post #8

I learnt it the hard way: https://learnpythonthehardway.org/

A lot of people seem to dislike Zed Shaw's books, but I think the book and the accompanying videos were great. It was less to do with the content, and more to do with the forced approach towards typing out every exercise, embracing failure, and working through.

My only gripe with the content is that it focuses on the initial learning of a language. Once I finished LPTHW I felt that I knew enough to do some basic dev, but nowhere near enough to feel productive in a professional setting. I know there's LMPTHW, but it'd be nice to see Zed Shaw cover more intermediate subjects - something like Cracking The Coding Interview in the style of his Learn The Hard way series.

Post reply on HN