So 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.
Think 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.
I am considering changing the trajectory of my own life, towards a more community/maker/teacher role, and I have a freelance/small business idea about teaching but I need sort of "soft syllabus" materials.
I am learning Python myself, having just never had a need for it in all of my professional web development life (I've written apps in just about every other web-focussed programming language, including Perl and Ruby).
It looks like the right language to teach general concepts in, and having a book I can draw from will help.
Just as an counterexample, I started with bash/Perl, moved to Python and really liked it and then started getting issues due to dynamic typing. Around that time, Java was chosen to be the main language for our team and once I saw the benefits of static typing, there was no looking back. Since then Python has come a long way with optional typing support and IDEs to help enforce it but by now I am forever biased in favor of statically typed languages. I still enjoy Python for writing utility scripts because it is so much more polished compared to just using bash (which has its own place obviously) - but if I have the option of choosing a language for a full fledged application, I would prefer Java/Scala etc (Rust is great but the learning curve is way too steep for most mortals).
I do admit that I haven't had the first-hand experience of optional typing in Python supported by something like PyCharm so it is possible that the tooling has brought the experience to be comparable to working with a statically typed language. If someone has used IntelliJ community edition with Python typing-enforcement turned-on, please share your experience.
It's a lot easier to appreciate Java when it isn't your first language. I think it's really important for new programmers to have a streamlined experience to their first magical moment with programming, when they understand they can do cool stuff and succeed by being persistent. ("Streamlined" may be overstating it, there will be lots of friction along the way, but it should be caused by bugs they introduced themselves and overcome by debugging, not by tangential or environmental factors.)
There's a lot of context and drudgery involved in programming that can dissuade people before they get to that magical moment, and they can blame themselves and think they weren't smart enough because they don't understand that the deck was stacked against them. For instance with Python, broken virtual environments can be really dissuading for new programmers.
I think Java's opinionated and verbose nature can be cumbersome to beginners, who have never debugged a type confusion issue and so don't give a hoot about static typing. But I think after programming in Python for a while, they'll see why eg declaring what exceptions you'll raise is tremendously helpful.
Similar 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.
Same here. I moved cities and was looking for a job... I printed a copy of this book and started going through the chapters... This book made me into a software engineer :)
Love 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/ -- 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.)
Apologies 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.
Whenever a new version is released, I read its What's New documentation.
Beyond that, I like to read source code, both for the stdlib and popular third-party packages. This advice generally applies when I'm learning any new language or re-familiarizing myself with one, not just Python.
I really enjoyed Fluent Python a while back as an intermediate book.
Python official docs are not completely horrible, but compared to most other popular languages (Kotlin, Scala, Rust, Go at least), the Python official docs are kind of meh.
I suppose Python docs beat C and C++ which do not have official docs besides the spec. (not counting K&R and Bjarne's books).
Also I guess Javascript does not have official docs (ie MDN is not official)
I have bought this book for every friend learning python for work purposes, really fleshes a lot out that's not taught implicitly. The data model stuff is really useful.
Humble Bundle had some nice collections on Python for many uses. For in general, I remember that Serious Python and Automate the Boring Stuff with Python were both good.
* Practices of the Python Pro (https://www.manning.com/books/practices-of-the-python-pro) — learn to design professional-level, clean, easily maintainable software at scale, includes examples for software development best practices
* Advanced Python Mastery (https://github.com/dabeaz-course/python-mastery) — exercise-driven course on Advanced Python Programming that was battle-tested several hundred times on the corporate-training circuit for more than a decade
You 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.
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.ip... . That notebook is rendered as this HTML: https://fastai.github.io/nbdev_cards/deck.html
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.
I am considering changing the trajectory of my own life, towards a more community/maker/teacher role, and I have a freelance/small business idea about teaching but I need sort of "soft syllabus" materials.
I am learning Python myself, having just never had a need for it in all of my professional web development life (I've written apps in just about every other web-focussed programming language, including Perl and Ruby).
It looks like the right language to teach general concepts in, and having a book I can draw from will help.
I do admit that I haven't had the first-hand experience of optional typing in Python supported by something like PyCharm so it is possible that the tooling has brought the experience to be comparable to working with a statically typed language. If someone has used IntelliJ community edition with Python typing-enforcement turned-on, please share your experience.
There's a lot of context and drudgery involved in programming that can dissuade people before they get to that magical moment, and they can blame themselves and think they weren't smart enough because they don't understand that the deck was stacked against them. For instance with Python, broken virtual environments can be really dissuading for new programmers.
I think Java's opinionated and verbose nature can be cumbersome to beginners, who have never debugged a type confusion issue and so don't give a hoot about static typing. But I think after programming in Python for a while, they'll see why eg declaring what exceptions you'll raise is tremendously helpful.
(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.)
https://docs.python.org/3/tutorial/index.html
https://docs.python.org/3/library/index.html
Whenever a new version is released, I read its What's New documentation.
Beyond that, I like to read source code, both for the stdlib and popular third-party packages. This advice generally applies when I'm learning any new language or re-familiarizing myself with one, not just Python.
Python official docs are not completely horrible, but compared to most other popular languages (Kotlin, Scala, Rust, Go at least), the Python official docs are kind of meh.
I suppose Python docs beat C and C++ which do not have official docs besides the spec. (not counting K&R and Bjarne's books).
Also I guess Javascript does not have official docs (ie MDN is not official)
Also just reading Norvig’s annual Advent of Code implementations usually provides some insight on how to write elegant and concise Python code.
https://jeffknupp.com/writing-idiomatic-python-ebook/
https://docs.quantifiedcode.com/python-anti-patterns/
https://pymotw.com/3/
* Serious Python (https://nostarch.com/seriouspython) — deployment, scalability, testing, and more
* Practices of the Python Pro (https://www.manning.com/books/practices-of-the-python-pro) — learn to design professional-level, clean, easily maintainable software at scale, includes examples for software development best practices
* Intuitive Python (https://pragprog.com/titles/dmpython/intuitive-python/) — productive development for projects that last
* Advanced Python Mastery (https://github.com/dabeaz-course/python-mastery) — exercise-driven course on Advanced Python Programming that was battle-tested several hundred times on the corporate-training circuit for more than a decade
I know only Fluent Python which I'm currently reading, and CPython Internals.
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)
https://www.redblobgames.com/ has lots of really nifty articles, too.
It's a little known book that explores different ways of solving the same problem under different constraints.
At a certain point of expertise, everything after basic journeyman familiarity, there's nothing left but to read code and write code.
Think Python 2e - 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 - Aug 2010 (9 comments)
Will definitely keep my eye on this.