13 ms·
Think Python, 3rd Edition
- fbdab103 3y agoWhat luck! I just started mentoring someone in Python, and I am a huge fan of Downey. Truly an outstanding educator and renaissance man. Will definitely keep my eye on this.
- jph00 3y agoSo excited to see this coming! When we used Jupyter Notebooks to publish Practical Deep Learning for Coders, we discussed with Allen the idea of doing the same for some of his books. Now it's actually happening. :D Even better, he's taken it further by adding cool tools such as a Jupyter-based turtle that shows inline graphics in the notebooks. I strongly suspect this will turn out to be the best way to learn Python programming when it's released. Oh and I just remembered, we even showed a proof-of-concept of converting some of the 2nd edition of this book into nbdev notebooks: https://github.com/fastai/nbdev_cards/blob/master/01_deck.ipynb https://github.com/fastai/nbdev_cards/blob/master/01_deck.ip... . That notebook is rendered as this HTML: https://fastai.github.io/nbdev_cards/deck.html https://fastai.github.io/nbdev_cards/deck.html
- stuaxo 3y agoHaving code you can hide like this looks great foe documentation, I've been looking for something like this for a while.
- fifilura 3y agoI am proud of you! I loved Think Bayes and Think Stats, but it felt a bit off when everyone else were using notebooks. When I learn a new language with e.g. AdventOfCode, my first task is building a jupyter image for it.
- asicsp 3y agoI had read the second edition when I was still relatively new to Python. I even spent a few weeks trying to translate the book to Ruby. Found it a great experience, especially the friendly prose and excellent exercises.
- BadHumans 3y agoThis book gets overlooked in favor of other ones such as Python Crash Course but I really enjoyed reading through Think Python 2e and will read through this version as well. Check out the rest of his books on Green Tea Press.
- wyclif 3y agoI also like PCC. What do you think the pros and cons are of PCC v. TP3e? They are really two different types of books in terms of pedagogy.
- BadHumans 3y agoPython Crash Course teaches Python while Think Python teachers computer science using Python. You are right that they are two different books but people recommend Python Crash Course for beginners when Think Python is a much better recommendation for them in opinion. If you just need to learn Python then PCC is a great book.
- aitchnyu 3y agoTangential, is there a book to learn typing? I feel I need a hefty book to learn typing. Don't mind if you recommend a Typescript book or other language with similar concepts.
- h4ch1 3y agohttps://www.cis.upenn.edu/~bcpierce/tapl/ https://www.cis.upenn.edu/~bcpierce/tapl/ This is a comprehensive resource that I use as a reference. Happy reading!
- quickthrower2 3y agoThat is a big topic. Learning typing in Go will be easier than Typescript which is orders more sophisticated. In Typescript you can solve Sudoku in the type system! Then there is the theory of type systems. But if it is the day to day just use it, it will make sense. You are just describing what the type of something will be in code rather than let it be figured out at runtime.
- NegativeLatency 3y agoHaskell might be a fun if indirect way to learn more about a type system. It’s a neat middle between academic typing systems and a language you can do real stuff with. Typescript might be nice because of how it’s a gradual typing system, just try and do a bit more and more with it as you go.
- asicsp 3y agoNot a book, but this might help: "Python Type Challenges" (https://github.com/laike9m/Python-Type-Challenges https://github.com/laike9m/Python-Type-Challenges) — Master Python typing (type hints) with interactive online exercises
- magnio 3y agoI can recommend Total Typescript by Matt Pocock, a course and a collection of tutorials. He is writing a book in public at [0] as well. A bit more advanced, and geared towards library authors, is Type-level Typescript.[1] [0]: https://github.com/total-typescript/total-typescript-book https://github.com/total-typescript/total-typescript-book [1]: https://type-level-typescript.com/ https://type-level-typescript.com/
- elbear 3y agoThis is the book that got me started with programming, so I'm grateful to Allen for it.
- dang 3y agoRelated: Think Python 2e - https://news.ycombinator.com/item?id=35421096 https://news.ycombinator.com/item?id=35421096 - April 2023 (30 comments) Think Python: How to Think Like a Computer Scientist - https://news.ycombinator.com/item?id=1586000 https://news.ycombinator.com/item?id=1586000 - Aug 2010 (9 comments)
- bikingbismuth 3y agoThink Python 2e changed the trajectory of my life. I took a single Java class and hated it so much I gave up on programming. A few years later as a network engineer I had a problem that seemed like it could be scripted and ended up picking up Think Python and fell in love with the language and programming in general.
- ambrose2 3y agoSimilar for me - I had learned some Java, Matlab, C, Perl here and there but it wasn’t until Think Python 2e that I was gripped and from there read many other books and changed my career to software.
- el_oni 3y agoWhat other books did you read that you would recommend?
- ambrose2 3y agoI enjoyed “Data Structures and Algorithms in Python”!
- rmbyrro 3y agoCouldn't this result be more attributable to Python itself than the book?
- eru 3y agoIn the abstract, yes. But I also know that Think Python is a great book. (I came across Think Python when I was trying to help other people learn how to program. So I did not learn programming from Think Python, and Python is also not my favourite language. (It's also not my least favourite language, either. Far from it.))
- ambrose2 3y agoMaybe, but I think the book really was different from any book I had read before. Most books teach the language, but Think Python showed me some of the why, what each data structure might be used for, it would quickly dip into some interesting implementation details to give me a more solid foundation and then zoom out and give me perspective on why something is useful and related software writing skills and tips. It was thorough, but also concise, and the exercises were engaging, so I found myself for the first time really getting sucked into the zone with the problems and time was flying by. This hadn’t happened to me with Java or Perl.
- dod9er 3y agoI love the Jupyter-/Colab-approach and would like to join the journey... and support the project by buying the book (although I don´t need it to follow the Colab?). But without subscribing to the OReilly-learning platform it seems that buying it on amazon is the only option, right ?
- bemusedthrow75 3y agoIt's a pre-order even on Amazon. The publication date for the book isn't until later in the year (at least for the edition available in the UK, which will probably be the same): https://www.whsmith.co.uk/products/think-python-how-to-think-like-a-computer-scientist-3rd-revised-edition/allen-b-downey/paperback/9781098155438.html https://www.whsmith.co.uk/products/think-python-how-to-think... https://blackwells.co.uk/bookshop/product/Think-Python-by-Allen-B-Downey/9781098155438 https://blackwells.co.uk/bookshop/product/Think-Python-by-Al... (Blackwells think September, incidentally, whereas WHS think the end of July) Amazon just list books way, way earlier in pre-order than a lot of places.
- wjnc 3y agoGreen Tea Press (by Prof. Downey) has a donate button. That's probably a more efficient means of supporting the project than buying the book, considering all the middlemen.
- dod9er 3y agoOh my ..., was skipping too fast through the page and didn´t see this, and also didn´t realize what he exactly is doing with his Textbook Manifesto etc. Ok, the Paypal-Link is a no-brainer for me now. Thanks for pointing out the obvious.
- librasteve 3y agoI love these books … in my case Think Perl6 (now Think Raku) was a real eye opener. A quick scan of the new Python 3rd edition looks like it is quite dumbed down - which is probably appropriate for Python. I highly recommend the intro to Functional Programming in Raku (chapter 14). https://greenteapress.com/wp/think-perl-6/ https://greenteapress.com/wp/think-perl-6/
- andai 3y agoCool, I didn't know about this book! I enjoyed Think Python, but this book surprises me. I'd think there are very few people learning Perl / Raku as their first language nowadays, so a book targeting more experienced programmers seems like it would make a lot more sense.
- lizmat 3y agoAt one point I started writing a book about Raku for Perl programmers. For various reasons, I did not finish that: but what did got written, wound up as a 24-part blog series on dev.to: https://dev.to/lizmat/series/24075 https://dev.to/lizmat/series/24075
- wyclif 3y agoWhat do you mean that TPe3 is "dumbed down"? I didn't notice anything appreciably reduced in the content yet but then again I haven't gone through and compared both editions, so I was interested in your comment.
- wyclif 3y agoOkay, apparently he re-wrote some of the problems and did some prose edits. I'm still not sure why that makes the new edition "dumbed down."
- skotobaza 3y agoWhat are some books for mid to advanced programming in Python? I already know Puthon and programming in general but want to improve my Python skills. I know only Fluent Python which I'm currently reading, and CPython Internals.
- nickelpro 3y agoI mean, the docs? And the source code? At a certain point of expertise, everything after basic journeyman familiarity, there's nothing left but to read code and write code.
- stefanos82 3y ago`Fluent Python` is more than enough; the rest of the language features you will understand them by reading the official reference manual.
- eru 3y agoYou could also look into more general algorithm and data structure books, or into design books. https://www.redblobgames.com/ https://www.redblobgames.com/ has lots of really nifty articles, too.
- __mharrison__ 3y agoYou might want to consider books that show application of techniques in real world practical code. For example, Effective Pandas 2 illustrates common patterns for dealing with tabular data. Along the way, it uses comprehensions, lambdas, unpacking, etc. Shows how to use pytest to refactor. Leverage visualization to understand data. (Disclaimer: I'm the author)
- sn9 3y agoYou might want to check out Exercises in Programming Style (2nd Edition) by Cristina Videira Lopes. It's a little known book that explores different ways of solving the same problem under different constraints.
- brunooliv 3y agoThis book ALSO changed my life when I was first learning programming!! Not so much in terms of a pivot but of the way the book was written itself and how some concepts all of a sudden just made sense as a total freshman. Now, ~10-15 years later, seeing this third edition is such a nostalgia and I can't recommend this book enough!!!
- caturopath 3y agoLove Think Python, I have recommended it to so many learners: it balances the various concerns of a new programmer book really well. Allen Downey has a bunch of other books with somewhat similar approaches too https://greenteapress.com/wp/ https://greenteapress.com/wp/ -- some I do think he might have gone too far in the low-rigor side, but all the ones I've reviewed have been pretty good. (I was sharing a table at a conference with Allen some time ago and told him how many times I'd recommended or bought people his books, and I think he thought I was bullshitting him.)
- bmitc 3y agoHow does one do proper concurrency in Python? As in separate "processes" running with encapsulation, fault tolerance, etc. For example, how does one bundle up a TCP client in a "process" such that the process handles failed connections, broken connections, retrieving data at periodic intervals (relatively fast), receiving "messages" from other "processes", etc.? There's Ray, Pyro, Pykka, Celery, multiprocessing, asyncio, threads, Qt, and more, but all of them have issues. And a lot of it boils down to the GIL, although "processes" that are doing I/O such as TCP and other network communication should ideally reduce the GIL effect, to my understanding (is that right?). From what I can tell, it's basically one of the worst language choices for systems of this nature, but I am trying to figure out how to do it because I need to.
- andai 3y agoSomething something libuv?
- da39a3ee 3y agoCan you give an example of what you consider a good solution in a different language? That will help us see exactly what you're looking for and how/whether it might be achieved in Python.
- bmitc 3y agoErlang and Elixir. :)
- staticautomatic 3y agoWell RabbitMQ is built in Erlang so there you go :)
- bmitc 3y agoBut RabbitMQ is just a messaging bus, isn't it? That doesn't handle the processes (operating system processes or virtual processes) actually processing the messages and those processes handling fault-tolerance for the things they're connected to.
- F00Fbug 3y agoThis has been a great resource - I love this book! For the last 5 years, I've taught an intro to programming class at the college level and I always recommend that my students augment their resources with this book. Glad to see it evolving!
- irrational 3y agoDoes anyone know how to report issues with the first chapter? I don't see a way to leave feedback.
- hoppyhoppy2 3y agoMaybe https://github.com/AllenDowney/ThinkPython/issues https://github.com/AllenDowney/ThinkPython/issues
- irrational 3y agoThanks!
- xoxxala 3y ago“If you have comments, corrections or suggestions, please send me email at feedback{at}thinkpython{dot}com.“
- peruvian 3y agoApologies for changing the subject, but aside from real world experience (which I have and am getting at work), is there a resource of similar quality for more intermediate/advanced Python programmers? I always feel like there's a big chunk of the language or stdlib I do not know.
- jjice 3y agoI enjoyed Effective Python. It's a "tips" style book with a good handful of recommendations with use cases and applications.
- bikingbismuth 3y agoIt’s a bit older, but I learned a lot from “Writing idiomatic Python”. Honorable mention to “the little book of Python antipatterns” as well.
- leetrout 3y agoLinks for anyone else interested as I was https://jeffknupp.com/writing-idiomatic-python-ebook/ https://jeffknupp.com/writing-idiomatic-python-ebook/ https://docs.quantifiedcode.com/python-anti-patterns/ https://docs.quantifiedcode.com/python-anti-patterns/
- zerkten 3y agoFluent Python and Effective Python are good books. The former is huge and is really multiple books in one.
- theptip 3y agoI like https://effectivepython.com/ https://effectivepython.com/ Also just reading Norvig’s annual Advent of Code implementations usually provides some insight on how to write elegant and concise Python code.
- billbrown 3y agoLooks like there's a new edition coming in March. https://www.amazon.com/Effective-Python-Specific-Software-Development-dp-0138172188/dp/0138172188 https://www.amazon.com/Effective-Python-Specific-Software-De...
- febeling 3y agoWhat is a good book for learning Python when you already now some/many other languages?
- d0mine 3y agoJust follow the tutorial (yes, really) https://docs.python.org/3/tutorial/index.html https://docs.python.org/3/tutorial/index.html
- autoexec 3y agoIt's what I started with, but honestly it's not great. It also heavily overemphasizes the interactive interpreter
- d0mine 3y agoREPL is kind of the point: did you try to type and run any of the examples in the tutorial? Just skimming it would be less useful (for the very basics). If you already know everything in the tutorial, then try a project in Python that you did previously (familiar project, new language—Python).
- sn9 3y agoProbably Python Crash Course.
- orzig 3y agoThe author also blogs his latest Python projects (mostly Bayesian data analysis) on https://www.allendowney.com/blog/ https://www.allendowney.com/blog/ , which I have really enjoyed.
- lynguist 3y agoI use the 2nd edition when I teach intro to programming. The students uniformly love this book and prefer it over any university provided material.
- mharig 3y agoHave a look at https://realpython.com/ https://realpython.com/
- nullptr_deref 3y agoHey genuine question, Why would anyone bother with learning anymore? When is learning enough to get started? How will someone get started with work? What qualifies someone to start a new position? Pretty sure only smart people will be hired for the roles. No matter what I do, I am forever unqualified, even from junior roles. 1. Have post grad degree 2. Have internships 3. Have only part time or short tenure roles. But can't get into any industrial role. Why? Means, I die? What qualifies for a job? Well one option is to go back to shithole country I came from and just stay there earning pennies. With the money I make there affording a new mac will take 2 years salary. So that is the kind of shithole I am talking about. Seriously, why?
- itsoktocry 3y ago>Pretty sure only smart western people will be hired for the roles. Everywhere I've ever worked in tech, in my 20 year career, has had people from all backgrounds.
- andai 3y agoI particularly enjoyed this passage from an older edition of Think Java: https://files.catbox.moe/v1vgdc.jpg https://files.catbox.moe/v1vgdc.jpg Also neat: > What happened next is the cool part. Jeff Elkner, a high school teacher in Virginia, adopted my book [Think Java] and translated it into Python. He sent me a copy of his translation, and I had the unusual experience of learning Python by reading my own book.
- ListeningPie 3y agoIs it really so difficult to learn loops and objects? It’s always been syntax and not knowing how to use library that tripped me up.
- hilux 3y agoThe previous edition of this book is my very favorite guide to Python, in a very crowded field!
- rami3l 3y agoMany thanks for this book! Think Python 2nd is the first book I've ever read in order to teach myself programming. Now I've come a long way to become an actual developer shipping real products and have certainly learned a whole lot more on the topic, but I still think the first steps are the most important/difficult ones. Although I've moved away from Python towards other platforms such as Rust, the basic concepts covered in this book are still very much relevant. I'm really excited to learn that Think Python has become more modern and interactive with this update!
- rldjbpin 3y agosince the new edition will use jupyter to run all the code, i wonder if would also address how to debug efficiently in jupyter. in the meanwhile, how has your personal experience been around this? what worked for you, especially when you use a third-party notebook solution where you may not be able to install jupyterlab extensions?