Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
A primer on scientific programming with Python (4th ed.)
Langtangen H., Springer Publishing Company, Incorporated, Berlin, Germany, 2014. 872 pp. Type: Book (978-3-642549-58-8)
Date Reviewed: Feb 3 2015

This fourth edition is a wonderful, inclusive textbook that covers pretty much everything one needs to know to go from zero to fairly sophisticated scientific programming in Python. It uses Python 2.7. The author notes that a lot of useful mathematical software was written in Python 2 and has not yet been ported to 3; he suggest that users who wish to program in Python 3 use the 2to3 tool for conversion.

I’m an experienced C programmer who recently taught myself the basics of Python. This book would have been excellent to have for that transition since it covers conventions and language syntax, but also has detailed and pragmatic advice about how to install necessary packages for different tasks and the tradeoffs among the open-source options that are available.

Python and its ecosystem are very powerful, but can be difficult and annoying to navigate based on the online (and sometimes contradictory) resources that turn up in searches. This book is a good guide to creating consistent resources on Linux, Mac, and Windows computers, and introduces a range of free educational tools to assist in learning to write and debug Python code. The author also introduces libraries for symbolic computation and computational molecular biology, as well as the numerical Python (NumPy) package and several plotting packages.

The book assumes that the reader is comfortable with math up to some calculus (although most math concepts are at least minimally explained). About a third of the book is appendices that do end-to-end examples starting with deriving equations for physical problems and ending in code examples. One appendix derives and then numerically solves the ordinary differential equation for a weight hanging on a spring, a fairly complex project worthy of a computational numerical modeling course.

The book teaches programming using Python from the “Hello, World” level all the way to sophisticated discussions of class hierarchy. It is obvious that the author has been using the earlier editions in teaching for a long time, and the book is a highly evolved basis for a one or more semester course in beginning to intermediate scientific computing. Issues like rounding errors that are critical in this type of application are covered well and often.

The book is physically large and heavy (a price of its comprehensiveness) and might be rather intimidating upon first glance. It is so well organized, though, that it does not take too long to flip around and decide where to start reading to learn something in particular. Code source files from the examples are online and organized well in a GitHub repository.

The first 600 or so pages(!) of the book are devoted to what you would expect in a programming class. The author starts off with how to encode with formulas, and then moves on to loops and lists, functions and branching, user input and error handling, array computing and curve plotting, dictionaries and strings, classes, random numbers, and a bit about object-oriented programming.

This section is followed by four math-heavy appendices covering sequences and difference equations, introductions to discrete calculus and differential equations, and a complete differential equation project. The remaining appendices talk about compiling Python and include details about downloading and running it. The appendices are nearly another book in themselves, and the entire book is nearly 900 pages long.

In conclusion, this is a book that can guide a student in a class. It would also work for a scientist or engineer who wants to learn programming in the first place or transition to Python from another language. An advanced Python programmer who wants to learn scientific computing, and who likes to learn through example code, could also use this book to learn scientific computing. The emphasis is very much on the coding as well as the application, so advanced Python programmers might find the book to be a lot larger and slower moving than needed for their purposes.

Reviewer:  Joan Horvath Review #: CR143135 (1505-0339)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Python (D.3.2 ... )
 
 
Physical Sciences And Engineering (J.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Python": Date
Practical Python
Hetland M., APress, LP, 2002.  648, Type: Book (9781590590065)
Mar 28 2003
Python programming: an introduction to computer science
Zelle J., Franklin B, 2003. Type: Book (9781887902991)
Dec 2 2004
Foundations of Python network programming
Goerzen J., APress, LP, Berkeley, CA, 2004.  512, Type: Book (9781590593714)
Dec 26 2004
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy