Computer programming has become a necessary skill for many scientific and engineering disciplines beyond computer science, at least at its most basic level. Every scientist and engineer should be able to write small programs and simple scripts to process data, perform numerical computations, and use basic data visualization tools. Hence the success of the E7 course taught by the authors and taken by most engineering freshmen at the Berkeley College of Engineering.

The material in this book follows the standard material of the E7 course: “Introduction to Computer Programming for Scientists and Engineers.” It teaches the rudiments of structured programming using MATLAB and provides an introduction to numerical methods.

From a methodological point of view, MATLAB, with its weakly typed programming language, may not be the most suitable tool for teaching computer programming, yet its interactive shell and its unmatchable toolboxes for every imaginable aspect of scientific computing make it a powerful tool for scientists and engineers who might not need a more rigorous introduction to software design since they will not build large and complex software systems. In the first half of the book, the authors gently introduce the foundations of the MATLAB programming language, its data types, and its control structures. Students learn how to write their own functions and scripts, as well as how to read, write, and visualize datasets. Readers are also introduced to recursion and the big O notation used to characterize the complexity of computer algorithms. They also become aware of the floating-point representation of numbers according to the IEEE 754 standard, and are given some useful programming guidelines. These guidelines include common sense ideas such as testing everything often, keeping code clean, and performing some basic type checking even when the weakly typed MATLAB programming language does not require it. In summary, the first half of the book includes the typical syllabus of any first course on computer programming, with many “TRY IT!” examples and easy programming exercises at the end of each chapter.

The second half of the book focuses on numerical computing. In its chapters, the authors provide a bird’s-eye view of the most common techniques in numerical analysis, that is, the algorithms that use numerical approximation to solve mathematical problems. Short chapters are devoted to systems of linear equations, least squares regression, interpolation, root finding, numerical differentiation, numerical integration, and ordinary differential equations. Obviously, in just 125 pages, you cannot expect the depth of specific textbooks on the topic nor the thoroughness of Numerical Recipes (http://www.nr.com/), yet you can grasp the foundations of each kind of technique, how to use it within MATLAB, and the most common pitfalls to avoid in practice. As in the first half of the book, the text mostly consists of a sequence of “TRY IT!” code snippets, examples, tips, warnings, and problems you can work on to reinforce the concepts introduced in each chapter.

The authors have written a clear and easy-to-read book that introduces two fundamental subjects for future scientists and engineers: computer programming and numerical computing. Its format, close to that of lab notes, makes it suitable for reading while you type and test the examples in front of your computer screen. The book itself is more like a tutorial than a conventional textbook. In fact, I would have even preferred an online version of it rather than a hard copy. In the printed book, you can see the solution just after the description of the problem, before you get the chance to try to solve it by yourself, while an online version could hide the solutions until you tried to solve the exercises on your own, providing a much more rewarding experience. Placing the solutions at the end of each chapter might be an intermediate solution, yet it would suffer from usability problems: apart from breaking the general flow of the text, which often relies on the examples and “TRY IT!” exercises, it would lead to unnecessary page flipping and a less than optimal user experience.

As the authors mention in their preface, learning to program requires practice. Thus, they have prepared their book so that it naturally leads to practicing in front of your computer. I believe that they follow the right approach to teaching computer programming, which is notoriously hard, and they manage to do so swiftly. Their introductory text might be too shallow for future software engineers and computer scientists, but its tradeoffs might be close to the sweet spot for non-computer scientists who need to do some numerical computing and write their own small programs using powerful tools such as MATLAB.

More reviews about this item: Amazon