Tag Archives| "Code"

代码大全中文版(Code Complete 2nd Edition)

Tags: ,


英文名:Code Complete 2nd Edition

中文名:代码大全

作者:Steve McConnell

译者:金戈 汤凌 陈硕 张菲

出版社:Microsoft Press

代码大全(Code Complete 2nd Edition)

介绍:

代码大全(第二版)是著名IT畅销书作者Steve McConnell十一年前的经典著作的全新演绎:第二版不是第一版的简单修订增补,而是完全进行了重写;增加了很多与时俱进的内容。这也是一本完整的软 件构建手册,涵盖了软件构建过程中的所有细节。它从软件质量和编程思想等方面论述了软件构建的各个问题,并详细论述了紧跟潮流的新技术、高屋建瓴的观点、 通用的概念,还含有丰富而典型的程序示例。本书中所论述的技术不仅填补 了初级与高级编程技术之间的空白,而且也为程序员们提供了一个有关编程技巧的信息来源。本书对经验丰富的程序员、技术带头人、自学的程序员及几乎不懂太多 编程技巧的学生们都是大有裨益的。可以说,无论你是什么背景,阅读本书都会让你在更短的时间内、更容易地写出更好的程序。

代码大全是我早在好几年前便已经阅读过的好书。这几年来我不知买过多少书籍,也清理过许多因为书房再也放不下的书籍,但是代码大全这本书始终占据着我书架上重要的位置而不曾移开过,因为好书是经得起时光考验的。

—— Borland公司大中华首席技术官(CTO)李维

在众多的编程类书籍中,如果只让我挑一本书来阅读,那我一定选择《代码大全》,因为它是最不可或缺的。

—— 《C++ Primer中文版(第三版)》译者 潘爱民

下载地址:

代码大全(Code Complete 2nd Edition)


标签:,

相关电子书

Code Complete 2nd Edition(代码大全)

Tags: ,


英文名:Code Complete 2nd Edition

中文名:代码大全

作者:Steve McConnell

译者:金戈 汤凌 陈硕 张菲

出版社:Microsoft Press

Code Complete 2nd Edition(代码大全)

介绍:

The gap between the best software engineering practice and the average practice
is very wide—perhaps wider than in any other engineering discipline. A tool that
disseminates good practice would be important.
—Fred Brooks
My primary concern in writing this book has been to narrow the gap between the
knowledge of industry gurus and professors on the one hand and common commercial
practice on the other. Many powerful programming techniques hide in journals
and academic papers for years before trickling down to the programming public.
Although leading-edge software-development practice has advanced rapidly in recent
years, common practice hasn’t. Many programs are still buggy, late, and over budget,
and many fail to satisfy the needs of their users. Researchers in both the software
industry and academic settings have discovered effective practices that eliminate most
of the programming problems that have been prevalent since the 1970s. Because
these practices aren’t often reported outside the pages of highly specialized technical
journals, however, most programming organizations aren’t yet using them today.
Studies have found that it typically takes 5 to 15 years or more for a research development
to make its way into commercial practice (Raghavan and Chand 1989, Rogers
1995, Parnas 1999). This handbook shortcuts the process, making key discoveries
available to the average programmer now.

Whatever your background, this handbook can help you write better programs in less
time and with fewer headaches.
Complete software-construction reference This handbook discusses general aspects
of construction such as software quality and ways to think about programming. It gets
into nitty-gritty construction details such as steps in building classes, ins and outs of
using data and control structures, debugging, refactoring, and code-tuning techniques
and strategies. You don’t need to read it cover to cover to learn about these topics. The
book is designed to make it easy to find the specific information that interests you.
Ready-to-use checklists This book includes dozens of checklists you can use to
assess your software architecture, design approach, class and routine quality, variable
names, control structures, layout, test cases, and much more.
State-of-the-art information
This handbook describes some of the most up-to-date
techniques available, many of which have not yet made it into common use. Because
this book draws from both practice and research, the techniques it describes will
remain useful for years.
Larger perspective on software development This book will give you a chance to rise
above the fray of day-to-day fire fighting and figure out what works and what doesn’t.
Few practicing programmers have the time to read through the hundreds of books
and journal articles that have been distilled into this handbook. The research and realworld
experience gathered into this handbook will inform and stimulate your thinking
about your projects, enabling you to take strategic action so that you don’t have to
fight the same battles again and again.
Absence of hype Some software books contain 1 gram of insight swathed in 10
grams of hype. This book presents balanced discussions of each technique’s strengths
and weaknesses. You know the demands of your particular project better than anyone
else. This book provides the objective information you need to make good decisions
about your specific circumstances.
Concepts applicable to most common languages This book describes techniques
you can use to get the most out of whatever language you’re using, whether it’s C++,
C#, Java, Microsoft Visual Basic, or other similar languages.
Numerous code examples The book contains almost 500 examples of good and bad
code. I’ve included so many examples because, personally, I learn best from examples.
I think other programmers learn best that way too.
The examples are in multiple languages because mastering more than one language is
often a watershed in the career of a professional programmer. Once a programmer
realizes that programming principles transcend the syntax of any specific language,
the doors swing open to knowledge that truly makes a difference in quality and productivity.
To make the multiple-language burden as light as possible, I’ve avoided esoteric language
features except where they’re specifically discussed. You don’t need to understand
every nuance of the code fragments to understand the points they’re making. If
you focus on the point being illustrated, you’ll find that you can read the code regardless
of the language. I’ve tried to make your job even easier by annotating the significant
parts of the examples.
Access to other sources of information This book collects much of the available
information on software construction, but it’s hardly the last word. Throughout the
chapters, “Additional Resources” sections describe other books and articles you can
read as you pursue the topics you find most interesting.

