注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)程序設(shè)計(jì)綜合Code Reading:The Open Source Perspective

Code Reading:The Open Source Perspective

Code Reading:The Open Source Perspective

定 價(jià):¥49.80

作 者: (美)Diomidis Spinellis著
出版社: 中國電力出版社
叢編項(xiàng): 原版風(fēng)暴系列
標(biāo) 簽: 高級程序語言設(shè)計(jì)

ISBN: 9787508321820 出版時(shí)間: 2004-04-01 包裝: 膠版紙
開本: 24cm+光盤1片 頁數(shù): 460 字?jǐn)?shù):  

內(nèi)容簡介

  如果你是個(gè)程序員的話,那么你就需要本書,本書幫助你:當(dāng)需要向一個(gè)超過3萬行代碼的程序中添加新功能時(shí),該從哪里開始呢?該如何去理解一段用來同進(jìn)解決多件事情的代碼呢?當(dāng)需要解決一個(gè)復(fù)雜的編邊過程時(shí),該從哪里開始呢?可能導(dǎo)致我們閱讀代碼的原因陋就簡:我們不得不去修復(fù)它其中所包含的錯(cuò)誤,或者是對它進(jìn)行遍查(inspect)或者是改善它,我們閱讀代碼的方式可能和工程師檢查機(jī)械的方式一樣:找出它的工作原理,或者我們閱讀代碼的目的是對代碼進(jìn)行清理:找出其中可以被重用的部分閱讀代碼有它自身的技巧,并需要我們能夠在重要場合對采用何種技術(shù)有判斷能力,在這本不可或缺的書中,Diomidisspinellis使用了超過6個(gè)來自現(xiàn)實(shí)世界中的例子來向我們展示如何鑒別好的或壞的代碼,如何去閱讀它,從中去找尋什么,以及如何利用這種技巧來提升我們自身編寫的代碼的品質(zhì),請記住這個(gè)事實(shí),如果我們養(yǎng)成了閱讀好代碼的習(xí)慣,我們就能寫出品質(zhì)更高的代碼。

作者簡介

  DiomidisSpinellis從1985年起,就為許多具有創(chuàng)造性的并獲得廣泛贊譽(yù)的商業(yè)及開源項(xiàng)目編寫和維護(hù)超過了250000行代碼,與此同時(shí)他與逐步完善了本書中所介紹的技術(shù)。他從倫敦大學(xué)帝國學(xué)院獲得了軟件工程學(xué)科的工程學(xué)碩士學(xué)位和計(jì)算機(jī)科學(xué)學(xué)科的博士學(xué)位?,F(xiàn)在他是雅典經(jīng)貿(mào)大學(xué)管理科學(xué)及技術(shù)系的助理教授。

