Are you a reasonably competent Python programmer yearning for new mental challenges? Allen B. Downey’s Think Complexity definitely can deliver some. His well-written new book can help you dive into complexity science and improve your Python skills at the same time.
Right away, you will see that Think Complexity is not just another how-to-program-in-Python book.
“This book,” Downey states, “is about data structures and algorithms, intermediate programming in Python, computational modeling, and the philosophy of science.” Hello, new world.
His new work, he adds, sprang out of a blending of “boredom and fascination: boredom with the usual presentation of data structures and algorithms and fascination with complex systems. The problem with data structures is that they are often taught without a motivating context; the problem with complexity science is that it usually is not taught at all.”
Complexity science is the scientific study of complex systems – which can be anything from computer networks to the human brain, global markets, ecosystems, metropolitan areas, space shuttles, ant trails, and countless other “systems.”
Complexity science is practiced “at the intersection of mathematics, computer science, and natural science,” Downey says.
How does “the philosophy of science” fit in? Downey’s book offers “experiments and results [that] raise questions relevant to the philosophy of science, including the nature of scientific laws, theory choice, realism and instrumentalism, holism and reductionism, and epistemology.”
Think Complexity “picks up where Think Python left off” and is intended to appeal to the “broad intellectual curiosity” of software engineers and their “drive to expand their knowledge and skills.”
There are case studies, exercises, code samples and even mini-lessons within the exercises. One brief example: “Hoisting is a way to speed up code by moving an expression that does not change out of a loop.” (Hoisting then is applied in a discussion involving Fast Fourier Transform and the Danielson-Lanczos Lemma.)
Not every exercise has an answer against which you can check your work. So you probably shouldn’t jump into this book just now unless you feel confident you are an intermediate-level Python programmer and you are open to wide-ranging mental challenges.
Head First Python by Paul Barry is a fun, “brain-friendly guide” nicely tailored for beginners who want to advance from “What’s Python?” to understanding how to use the language in real-world applications. The book is written for 3.X versions. And it uses multiple learning methods (often in amusing ways) to help impart the necessary how-to information.
Once you gain a basic understanding of Python, Mark Lutz’s book Learning Python is recommended as the next step. His 4th edition covers both the 2.6 and 3.X versions. If you are a complete Python beginner, you might want to put this book second on your list, rather than dive into it from a cold start. It has 39 chapters and 1162 pages, and it weighs nearly four pounds – which can make it seem a very intimidating starting point. Still, it is a well-written, self-paced tutorial, and it can help you advance to intermediate-level Python programmer and beyond.
Students at Olin College (where Allen B. Downey is a computer science professor) wrote the case studies for Think Complexity. (They were edited by Downey and his wife and reviewed by other Olin faculty members). Appendix A of Downey’s new book contains a call for readers to submit additional case studies.
“Reports that meet the criteria [explained in the appendix] will be published in an online supplement to this book, and the best of them will be included in future print editions.”
This may be an offer – and a Python challenge — you can’t refuse.
– Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.