Watch the Amazon Original series Cross now on Prime Video. Yours with Prime.
Buy used:
$54.55
to get FREE delivery Friday, November 22. Order within 3 hrs 29 mins
Or Non members get FREE delivery Sunday, November 24
Used: Very Good | Details
Condition: Used: Very Good
Comment: Lightly used, no writing or highlights in text, some wear to cover
Access codes and supplements are not guaranteed with used items.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the authors

Something went wrong. Please try your request again later.

Elements of Programming 1st Edition

4.1 4.1 out of 5 stars 41 ratings

“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 Programmingprovides 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.


Amazon First Reads | Editors' picks at exclusive prices

Editorial Reviews

About the Author

Alexander Stepanov studied mathematics at Moscow State University from 1967 to 1972. He has been programming since 1972: first in the Soviet Union and, after emigrating in 1977, in the United States. He has programmed operating systems, programming tools, compilers, and libraries. His work on foundations of programming has been supported by GE, Brooklyn Polytechnic, AT&T,HP, SGI, and, since 2002, Adobe. In 1995 he received the Dr. Dobb’s Journal Excellence in Programming Award for the design of the C++ Standard Template Library.

Paul McJones
studied engineering mathematics at the University of California, Berkeley, from 1967 to 1971. He has been programming since 1967 in the areas of operating systems, programming environments, transaction processing systems, and enterprise and consumer applications. He has been employed by the University of California, IBM, Xerox, Tandem, DEC, and, since 2003, Adobe. In 1982 he and his coauthors received the ACM Programming Systems and Languages Paper Award for their paper “The Recovery Manager of the System R Database Manager.”

Product details

  • Publisher ‏ : ‎ Addison-Wesley Professional; 1st edition (January 1, 2009)
  • Language ‏ : ‎ English
  • Hardcover ‏ : ‎ 262 pages
  • ISBN-10 ‏ : ‎ 032163537X
  • ISBN-13 ‏ : ‎ 978-0321635372
  • Item Weight ‏ : ‎ 1.2 pounds
  • Dimensions ‏ : ‎ 6.75 x 1 x 9.5 inches
  • Customer Reviews:
    4.1 4.1 out of 5 stars 41 ratings

About the authors

Follow authors to get new release updates, plus improved recommendations.

Customer reviews

4.1 out of 5 stars
41 global ratings

Customers say

Customers find the book very good at laying out many of the ways to be abstract, productive, and quick. They also say it's interesting and challenging. However, opinions differ on readability, with some finding it stimulating and interesting, while others say it can be hard to understand and unnecessary complicates simple concepts.

AI-generated from the text of customer reviews

Select to learn more
3 customers mention "Productivity"3 positive0 negative

Customers find the book does a good job of laying out many of the ways to be productive and quick. They also mention it's about how to build solid, working, efficient, robust, and reusable products.

"...This book is about how to build solid, working, efficient, robust, reusable, understandable code...." Read more

"...This book can teach ways to be abstract, productive and quick, but this is only first step...." Read more

"...book lives up to its name or not, but for what it's worth it does a very good job in laying out many of the mathematical principles that underly..." Read more

12 customers mention "Readability"6 positive6 negative

Customers have mixed opinions about the readability of the book. Some mention it teaches ways to be abstract, productive, and quick. However, others say it can be hard to understand, unnecessary complicates simple concepts, and is not an easy read.

"...This book can teach ways to be abstract, productive and quick, but this is only first step...." Read more

"...It is tough to read: it assumes that you are already a good programmer, and you should also be familiar with C++'s template facility...." Read more

"...as it does an excellent job in that department and offers plenty of rewards for the persevering." Read more

"...In its presentations, it emphasizes mathematical and formal analysis. Examples are in C++...." Read more

Top reviews from the United States

Reviewed in the United States on September 9, 2011
This is literally the best book I have ever read on programming, even above and beyond Knuth or K&R. It will change how you think about programming.

It is tough to read: it assumes that you are already a good programmer, and you should also be familiar with C++'s template facility. But if you can make it through this book (at least sketching proofs for the lemmas and giving some thought to the exercises), it will solidify the instincts and idioms you have about programming into a solid conceptual whole that will turn you from a good programmer to a great programmer. You will have terminology to describe (and think about!) many concepts that appear over and over and over and over when programming but which many top-notch programmers only understand at a subconscious, "fuzzy" level, guided by their intuition rather than intelligent discernment.

This book is not about algorithms (although it contains many beautiful and efficient ones), it deals with how *the actual act of software construction* can be brought to a high level of sophistication. Huge parts of this book are *real* C++ code that works today on your C++ compiler (and is also available for download on the webpage for the book). This book is about how to build solid, working, efficient, robust, reusable, understandable code. If you have ever taken higher-level math courses, you will understand that in order to approach mathematics usefully and become a mathematician, you have to really get back down to the things that you took for granted and analyze them more rigorously. This is much the same, but for programming; you will learn how to iterate over elements in a sequence, how to traverse a tree, how to partition a range of elements (but now you will actually know how to characterize the ranges you operate on), how to ... etc. Many of these things will seem "trivial" at first glance to any programmer good enough to be reading this book, but looking back you will realize that when you coded these operations previously, you really had very little understanding about what you were actually doing and that now you have a conceptual framework where all of these actions fit into a broader whole that you are aware of.

