Elements of Programming

in Web Development

Brand:
Average Rating
9 reviews

“Ask a mechanical, structural, or electrical engineer how far they would get without a heavy reliance on a firm mathematical foundation, and they will tell you, ‘not far.’ Yet so-called software engineers often practice their art with little or no idea of the mathematical underpinnings of what they are doing. And then we wonder why software is notorious for being delivered late and full of bugs, while other engineers routinely deliver finished bridges, automobiles, electrical appliances, etc., on time and with only minor defects. This book sets out to redress this imbalance. Members of my advanced development team at Adobe who took the course based on the same material all benefited greatly from the time invested. It may appear as a highly technical text intended only for computer scientists, but it should be required reading for all practicing software engineers.”
    —Martin Newell, Adobe Fellow

 “The book contains some of the most beautiful code I have ever seen.”
    —Bjarne Stroustrup, Designer of C++

“I am happy to see the content of Alex’s course, the development and teaching of which I strongly supported as the CTO of Silicon Graphics, now available to all programmers in this elegant little book.”
    —Forest Baskett, General Partner, New Enterprise Associates

“Paul’s patience and architectural experience helped to organize Alex’s  mathematical approach into a tightly-structured edifice—an impressive feat!”
    —Robert W. Taylor, Founder of Xerox PARC CSL and DEC Systems Research Center

Elements of Programming provides a different understanding of programming than is presented elsewhere. Its major premise is that practical programming, like other areas of science and engineering,must be based on a solid mathematical foundation. The book shows that algorithms implemented in a real programming language, such as C++, can operate in the most general mathematical setting. For example, the fast exponentiation  algorithm is defined to work with any associative operation. Using abstract algorithms leads to efficient, reliable, secure, and economical software.

This is not an easy book. Nor is it a compilation of tips and tricks for incremental improvements in your programming skills. The book’s value is more fundamental and, ultimately, more critical for insight into programming. To benefit fully, you will need to work through it from beginning to end, reading the code, proving the lemmas, and doing the exercises. When finished, you will see how the application of the deductive method to your programs assures that your system’s software components will work together and behave as they must.

The book presents a number of algorithms and requirements for types on which they are defined. The code for these descriptions—also available on the Web—is written in a small subset of C++ meant to be accessible to any experienced programmer. This subset is defined in a special language appendix coauthored by Sean Parent and Bjarne Stroustrup.

Whether you are a software developer, or any other professional for whom programming is an important activity, or a committed student, you will come to understand what the book’s experienced authors have been teaching and demonstrating for years—that mathematics is good for programming, and that theory is good for practice.

more info

Related Posts with Thumbnails
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • YahooMyWeb
  • Google Bookmarks
  • Yahoo! Buzz
  • TwitThis
  • Live
  • LinkedIn
  • Pownce
  • MySpace

{ 9 comments… read them below or add one }

1 Peter G. Neumann March 6, 2010 at 12:35 am

From ACM Risks Forum, vol 25 no 74
Rating:5 out of 5 stars
What could be one of the most important books for developers of low-risk

systems has come to my attention, and deserves your consideration if you are

serious about understanding the mathematical foundations of programming and

applying them sensibly to your practice. It is not an easy read, but it is

a very compelling approach. To support its mathematically oriented

crispness, the book includes the definition of a small but elegant C++

subset that has been crafted by Sean Parent and Bjarne Stroustrup for

illustrative use in the book. I believe this material should be taught

within all computer science curricula.

A long quote and a short one on the back jacket give an idea of what is

involved:

Ask a mechanical, structural, or electrical engineer how far they would

get without a heavy reliance on a firm mathematical foundation, and they