圖書目錄

 Figures xiii
 Tables xix
 Foreword xxi
 Preface xxv
 1 Introduction 1
 1.1 Why and How to Read Code 2
 1.1.1 Code as Literature 2
 1.1.2 Code as Exemplar 5
 1.1.3 Maintenance 6
 1.1.4 Evolution 7
 1.1.5 Reuse 9
 1.1.6 Inspections 9
 1.2 How to Read This Book 10
 1.2.1 Typographical Conventions 10
 1.2.2 Diagrams 12
 1.2.3 Exercises 13
 1.2.4 Supplementary Material 14
 1.2.5 Tools 14
 1.2.6 Outline 15
 1.2.7 The Great Language Debate 15
 Further Reading 17
 2 Basic Programming Elements 19
 2.1 A Complete Program 19
 2.2 Functions and Global Variables 25
 2.3 while Loops, Conditions, and Blocks 28
 2.4 switch Statements 32
 2.5 for Loops 34
 2.6 break and continue Statements 37
 2.7 Character and Boolean Expressions 39
 2.8 goto Statements 43
 2.9 Refactoring in the Small 45
 2.10 do Loops and Integer Expressions 51
 2.11 Control Structures Revisited 54
 Further Reading 60
 3 Advanced C Data Types 61
 3.1 Pointers 61
 3.1.1 Linked Data Structures 62
 3.1.2 Dynamic Allocation of Data Structures 62
 3.1.3 Call by Reference 63
 3.1.4 Data Element Access 65
 3.1.5 Arrays as Arguments and Results 65
 3.1.6 Function Pointers 67
 3.1.7 Pointers as Aliases 70
 3.1.8 Pointers and Strings 72
 3.1.9 Direct Memory Access 74
 3.2 Structures 75
 3.2.1 Grouping Together Data Elements 75
 3.2.2 Returning Multiple Data Elements from a Function 76
 3.2.3 Mapping the Organization of Data 76
 3.2.4 Programming in an Object-Oriented Fashion 78
 3.3 Unions 80
 3.3.1 Using Storage Efficiently 80
 3.3.2 Implementing Polymorphism 81
 3.3.3 Accessing Free Memory 82
 3.4 Dynamic Memory Allocation 84
 3.4.1 Managing Free Memory 87
 3.4.2 Structures with Dynamically Allocated Arrays 89
 3.5 typedef Declarations 91
 Further Reading 93
 4 C Data Structures 95
 4.1 Vectors 96
 4.2 Matrices and Tables 101
 4.3 Stacks 105
 4.4 Queues 107
 4.5 Maps 111
 4.5.1 Hash Tables 113
 4.6 Sets 116
 4.7 Linked Lists 117
 4.8 Trees 125
 4.9 Graphs 131
 4.9.1 Node Storage 131
 4.9.2 Edge Representation 134
 4.9.3 Edge Storage 137
 4.9.4 Graph Properties 139
 4.9.5 Hidden Structures 139
 4.9.6 Other Representations 140
 Further Reading 140
 5 Advanced Control Flow 143
 5.1 Recursion 143
 5.2 Exceptions 150
 5.3 Parallelism 154
 5.3.1 Hardware and Software Parallelism 154
 5.3.2 Control Models 156
 5.3.3 Thread Implementations 162
 5.4 Signals 165
 5.5 Nonlocal Jumps 169
 5.6 Macro Substitution 172
 Further Reading 177
 6 Tackling Large Projects 179
 6.1 Design and Implementation Techniques 179
 6.2 Project Organization 181
 6.3 The Build Process and Makefiles 189
 6.4 Configuration 197
 6.5 Revision Control 202
 6.6 Project-Specific Tools 210
 6.7 Testing 215
 Further Reading 224
 7 Coding Standards and Conventions 225
 7.1 File Names and Organization 225
 7.2 Indentation 228
 7.3 Formatting 230
 7.4 Naming Conventions 234
 7.5 Programming Practices 237
 7.6 Process Standards 239
 Further Reading 240
 8 Documentation 241
 8.1 Documentation Types 241
 8.2 Reading Documentation 243
 8.3 Documentation Problems 254
 8.4 Additional Documentation Sources 256
 8.5 Common Open-Source Documentation Formats 260
 Further Reading 266
 9 Architecture 267
 9.1 System Structures 268
 9.1.1 Centralized Repository and Distributed Approaches 268
 9.1.2 Data-Flow Architectures 273
 9.1.3 Object-Oriented Structures 275
 9.1.4 Layered Architectures 279
 9.1.5 Hierarchies 282
 9.1.6 Slicing 283
 9.2 Control Models 285
 9.2.1 Event-Driven Systems 285
 9.2.2 System Manager 289
 9.2.3 Sate Transition 291
 9.3 Element Packaging 292
 9.3.1 Modules 293
 9.3.2 Namespaces 296
 9.3.3 Objects 300
 9.3.4 Generic Implementations 313
 9.3.5 Abstract Data Types 318
 9.3.6 Libraries 319
 9.3.7 Processes and Filters 323
 9.3.8 Components 325
 9.3.9 Data Repositories 325
 9.4 Architecture Reuse 328
 9.4.1 Frameworks 329
 9.4.2 Code Wizards 330
 9.4.3 Design Patterns 331
 9.4.4 Domain-Specific Architectures 333
 Further Reading 337
 10 Code-Reading Tools 339
 10.1 Regular Expressions 340
 10.2 The Editor as a Code Browser 343
 10.3 Code Searching with grep 346
 10.4 Locating File Differences 355
 10.5 Roll Your Own Tool 357
 10.6 The Compiler as a Code-Reading Tool 360
 10.7 Code Browsers and Beautifiers 365
 10.8 Runtime Tools 370
 10.9 Nonsoftware Tools 375
 Tool Availability and Further Reading 376
 11 A Complete Example 379
 11.1 Overview 379
 11.2 Attack Plan 380
 11.3 Code Reuse 382
 11.4 Testing and Debugging 388
 11.5 Documentation 396
 11.6 Observations 397
 A Outline of the Code Provided 399
 B Source Code Credits 403
 C Referenced Source Files 405
 D Source Code Licenses 413
 D.1 ACE 413
 D.2 Apache 415
 D.3 ArgoUML 416
 D.4 DemoGL 416
 D.5 hsqldb 417
 D.6 NetBSD 418
 D.7 OpenCl 418
 D.8 Perl 419
 D.9 qtchat 422
 D.10 socked 422
 D.11 vcf 422
 D.12 X Window System 423
 E Maxims for Reading Code 425
 Bibliography 445
 Author Index 459

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) hotzeplotz.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號