基本信息
- 原书名:Elements of Programming
- 原出版社: Addison-Wesley Professional
- 作者: (美)Alexander Stepanov Paul McJones
- 丛书名: 经典原版书库
- 出版社:机械工业出版社
- ISBN:9787111300274
- 上架时间:2011-10-24
- 出版日期:2010 年3月
- 开本:16开
- 页码:262
- 版次:1-1
- 所属分类:计算机 > 软件与程序设计 > 综合 > 程序(设计)理论

编辑推荐
STL之父Alexander Stepanov最新力作
C++之父Bjarne Stroustrup鼎力推荐
理解编程的本质,帮助读者提升对编程的洞察力
内容简介
计算机书籍
本书提供了有关编程的一种与众不同的理解。其主旨是,实际的编程也应像其他科学和工程领域一样基于坚实的数学基础。本书展示了在实际编程语言(如C++)中实现的算法如何在最一般的数学背景中操作。例如,如何定义快速求幂算法,使之能使用任何可交换运算。使用抽象算法将能得到更高效、可靠、安全和经济的软件。
这不是一本很容易读的书,它也不是能提升你的编程技能的秘诀和技巧汇编。本书的价值是更根本性的,其终极目标是提升你对编程的洞察力。要想从中大获裨益,你需要从头到尾认真学习:阅读代码,证明引理,完成练习。到结束之时,你将看到如何把这里讨论的演绎式方法应用到你的程序中,保证你做出的软件部件能一起工作,并表现出它们所应该表现的行为。
书中给出的算法和需求针对某些被操作的类型。有关这些描述的代码(也可以通过Web得到)采用C++的一个小子集书写,这样做是为了让所有有经验的程序员都能理解。这个小子集可以看做一种特殊语言,是由Sean Parent和Bjarne Stroustrup一起设计的。
无论你是一位软件开发者,还是其他以编程作为一项重要活动的专业人员,或者是一名在校的学生,你都会逐渐理解本书的经验丰富的作者多年来一直在教授和阐释的道理:数学对于编程是绝好的东西,理论对于实际是绝好的东西。
目录
AbouttheAuthors xiii
1 Foundations 1
1.1 CategoriesofIdeas:Entity,Species,Genus 1
1.2 Values 2
1.3 Objects 4
1.4 rocedures6
1.5 RegularTypes 6
1.6 RegularProcedures 8
1.7 Concepts 10
1.8 Conclusions14
2 TransformationsandTheirOrbits1 5
2.1 Transformations 15
2.2 Orbits 18
2.3 CollisionPoint 21
2.4 MeasuringOrbitSizes 27
2.5 Actions 28
2.6 Conclusions 29
3 AssociativeOperations 31
3.1 Associativity 31
前言
As with other areas of science and engineering, the appropriate foundation of programming is the deductive method. It facilitates the decomposition of complex systems into components with mathematically specified behavior. That, in turn, is a necessary precondition for designing efficient, reliable, secure, and economical software.
The book is addressed to those who want a deeper understanding of program- ming, whether they are full-time software developers, or scientists and engineers for whom programming is an important part of their professional activity.
The book is intended to be read from beginning to end. Only by reading the code, proving the lemmas, and doing the exercises can readers gain understanding of the material. In addition, we suggest several projects, some open-ended. While the book is terse, a careful reader will eventually see the connections between its parts and the reasons for our choice of material. Discovering the architectural principles of the book should be the reader's goal.
We assume an ability to do elementary algebraic manipulations, l We also assume familiarity with the basic vocabulary of logic and set theory at the level of undergrad- uate courses on discrete mathematics; Appendix A summarizes the notation that we use. We provide definitions of a few concepts of abstract algebra when they are needed to specify algorithms. We assume programming maturity and understanding of computer architecture2 and fundamental algorithms and data structures)
We chose C++ because it combines powerful abstraction facilities with faithful representation of the underlying machine) We use a small subset of the language and write requirements as structured comments. We hope that readers not already familiar with C++ are able to follow the book. Appendix B specifies the subset of the language used in the book? Wherever there is a difference between mathematical notation and C++, the typesetting and the context determine whether the mathe- matical or C++ meaning applies. While many concepts and programs in the book have parallels in STL (the C++ Standard Template Library), the book departs from some of the STL design decisions. The book also ignores issues that a real library, such as STL, has to address: namespaces, visibility, inline directives, and so on.
Chapter 1 describes values, objects, types, procedures, and concepts. Chapters 2-5 describe algorithms on algebraic structures, such as semigroups and totally or- dered sets. Chapters 6-11 describe algorithms on abstractions of memory. Chapter 12 describes objects containing other objects. The Afterword presents our reflections on the approach presented by the book.
Acknowledgments We are grateful to Adobe Systems and its management for supporting the Founda- tions of Programming course and this book, which grew out of it. In particular, Greg Gilley initiated the course and suggested writing the book; Dave Story and then Bill Hensler provided unwavering support. Finally, the book would not have been pos- sible without Sean Parent's enlightened management and continuous scrutiny of the code and the text. The ideas in the book stem from our close collaboration, spanning almost three decades, with Dave Musser. Bjarne Stroustrup deliberately evolved C++ to support these ideas. Both Dave and Bjarne were kind enough to come to San Jose and carefully review the preliminary draft. Sean Parent and Bjarne Stroustrup wrote the appendix defining the C++ subset used in the book. Jon Brandt reviewed multiple drafts of the book. John Wilkinson carefully read the final manuscript, providing innumerable valuable suggestions.
The book has benefited significantly from the contributions of our editor, Peter Gordon, our project editor, Elizabeth Ryan, our copy editor, Evelyn Pyle, and the editorial reviewers: Matt Austern, Andrew Koenig, David Musser, Arch Robison, Jerry Schwarz, Jeremy Siek, and John Wilkinson.
We thank all the students who took the course at Adobe and an earlier course at SGI for their suggestions. We hope we succeeded in weaving the material from these courses into a coherent whole. We are grateful for comments from Dave Abrahams, Andrei Alexandrescu, Konstantine Arkoudas, John Banning, Hans Boehm, Angelo Borsotti, Jim Dehnert, John DeTreville, Boris Fomitchev, Kevlin Henney, Jussi Ketonen, Karl Malbrain, Mat Marcus, Larry Masinter, Dave Parent, Dmitry Polukhin, Jon Reid, Mark Ruzon, Geoff Scott, David Simons, Anna Stepanov, Tony Van Eerd, Walter Vannini, Tim Winkler, and Oleg Zabluda.
Finally, we are grateful to all the people who taught us through their writings or in person, and to the institutions that allowed us to deepen our understanding of programming.
媒体评论
——Martin Newell,Adobe 院士
“本书包含一些我所见过的最美的代码。”
——Bjarne Stroustrup,C++ 设计者
“我很高兴看到Alex课程的内容。作为Silicon Graphics的CTO时,我曾大力支持这一课程的开发和教授,现在这本书已经能被所有程序员阅读了。”
——Forest Baskett,合伙人,New Enterprise Associates
“Paul的耐心和在体系结构方面的经验帮助把Alex的数学方法组织成为一套高度结构化的大厦——功德无量!”
——Robert W. Taylor,Xerox PARC CSL和DEC系统研究中心创始人