If you are a good C or C++ programmer, do yourself the favor of reading this book, especially if you are a C++ programmer that has a knowledge of STL (note that the primary author of this book is Stepanov, the author of STL). Even though it deals entirely in C++, almost all of the concepts translate directly to C unchanged. Basically the only C++ functionality that is used in the book is templates, which merely make the code generic: you will find that concrete instantiations of all of the concepts in this book appear all over the place in C code. Like I said, this book deals with the fundamentals of the act of programming: things that at some level need to be understood by all competent programmers (in particular C and C++ programmers). Do yourself the favor of making your knowledge of these things conscious!

Note: If you are a fundamentalist of functional programming or object-oriented programming, you will probably get very little from this book.
11 people found this helpful
Report
Reviewed in the United States on May 28, 2010
I wanted to find a book that would give a very formal and mathematical perspective on computer programming and that is what I got. I found this book very difficult to read. The concepts were often foreign, abstract and often described in a very terse manor. However, after reading and re-reading sections of the book it started to slowly make sense. Once I started understanding a little bit it made more and more sense and I really started to appreciate what the book was doing.

I have never come across problem solving presented in this manor before. The algorithms initially appear quite cryptic but once I read and desk-checked the algorithms they came across as quite clever - who would have thought there was so much to be said about 'power algorithm'. I would recommend this book to anyone who is up for a challenge - who can appreciate code that doesn't have an immediate application to business application development. It is certainly not an easy read and is suited to mathematically minded programmer.

That being said, I do have some complaints. Sometimes the book comes across as overly terse, they give one explanation that's it. It could have used diagrams to better communicate an idea. It lacks an explicit overarching theme and direction.

There is one warning I will give to the prospectus buyer: "The book does not have worked examples, solutions to the exercises, nor does it give proofs for all of the lemmas." This is not a real problem but it breaks the flow of the book as you have to stop and convince yourself that the information presented is correct.

All and all it is a stimulating, interesting and challenging book.
8 people found this helpful
Report
Reviewed in the United States on July 15, 2009
"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.
103 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
Cliente Amazon
1.0 out of 5 stars Do not buy Kindle version of ANY programming/math book
Reviewed in Spain on June 8, 2019
People here at Amazon are a bunch of messy hacks. Monkeys, even.

This book is fantastic, alas, the poor quality of the Kindle version makes it unreadable: AVOID AT ALL COSTS! It's much better to buy the pdf version from Adison-Wesley themselves, even if it's a bit more expensive.
hugh
5.0 out of 5 stars Five Stars
Reviewed in Canada on December 22, 2015
Perfect.
Amazon Kunde
5.0 out of 5 stars Sehr gut, wenn es auch schwer ist einen Einstieg zu finden.
Reviewed in Germany on February 2, 2016
Also ich finde dieses Buch, auch wenn es eine Herausforderung ist, sollte von jedem C++ Programmierer oder jedem angehenden Programmierexperten gelesen werden. Für mich hat es den selben Stellenwert wie Knuths "The Art of Programming" (wenn auch die Herangehensweise eine Andere ist). Man kann praktisch kein C++ Profi sein ohne dieses Werk zu kennen. Was ich weniger verstehe ist dass dieses Buch im englischsprachigen Raum weitgehend sehr gute Kritiken erhielt während im deutschsprachigen Raum die Kritiken eher mittelmäßig ausfielen oder es gar nicht bekannt ist. Stepanovs Arbeiten und Wirken haben mich in meinem Berufsleben (meist im Programmierbereich) mehr geprägt als ich bis vor einiger Zeit gedacht habe. Ich habe zwar nie Informatik oder Mathematik studiert (ich bin nur gelernter Fachinformatiker) aber allein das Potenzial (auch wenn ich nur einen verschwindend geringen Teil davon nutze) ist enorm. Zugegeben "Elements of Programming" ist nicht für jeden, aber diejenigen die gut darin sind abstrakt, im Detail und insbesondere in allen Richtungen zu denken, für die kann dieses Werk sehr inspirierend sein.
Krishna
4.0 out of 5 stars Leads to deeper insights about computers and programming.
Reviewed in India on November 28, 2015
This book formalizes programming and connects it to the discrete mathematics taught at the under grad, and it does a great job of it. By formalizing programming, we can write axioms about algorithms and derive consequences about them, which allow us to write better programs.
Steve E
5.0 out of 5 stars Excellent, but dense and difficult
Reviewed in the United Kingdom on March 7, 2011
This book bridges the gap between mathematical theory and computer science. As a software engineer with many years of C++ experience I struggled with the mathematical notation but found it understandable with the aid of the descriptive code and accompanying text. The code in this book is very easy to read - totally uncluttered by any error handling.

The book's back cover makes comparison to engineering professions which require formal mathematics theory. These engineering professions have outgrown the medieval apprentice, journeyman, master approach where experience was ultimately gained from trial and error. Software development largely works on this medieval model. Elements of Programming gives some serious mathematical underpinnings to the foundations of software architecture discipline and should be on the reading list of any professional software engineer.

Dense, difficult and requires dedication to read. The nice thing is that it is a book and a citable reference.

n.b. The book's website (hint: it's mentioned on the back cover) has the errata (though not long, they are essential) and a link to a Stanford University video of a talk about the book by Stepanov and McJones (with David Musser in the audience). Watch the video if you have not seen the book, it may affect your decision to purchase.