This one is not an easy one. Allen guides you through the various, complex, algorithms and data structures. This book is not for a beginners - you have to know Python already to solve exercises presented by author. The complexity of the book itself is also rather for slightly advanced developers. If you just start your journey with Python development it may be hard to follow.
What I liked, however, is the way Allen presents the material. He tries to show you different aspects of the development process and refers not only to computer science but to philosophy and mathematics as well. Even if you won't be able to solve all the presented puzzles it is still worth getting through the book.
Few remarks regarding what I really liked in the book. First of all, Allen provides you with lots of references. So, if you are interested in particular topic, you have plenty of sources to start with. Secondly, Allen provides you with references to Wikipedia very often. This is not regarded usually as a good source among "university like people", however I like this kind of approach a lot.
In an airport waiting for another long-haul flight, I bought "Critical Mass" by Philip Ball to get some intellectual stimulation. It gave a me a completely new view of the world: A world of complexity, evolution & emergence appeared out of the blue in the 8 hour flight. I landed with a sharp contrast in mind from the reductionist engineering background I left another continent with. I caught myself standing in the border control queue, waving the hot air from my face with my passport, wondering: How do I apply these concepts & ideas?
Two and a half years later I know how, thanks to Allan Downey's Think Complexity. A book that takes your through a supremely structured self-learning program of getting the concepts of complex systems under your skin.
Be warned, when you start with his other books (learning python, think stats, etc.) there is no indication of the density of knowledge in this book. It is a complete course in engineering in pocket-format. It is brilliantly assembled, but don't be deceived by it's number of pages: Completing the exercises in the book will be time-consuming and it will change the way you solve problems.
I would proudly recommend it any-time to an enthusiastic Python'eer, but also warn that it is not for the faint-hearted casual reader.
The book makes heavy use of graphics and mathematical symbols : unfortunately the kindle (I am using a Paperwhite) version doesn't render most of these symbols or graphics properly. Until the kindle edition gets fixed - I would suggest the paper version only ; the Kindle version is very difficult to comprehend at this point. I have actually submitted 'content errors' directly from my Kindle , but I never heard anything back.
I am currently halfway on in my CS degree, and had a few doubts that the degree (and branch of science) is any good.
I got this book a rainy evening, and went through it in a fortnight. And it made me enjoy every last bit of it. It comfortably mixes technicalities and background history of science and how the topics came to be. More importantly, it put me back on track, showing how the science of complexity is a great topic.
I doubt it's the right book to get if you don't have any prior knowledge of the topic encompassed, but I am quite sure that Downey's earlier 'Think Python' would be a valuable introduction.
I'm currently going through the book a second time, more slowly though...
I am teaching myself Python. Not from scratch, because I can already program in other languages. But that’s part of the problem: because I know how to program, I am learning Python from the on-line documentation (which could be better) and Stack Overflow (which in invaluable). This means I can find the constructs I look for; but what about the ones I don’t know exist?
So I’ve been thinking about getting a book, to help fill the gaps. I came across Think Complexity, a slim book (130pp) that claims to be targeted at an intermediate level, with the bonus of using examples from Complexity Science, a subject I also study.
It starts off well, with a mention of Python generators (which I had come across as a concept) and their “yield” statement (which was new to me). Yet the discussion is very brief: less than a page. I wanted to know more, as it sounded interesting, and made me wonder if the approach would allow coroutines. So I googled, and found David Beazley’s excellent tutorials, one on Python generators, using them in a functional manner to implement processing pipelines, and one, indeed, on coroutines. There is a lot more than even hinted at in Think Python.
Next comes a chapter on algorithmic complexity and “big O” notation that introduces Python list comprehensions. Now, it’s virtually impossible to have visited Stack Overflow more than a few times without having come across list comprehensions: they are marvellous beasts. However, their introduction here crystallised my apprehension with the book: they are explained with just a few examples only. Examples can be great for showing what is possible, and the examples here are good in that they start trivial and get more complicated. But you also need a description of the underlying syntax, so that you know that you have inferred the structure correctly from the examples, and to cover usages not illustrated by the examples.
The chapter on Cellular Automata uses NumPy arrays, but doesn’t talk about them much. NumPy is excellent for doing anything with arrays, and if you have come to Python via Matlab, like I have, you will feel right at home with them. One interesting snippet made here is an efficient way to implement Conway’s Game of Life using convolution from SciPy (although Bill Gosper’s HashLife, underlying Golly, is faster, and more interesting algorithmically).
Then there are brief chapters on fractals, self-organised criticality, and agent-based models. But not a lot more Python. The book finishes up with several case studies prepared by students following up some of the concepts in the book; these are probably the most interesting parts. However, they are interesting mainly from a complexity viewpoint, not really from a Python viewpoint.
In summary, although this is advertised as “intermediate level” Python, it doesn’t go very far beyond what you can pick up readily from Stack Overflow. However, the idea of teaching a programming course using fun examples from Complexity Science is a good one: so many texts use relatively boring examples with little motivation. It is clear here from the chapters contributed by the students that they really engaged with the material.