Hacker News new | comments | ask | show | jobs | submit login
Best Open Python Books (revolunet.com)
229 points by kenneth_reitz on Aug 26, 2012 | hide | past | web | favorite | 31 comments



I'm a big fan of Text Processing In Python, which has excellent chapters on a bunch of topics including regular expressions, parsers and even compression algorithms. It's available online (from the author's own website) here: http://gnosis.cx/TPiP/


So, just for a bit of (opinionated) guidance, since the question of "What book should I read to learn Python itself" will never go away, if you are a beginner, I would recommend Zed Shaw's book there, or if you try it and don't like its style (or want to compliment it), then Downey's How to Think Like a Computer Scientist is also pretty good.

If you're already coming from some other language, or would classify yourself as something other than a beginner, the best resource is the official tutorial (http://docs.python.org/tut), which isn't listed on that list.

Also since it comes up so often, Dive Into Python is not a resource that I would recommend. From what I've seen, Google's video series is mediocre, and an OK intro if books are not for you. The recent Udacity course hasn't been too great from the small samples I've seen from it either, but I can't say that's enough to say "skip it" conclusively. I also was recently made aware of KOANS for Python (https://github.com/gregmalcolm/python_koans) which, though I haven't gone through it, I'd very much agree with ideologically as a good beginner's resource to complement a book.


I agree with this, but I'll throw out one other way to learn Python if you already know a programming language:

1. Blast through just about any book and type in all the code getting it all to run. DO NOT just read the book. Coders constantly equate "I read about it" with "I can do it".

2. Go to any web framework that has a decent tutorial and build whatever they have you build. If web isn't your thing then find your thing and do that.

3. Pick a random thing (website, game, log parser) and try to replicate a small version of it.

4. Then try writing all the major algorithms in that language. Linked Lists, Arrays, Hashmaps, Binary Trees, string search and some hashing at a minimum.

That'll get you up to speed in the language quick, assuming you already know a couple of other ones.


Zed - any reason you don't offer a mobi version? I bought the PDF version and, to be honest, the font is just too small (~6 pt?) to be legible on a Kindle.


rereading LPTHW now. Thanks a million, it is the only thing that has worked for me, looking forward to starting SQL!


Hey Zed! Thanks for all your great work! Signed, your student.


Paul McCartney does programming? Woah.


Zed Shaws's Learn Python the Hardway is a wonderful introduction to Python and because it is very concise, it makes for a handy review resource as well. There are a few portions that I recall were a bit confusing but Zed does a great job of monitoring the comments and giving extra help when necessary.

Likewise, the Django tutorial throws you off the deep end but working through it twice gives a good overview of how the different pieces tie together.

I must second JulianWasTaken's dislike of Dive Into Python. I tried working through the book but had trouble integrating the information and recalling code discussed in previous chapters.

All that said, I think the most important thing to remember when learning any subject is to find what works for you. Start with a recommended source but if it isn't working, don't be afraid to try a different source or style.


Would you expand on why you think Dive Into Python isn't a good resource? Many of the online reviews I'm reading state the contrary.


Read

    Dive Into Python Must Die
    http://oppugn.us/posts/1272050135.html
I pretty much agree with that. I bought the book and found it quite off-putting and though it was just me.


I still use ODBC. Didn't find the argument convincing."off-putting" describes that blog you linked. The hipster/programmer attitude is like smelly feet.


From what I remember there's a heavy xml processing bias, the python isn't that idiomatic (partially due to new features being introduced since its publishing date) and the libraries used for particular tasks aren't the best. Most of its problems stem from it being dated. I think Mark Pilgrim is a good author and teacher though, and even now this might make up for its faults to a degree.


I would disagree. I personally used Dive Into Python to learn Python. If you know programming, Dive Into Python is a great Python primer. Besides, reading is useless. You want to write code as soon as possible.


There's also "Good to Great Python Reads": http://jessenoller.com/good-to-great-python-reads/


Learn Python The Hard Way (by zed shaw) http://learnpythonthehardway.org/

The online HTML version is free



http://web2py.com/book I never see any of the cool guys mentioning web2py. Thinking of using it in an upcoming project. Wonder what is "wrong" with it? :-)



And if I may add mine - the arguments brought forth by Jacobian (Kaplan Moss, of Django fame) and Mitsushiko (Ronacher, of Flask fame) belong in the fiction department. Hundreds of web2py apps later, no one is confused by the additional 15 builtins, or by the concat-then-exec behavior. I am active on the web2py mailing list, and in two years and thousands of newbie questions, I don't remember a single one where this caused the fearful confusion that jacobian and matsushiko fear so much.

If you have any experience programming and want to learn Python for the purpose of developing web applications, the web2py book is a good resource.


Any idea why The Django Book (http://www.djangobook.com/) is not on the list? It seems to be the go-to Django beginner's book for many people.


The Django Book, though great, is ridiculously out of date - the print version is written for Django 0.96, the incomplete web version is for Django 1.0, and Django 1.4 was just released.

It's a great resource, and was very useful to myself when learning Django back in the day, but the regular Django docs have far surpassed it on my made up usefulness scale.


Well I guess that makes sense, seeing that version 2 hasn't been updated since 2009. Too bad though, it is really well-written.


Here's one, Building Skills in Python: http://www.itmaybeahack.com/homepage/books/python.html


Learning Python by Mark Lutz is worth a mention for those who want to understand the "why" as well as the "how".


But Learning Python isn't free, is it?


Ah, yes, correct.


I would add the Python Cookbook. Technically the book is not free but all the code is available at ActiveState.


The Python Challenge is a great way to apply what you learned from other resources towards a fun practical experience: http://www.pythonchallenge.com/



Thank you. Nice to have them in one place and free at the same time.


thanks for the links.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: