True story: many years ago, while studying applied mathematics, a young man took a one credit hour course in programming. This consisted of an introduction to FORTRAN II and a single assignment: write a program to triangularize a matrix. Now, having taken courses in linear algebra and in numerical analysis, the young man knew the mathematics involved, but found that writing a simple program to have the computer do it was hard--very hard. He just couldn’t get his program to compile, and when the program compiled, it wouldn’t give the expected results.
Eventually he sat down and thought through every single step that needed to be done and the order in which these steps should be done. For more than an hour, he concentrated carefully and thoroughly until he had no doubt that the process would work. He then wrote, compiled, and ran a new program, and got the correct results--without any bugs--on the initial run.
In a clear moment of insight, he realized that knowing the mathematics was one thing; that knowing how to write a program
to work it out was a different thing altogether; that knowing the rules of the programming language involved was indispensable
but insufficient; that debugging was very hard; that the best way to deal with debugging was not introducing bugs in
the first place; and, finally, that validating the results is absolutely essential.
That young man was me.
That process--thinking, writing (we call it “programming”), testing, validating--was not taught in colleges then,
and may be haphazardly taught now. The emphasis, especially for budding scientists and engineers who will not
become programmers or computer scientists, is usually on teaching the elements of a programming language.
On the other hand, Programming for computations - Python highlights the entire software development process
while introducing the Python ecosystem and solving problems along the way. That is what makes this book stand out
from numerous other books about programming for scientists and engineers--books that tend to focus on either the
science or the programming language, and end up mentioning the entire programming process briefly at best.
The book explains Python from the ground up, while bringing into play some serious science and keeping the discussions
interesting and nontrivial from the beginning. Also introduced are the IPython shell and packages such as numpy, sympy,
and matplotlib--what I call the Python ecosystem. Along the way, problems in various branches of science are analyzed and solved numerically and graphically; each topic is successively elaborated, while the corresponding solutions are generalized. The result is very effective, giving the reader a sense of progressive appreciation and understanding.
The second edition of this book uses Python 3.6. The first edition, which David Naugler reviewed in CR145057 , used Python 2.7. This is the main difference. The introductory material has also been expanded, and minor changes
and enhancements have been made throughout.
This book merits careful study. It gives readers what they need to develop numeric and graphical solutions to
problems in engineering, science, and mathematics: the necessary theoretical background, plus sufficient Python and a
solid grasp of the programming process. Science and engineering students would obviously benefit from this book. It would also be useful to
applied mathematics students and to professionals interested in learning Python or in seeing it
applied to solve scientific problems.
Programming for computations - Python (2nd ed.) is a SpringerOpen textbook; online access is free,
but I must admit that, while convenient (I could easily read it even on an iPhone), I preferred reading the printed
book, which I recommend highly.
More reviews about this item: Amazon