|
Code Reading(含CD-ROM一张)——原版风暴系列
内容提要: 2004年美国Jolt大奖入围作品。 如果你是个程序员的话,那么你就需要本书。可能导致我们阅读代码的原因是:我们不得不去修复它其中所包含的错误;或是对它进行遍查(inspect);或者是改善它。我们阅读代码的方式可能和工程师检查机械的方式一样——找出它的工作原理。或者我们阅读代码的目的是对代码进行清理——找出其中可以被重用的部分。阅读代码有着它自身的技巧,并需要我们能够在重要场合对采用何种技术有着判断能力。在这本不可或缺的书中,Diomidis Spinellis使用了超过600个来自现实世界中的例子来向我们展示如何鉴别好的(或坏的)代码:如何去阅读它,从中去找寻什么,以及如何利用这种技巧来提升我们自身编写的代码的品质。记住这个事实:如果我们养成了阅读好代码的习惯,我们就能写出更高品质的代码。 目录: Figures xiii Tables xix Foreword xxi Preface xxv 1 Introduction 1.1 Why and How to Read Code 1.2 How to Read This Book 2 Basic Programming Elements 2.1 A Complete Program 2.2 Functions and Global Variables 2.3 while Loops, Conditions, and Blocks 2.4 switch Statements 2.5 for Loops 2.6 break and continue Statements 2.7 Character and Boolean Expressions 2.8 goto Statements 2.9 Refactoring in the Small 2.10 do Loops and Integer Expressions 2.11 Control Structures Revisited Further Reading 3 Advanced C Data Types 3.1 Pointers 3.2 Structures 3.3 Unions 3.4 Dynamic Memory Allocation 3.5 typedef Declarations 4 C Data Structures 4.1 Vectors 4.2 Matrices and Tables 4.3 Stacks 4.4 Queues 4.5 Maps 4.6 Sets 4.7 Linked Lists 4.8 Trees 4.9 Graphs Further Reading 5 Advanced Control Flow 5.1 Recursion 5.2 Exceptions 5.3 Parallelism 5.3.1 Hardware and Software Parallelism 5.3.2 Control Models 5.3.3 Thread Implementations 5.4 Signals 5.5 Nonlocal Jumps 5.6 Macro Substitution Further Reading 6 Tackling Large Projects 6.1 Design and Implementation Techniques 6.2 Project Organization 6.3 The Build Process and Makefiles 6.4 Configuration 6.5 Revision Control 6.6 Project-Specific Tools 6.7 Testing Further Reading 7 Coding Standards and Conventions 7.1 File Names and Organization 7.2 Indentation 7.3 Formatting 7.4 Naming Conventions 7.5 Programming Practices 7.6 Process Standards Further Reading 8 Documentation 8.1 Documentation Types 8.2 Reading Documentation 8.3 Documentation Problems 8.4 Additional Documentation Sources 8.5 Common Open-Source Documentation Formats Further Reading 9 Architecture 9.1 System Structures 9.2 Control Models 9.3 Element Packaging 9.4 Architecture Reuse Further Reading 10 Code-Reading Tools 10.1 Regular Expressions 10.2 The Editor as a Code Browser 10.3 Code Searching with grep 10.4 Locating File Differences 10.5 Roll Your Own Tool 10.6 The Compiler as a Code-Reading Tool 10.7 Code Browsers and Beautifiers 10.8 Runtime Tools 10.9 Nonsoftware Tools Tool Availability and Further Reding 11 A Complete Example 11.1 Overview 11.2 Attack Plan 11.3 Code Reuse 11.4 Testing and Debugging 11.5 Documentation 11.6 Observations A Outline of the Code Provided B Source Code Credits C Referenced Source Files D Source Code Licenses D.1 ACE D.2 Apache D.3 ArgoUML D.4 DemoGL D.5 hsqldb D.6 NetBSD D.7 OpenCl D.8 Perl D.9 qtchat D.10 socked D.11 vcf D.12 X Window System E Maxims for Reading Code Bibliography Author Index
封面:点击察看
详细介绍 点击这里打折购买
还可以去当当网、蔚蓝书店查看是否有更大折扣
|