下载地址:

Code Complete 2nd Edition英文版(代码大全)


标签:,

相关电子书

Code Quality: The Open Source Perspective(高质量程序设计艺术)

Tags: , , , ,


英文名:Code Quality: The Open Source Perspective

中文名:高质量程序设计艺术

作者:Diomidis Spinellis

译者:韩东海

出版社:Addison-Wesley Professional

Code Quality: The Open Source Perspective(高质量程序设计艺术)

介绍:

第十七届Jolt大奖

Sight is a faculty; seeing, an art.
— George Perkins Marsh

In this book we set as our goal to learn how to judge the quality of software code. Having mastered this art, we’ll then be able to apply our new-found sense to the code we write ourselves and to the code written by others, aiming to assess its quality aspects and improve what we find lacking. We can also use our acquired knowledge of code quality when we discuss implementation alternatives with our colleagues, hopefully nudging our project toward the most appropriate direction.

Software Quality

We can view software quality from the point of its specifications, and define it as the degree to which it meets the specified requirements, or we can also take people into account, and define quality as the degree to which the software meets the customer or user needs or expectations. No matter how we look at quality, it is important. Quality, time, and cost are the three central factors determining the success or failure of any software project, and quality is the only one of those factors that can not be changed on the spot by management fiat. In addition, the effects of poor software quality can be dramatic and difficult to undo: if our space probe’s software miscalculates a variable and crashes onto a planet, we are back to square one (minus the probe).

A good way to treat an elusive concept, such as the quality of software, is to decompose it into finer-grained attributes, and decompose them again, until we get tired of the process, or, preferably, we reach a level at which we can base our discussion on meaningful examples that share common characteristics. The ISO/IEC 9126 standard, which defines the quality model we will use in our discussion, categorizes internal and external software quality characteristics into six major areas: functionality, reliability, usability, efficiency, maintainability, and portability. You can see these elements decomposed in Figure 1.2; all six major elements include a compliance sub-characteristic, which refers to the extend to which the software adheres to the corresponding standards, conventions, style guides, and regulations. (Remember, the classification comes from an international standard, so you’d expect it to reference other standards.)

The functionality of software is the quality characteristic associated primarily with what the software does, rather than how it does it. The elements of the software’s functionality are: the suitability of the functions for the specified tasks and the user’s objectives, the accuracy of its results or operation, the interoperability of the software with other systems, and the security the software affords to its data. The suitability and interoperability characteristics are difficult to discern from code; we discuss security in Chapter 3, go through many elements of accuracy in Chapter 8, where we examine floating point arithmetic.

The reliability of software refers to its capability to maintain its specified level of performance under the specified conditions. The three elements of reliability mirror the prevention, mitigation, and recovery concepts we use for dealing with crises and natural disasters. Maturity refers to the absence of faults in the software, while fault tolerance is associated with the capacity of the software to continue functioning despite some faults, and recoverability deals with functions in the software that allow it to get back the data and continue operation after a failure. We deal with all three aspects in Chapter 2.

The usability of the software is primarily an external quality characteristic. Three of its elements roughly correspond to a typical timeline of software use: understandability, how easily we can understand whether the software is suitable for our needs, and how to use it to accomplish a particular task; learnability, the effort required to learn it, and operability, the effort required to use it. In addition, attractiveness deals with the feeling the software leaves on us. Although usability is a very important quality element, it is quite difficult to determine it by examining the software’s code. One could for example look for the use of appropriate APIs to select a file, a color, or a font, but in the end, usability is judged by the interaction of the user with the software. For this reason we will not examine it any more in this book.

Software efficiency deals with the ying and yang elements of computation: space and time. These two primal opposing but complementary concepts are what make practical computation possible. Disable all your computer’s caches (gaining space), and your machine will grind to a halt (loosing time). Distribute your SETI calculation over the internet (occupying more space), and your processing will fly (gaining time). In true ying/yang style, in some rare cases it is even possible to for a program to gain in both directions: squeeze a tight loop’s instructions to fit a cache, and the smaller code will also run faster. Trying to separate the two concepts, we talk about the software’s time behavior, which deals with response, processing times, and throughput rates, and resource utilization, which refers to the material resources (memory, CPUs, network connections) used by the software. We examine the performance of software in time in Chapter 4, and its performance in space in Chapter 5.

The maintainability of software is probably the element that can best be approached at the level of the software’s design and actual code. When talking about the software’s maintainability we are interested about analyzability, how easy it is for us to locate the elements we want to improve or fix; changeability, how much work we need to do to implement a modification; stability, how few things break after our changes; and testability, our ability to validate our modifications. We deal with all these elements, and more, in Chapter 7.

Finally, portability refers to how easy it is to take the software from one environment (for example Windows) and transfer it to another (for example Mac OS X). Our main goal here is adaptability, the capability of the software’s code to function in different environments, and this is the focus of Chapter 6. Other sub-characteristics of portability are mainly operational in nature: installability deals with the software’s installation in different environments, co-existence examines how well the software plays in a crowded playground, and replaceability denotes the extend to which a software can be used as a drop-in replacement for another.

本书论述阅读与编写软件代码的方法,重点讨论软件代码的质量属性,包括了软件系统的可靠性、可移植性、可用性、互操作性、适应性、可信性以及可维护性等方面。着力培养软件工程师了解这些属性的能力,并能编写出具备这些属性的优质代码。本书研究了来自于现有开源系统的真实示例,并提供了有意义的练习以巩固读者的判断能力和技巧,使用了统一建模语言来绘制所有图表。.
本书适合各层次软件开发人员、管理人员和测试人员阅读

下载地址:

目前没有电子书下载


标签:, , , ,

相关电子书

Code Craft: The Practice of Writing Excellent Code

Tags: ,


英文名:Code Craft: The Practice of Writing Excellent Code

中文名:

作者:Pete Goodliffe

出版社:No Starch Press

Code Craft: The Practice of Writing Excellent Code

介绍:

Many programmers know how to write correct code - code that works. But not all know how to craft great code - code that is well written and easy to understand. Code Craft teaches programmers how to move beyond writing correct code to writing great code. The book covers code writing concerns, including code presentation style, variable naming, error handling, and security; and the wider issues of programming in the real world, such as good teamwork, development processes, and documentation. Code Craft presents language-agnostic advice that is relevant to all developers, from an author with loads of practical experience. A Q&A section at the end of each chapter helps readers to review the material and makes the book suited for academic use as well.

From the Back Cover
You know how to write code that works, but what about code that’s well written and easy to understand? And robust and bug-free? If other programmers looked at your handiwork, would they be able to figure out the code’s logic and purpose? Exceptional programmers have more than just technical know-how; they adopt the right approach and attitude to development.

Code Craft will help take your programming beyond writing correct code to writing great code, thus turning you into a true programming professional or enhancing your existing professional skills.

With language-agnostic advice that’s relevant to all developers, Code Craft covers code-writing concerns such as presentation style, variable naming, error handling, and security. And it tackles broader, real-world programming issues like effective teamwork, development processes, and documentation. Each chapter ends with a Q&A section that reviews key concepts to get you thinking like an expert, making it an especially great reference for newer programmers who want to work professionally and efficiently as part of a team.

This survival guide for the software factory will show you how to:
* Write good code when the world’s not helping you
* Avoid disasters and distractions in the workplace
* Assess your abilities accurately and determine ways to improve
* Adopt productive attitudes and follow best practices

There’s little more valuable than the advice of a true, programming professional. You’ll find Code Craft to be clear, practical, and entertaining throughout, and a great way to take your code (and your career) to the next level.

下载地址:

Code Craft: The Practice of Writing Excellent Code

标签:,

相关电子书

Code Reading: The Open Source Perspective(代码阅读方法与实践)

Tags: , , ,


英文名:Code Reading: The Open Source Perspective

中文名:代码阅读方法与实践

作者:Diomidis Spinellis

译者:赵学良

出版社:Addison-Wesley

Code Reading: The Open Source Perspective

代码阅读方法与实践

介绍:

本书荣获美国(2004年度)第14届Jolt大奖  图书:技术类  生产效率大奖

If you are a programmer, you need this book.

  • You’ve got a day to add a new feature in a 34,000-line program: Where do you start? Page 333
  • How can you understand and simplify an inscrutable piece of code? Page 39
  • Where do you start when disentangling a complicated build process? Page 167
  • How do you comprehend code that appears to be doing five things in parallel? Page 132

You may read code because you have to–to fix it, inspect it, or improve it. You may read code the way an engineer examines a machine–to discover what makes it tick. Or you may read code because you are scavenging–looking for material to reuse.

Code-reading requires its own set of skills, and the ability to determine which technique you use when is crucial. In this indispensable book, Diomidis Spinellis uses more than 600 real-world examples to show you how to identify good (and bad) code: how to read it, what to look for, and how to use this knowledge to improve your own code.

无论从哪方面讲,代码阅读都不是一个容易的课题。在此之前,我不知道是否其他书籍曾尝试过阐述这一主题。因此,当我看到这本书时,我毫不犹豫地选择 了它。阅读这本书时,我的第一反应是“这本书在介绍什么呢?”。我在阅读和理解他人的代码时,曾有过无数次这种感觉。就如同,当您遇到一段新代码时,需要 花一段时间来理解与消化一样,理解与消化这本书背后的思想也要花费一些时间。实际上,我多次打开这本书,重新阅读部分内容,并将它应用到实际的环境中,从 而通过具体的形式不断加深对这个课题相关理论的理解。如果您的情况和我类似,那么这本书可能很适合您。

代码阅读有自身的一套技能,重要的是能够确定什么时候使用哪项技术。本书中,作者使用600多个现实的例子,向读者展示如何区分好的(和坏的)代码,如何阅读,应该注意什么,以及如何使用这些知识改进自己的代码。养成阅读高品质代码的习惯,可以提高编写代码的能力。

阅读代码是程序员的基本技能,同时也是软件开发、维护、演进、审查和重用过程中不可或缺的组成部分。本书首次将阅读代码作为一项独立课题,系统 性地加以论述。本书引用的代码均取材于开放源码项目――所有程序员都应该珍视的宝库。本书围绕代码阅读,详细论述了相关的知识与技能。“他山之石、可以攻 玉”,通过仔细阅读并学习本书,可以快速地提高读者代码阅读的技能与技巧,进而从现有的优秀代码、算法、构架、设计中汲取营养,提高自身的开发与设计能 力。

本书适用于对程序设计的基本知识有一定了解,并想进一步提高自身开发能力的读者。

目录:

第1章 导论
1.1 为什么以及如何阅读代码
1.2 如何阅读本书
进阶读物
第2章 基本编程元素
2.1 一个完整的程序
2.2 函数和全局变量
2.3 while循环、条件和块
2.4 switch语句
2.5 for循环
2.6 break和continue语句
2.7 字符和布尔型表达式
2.8 goto语句
2.9 小范围重构
2.10 do循环和整型表达式
2.11 再论控制结构
进阶读物
第3章 高级C数据类型
3.1 指针
3.2 结构
3.3 共用体
3.4 动态内存分配
3.5 typedef声明
进阶读物
第4章 C数据结构
4.1 向量
4.2 矩阵和表
4.3 栈
4.4 队列
4.5 映射
4.6 集合
4.7 链表
4.8 树
4.9 图
进阶读物
第5章 高级控制流程
5.1 递归
5.2 异常
5.3 并行处理
5.4 信号
5.5 非局部跳转
5.6 宏替换
进阶读物
第6章 应对大型项目
6.1 设计与实现技术
6.2 项目的组织
6.3 编译过程和制作文件
6.4 配置
6.5 修订控制
6.6 项目的专有工具
6.7 测试
进阶读物
第7章 编码规范和约定
7.1 文件的命名及组织
7.2 缩进
7.3 编排
7.4 命名约定
7.5 编程实践
7.6 过程规范
进阶读物
第8章 文档
8.1 文档的类型
8.2 阅读文档
8.3 文档存在的问题
8.4 其他文档来源
8.5 常见的开放源码文档格式
进阶读物
第9章 系统构架
9.1 系统的结构
9.2 控制模型
9.3 元素封装
9.4 构架重用
进阶读物
第10章 代码阅读工具
10.1 正规表达式
10.2 用编辑器浏览代码
10.3 用grep搜索代码
10.4 找出文件的差异
10.5 开发自己的工具
10.6 用编译器来协助代码阅读
10.7 代码浏览器和美化器
10.8 运行期间的工具
10.9 非软件工具
可用工具和进阶读物
第11章 一个完整的例子
11.1 概况
11.2 攻坚计划
11.3 代码重用
11.4 测试与调试
11.5 文档
11.6 观察报告
附录A 代码概况
附录B 阅读代码的格言

下载地址:

Code Reading: The Open Source Perspective(代码阅读方法与实践)

标签:, , ,

相关电子书

Site Sponsors

书籍分类