will tell you, `not far.’ Yet so-called software engineers often practice

their art with little or no idea of the mathematical underpinnings of what

they are doing. And then we wonder why software is notorious for being

delivered late and full of bugs, while other engineers routinely deliver

finished bridges, automobiles, electrical appliances, etc., on time and

with only minor defects. This book sets out to redress this imbalance.

Members of my advanced development team at Adobe who took the course based

on the same material all benefited greatly from the time invested. It may

appear as a highly technical text intended only for computer scientists,

but it should be required reading for all practicing software engineers.

— Martin Newell, Adobe Fellow

The book contains some of the most beautiful code I have ever seen.

— Bjarne Stroustrup

The bottom of the inside cover suggests that through this book you will come

to understand that mathematics is good for programming, and theory is good

for practice. I applaud that sentiment.

2 Felipe Magno De Almeida March 6, 2010 at 4:33 am

Must read for all computer scientists
Rating:5 out of 5 stars
This book defines lots of usual STL algorithms and uses with algebra. This makes a comprehensive writing process for algorithms and concepts. This book is a must read for anybody that wants or is a programmer. This book also shows how regular types are the core of rationing in imperative programming, and the value of value-based programming, no pun intended.

3 W Boudville March 6, 2010 at 10:45 am

stricter than Knuth’s Art of Computer Programming
Rating:5 out of 5 stars
Did you study differential calculus? While not a prerequisite for this book, if you are the type who desires rigorous maths, you almost certainly have done so. There are two teaching methods for calculus. One uses the differential forms (“delta x”, “delta y”)) pioneered by Newton. While the other is stricter and uses the epsilon delta method and theorems. The former is favoured by scientists learning calculus, while mathematicians prefer the latter. This book is analogous to the latter, while the former can be represented by Knuth’s Art of Computer Programming, The, Volumes 1-3 Boxed Set (2nd Edition) (The Art of Computer Programming Series) (Vol 1-3).

Another point of difference is that Stepanov and McJones deal with the foundations of programming, while Knuth delves deeper into the algorithms.

The approach in the book is not difficult to follow, unlike sections of Knuth which can get very intricate. More generally, you will rarely come across a book like this, which deals closely with theorems and lemmas and yet is also tied to actual code.

One consequence however is that the audience may be somewhat exclusive (ie. limited). I can readily see a mathematician wandering into this book, to learn more about the basis of computer science. But the typical computer scientist, let alone a programmer, favours a more informal approach.

4 Kenneth A. Lloyd Jr. March 6, 2010 at 12:25 pm

Excellent mathematical foundation
Rating:4 out of 5 stars
Stepanov and McJones have created an excellent description of the mappings from mathematics to computer science, and I recommend this book should be in the library of every programmer, software architect and software engineer. I especially appreciated the building of concepts from first principles, which helps in the logical understanding of the concepts in programming. In today’s software, there is more than the traditional serial, digraph mappings, and I wish this had been given more explicit treatment – especially in the non-deterministic aspects of parallel computation. With that one small caveat, this is an excellent reference and wonderful treatment of the mathematics underlying computer software.

5 Trevor Baca March 7, 2010 at 2:54 am

Important steps towards formalizing the work of programming
Rating:5 out of 5 stars
Because Ralabate’s review covers the most important points, this review should be read as supplemental to it.

First, the book makes substantial contributions towards regularizing the terminology of algorithm design and analysis. Concepts like regularity, transformation, accumulation and ordering that are treated as notional in most other presentations of the material are here given rigorous formalization. This matters because understanding whether a type or procedure is regular (chapter 1) helps explain the availability of the different types of iterator definable against it (chapter 6). Likewise, understanding which algebraic structures are available against the input to an algorithm (chapter 5) can clarify both the boundary cases to the algorithm and the avenues open for its optimization.

Second, because early chapters introduce terminology on which the later chapters build, the book should be read in order. (This point is made in the preface, but bears repeating here.) Chapters, and the examples they contain, are short and relatively easy to accomplish in a sitting or two, which makes sequential reading straightforward. (The exceptions to this are project suggestions, which require a different level of attention but which can be skipped working from chapter to chapter.)

Third, the math on which Stepanov and McJones rely will be familiar to second- or third-year CS or engineering undergrads. Examples are taken from set theory, matrices and the foundations of abstract algebra (groups and rings); advanced understanding of continuous mathematics is not assumed. (Willingness to work out examples with pencil and paper still important, however.)

Fourth, the subset of C++ in which the examples in the book are presented should embolden, rather than discourage, developers working primarily in other languages. With the exception of the templating instructions that wrap each of the examples, there’s nothing particularly C++-ish in the examples. The examples are kept short and they read at least as well as any sort of pseudocode that might have been devised as an alternative. (No problems coming from recent work done primarily in Python, for example.)

Fifth, antagonism between the type of algorithm analysis presented here and the fundamentals of object orientation is misguided. Among very many other things, object orientation affords a type of systems design oriented in terms of *things*. How should data and methods be bundled? Which parts of the system need to be exposed and which encapsulated? Is functionality best acquired through inheritance or aggregation? The type of analysis that Stepanov and McJones provide operates at what is arguably more fundamental a level. How are assumptions of regularity related to optimization? When is special-case optimization warranted? To get a feeling for this, read chapter two on what happens in the repeated application of a transformation to its own output. The code and presentation of the material demonstrate a closed set of possibilities *regardless of the algorithm being investigated*, along with terminology and descriptors for each of the different cases. I find it hard to see how generalization can go much further than this, and the presentation of the material is a pleasure. (Maybe best to use chapter 2 as a litmus test, in fact, to see whether you want to work the book to completion.)

Last, the whole book can be read as a challenge. To what extent can the fundamentals of algorithm design be treated rigorously? It’s probably reaching to draw a comparison to the situation before different parts of the math system were defined in terms of set theory, but, in some respects, that does seem to be where we are: many different, notional approaches to what it means to program, with decades’ worth of best practices built up, but absent a series of definitions on which to anchor different types of programming work. Stepanov and McJones help take us at least a little bit closer to such a long-term goal.

6 James Holmes March 7, 2010 at 3:02 am

Serious approaches to algorithms & engineering for the hardcore computer science geek
Rating:4 out of 5 stars
This book is heavy on math and in-depth, intricate concepts. It’s somewhat low on applicability for me in my line of work – but I’m sure lots of other folks will find it very useful. Lots of concise, in-depth discussion of foundational knowledge, and plenty of exercises to help evolve your skills.

The tone’s exceedingly dry and academic, and I got very tired of the authors repeated assertions that you need to be using a “real programming language such as C++.” Guess all the value-providing projects I’ve helped roll out in Perl, Java, C#, and other languages haven’t counted.

That said, this is a wonderful book for those interested in raising their skills in hardcore algorithms and low-level software engineering.

7 Bjarne Stroustrup March 7, 2010 at 4:16 am

A great book
Rating:5 out of 5 stars
I have been wondering what to say about this book and now Peter G. Neumann said it better (see previous review). However, I can still say this: There are many good books, but few great ones. “Elements” is a great book in that it can change the way you think about programming in fundamental ways: If you “get it” programming will never be the same again for you.

Reading “Elements” requires maturity both with mathematics and with software development. Even then it is so different from most books on programming that it can be hard going. The frequent comparisons of “Elements” to Knuth’s “The Art of Programming” is well earned.

8 Nicholas Charles Ralabate March 7, 2010 at 4:20 am

An Abstract Algebra of Programs
Rating:5 out of 5 stars
“I believe that iterator theories are as central to Computer Science as theories of rings or Banach spaces are central to Mathematics. Every time I would look at an algorithm I would try to find a structure on which it is defined. So what I wanted to do was to describe algorithms generically. That’s what I like to do. I can spend a month working on a well known algorithm trying to find its generic representation. So far, I have been singularly unsuccessful in explaining to people that this is an important activity. But, somehow, the result of the activity – STL – became quite successful.” -Stepanov

I had been waiting for this book for a while, as I greatly enjoy Stepanov’s unorthodox views on programming. His flat rejection of the object-oriented paradigm was what caught my attention, but he differed from the unwashed newsgroup naysayers in an important respspect — he offered an alternative. The fact that his alternative seemed to involve applying concepts from the realm of abstract algebra to computer programming made me realize I would be spending a lot of time and thought catching up.

This is a short, but dense book. There is little trace of Knuth’s sympathetic humor or Dijkstra’s aesthetic passion. The material is presented as a series of definitions and sample programs, written in a programming language based on C++. Importantly, there are also exercises and projects throughout each chapter. At first attempt, these puzzlers seem to contain as much insight as the prose itself.

I look at this book as a combination of the two books that Stepanov is known to prescribe to his students, hyper-distilled into a slim few hundred pages:

“The books that I recommend to my students are The Art of Computer Programming by Donald Knuth, which is the great encyclopedia of programming techniques. … It is something that they should keep studying for the rest of their lives. The other book that I urge my students to read is The Textbook of Algebra by George Chrystal. It is a massive two volume work covering most of elementary algebra. Sadly enough, nowadays even people with graduate degrees in Mathematics do not know most of the material in Chrystal.”

More to the point, I look at this book as an intentional challenge. The preface urges the reader to consider why the material absent is absent and vice versa, a sentiment I had only seen in one other place — Victor Vyssotsky’s review of MacLane and Birkhoff. A challenge like that doesn’t make for a pleasant exposition, seemingly trading approachability for a more mature understanding.

Stepanov has some great papers in the public domain — if you are reading this review I highly reccomend seeking them out. Also see the Google Tech Talk “A Possible Future of Software Development” by Sean Parent. If you like those, you will love this.

9 calvinnme March 7, 2010 at 7:24 am

Rigorous and essential
Rating:5 out of 5 stars
This little book is quite unusual among current publications on programming. It

supplies a mathematical definition of the various components of a programming language, working up from the simplest constructs. The book then works up to algorithms based on the mathematical rules that have been constructed, and asks the programmer to step back and think about why tasks are performed in a certain way. The preface makes the point of mentioning that no mechanical or electrical engineer would go about solving problems in the same haphazard way that many computer programmers solve problems, and this book’s purpose is to apply mathematical reasoning to program construction.

The book does not stay in the realm of the theoretical, however. Algorithms are implemented in a real programming language – C++ – a language with which most all programmers are familiar. There are numerous open-ended projects for the reader to test his/her knowledge of the principles applied.

I see that the table of contents is already supplied in the product description so I’ll just briefly summarize the chapter contents as mentioned in the preface: Chapter 1 describes values, objects, types, procedures, and concepts. Chapters 2-5 describe algorithms on algebraic structures, such as semigroups and totally ordered sets. Chapters 6-11 describe algorithms on abstractions of memory. Chapter 12 describes objects containing other objects. The afterword presents the authors’ reflections on the approach presented by the book.

The authors also specifically outlines the prerequisite knowledge for the reader of this book. They assume a basic knowledge of algebra and a knowledge equivalent with an undergraduate course on discrete mathematics. They also programming maturity and hopefully familiarity with C++ as well as an understanding of computer architecture and fundamental algorithms and data structures.

If you are just looking for a book from which to extract some useful algorithms you should look elsewhere. If you are looking for a book that teaches you how to quantify, define, and evaluate a useful algorithm, this would be one of the newest books on that subject.

Leave a Comment

! ! ! ! !

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Security Code:

Secondlife.com

Previous post:

Next post: