作者: Steve McConnell
出版社: Microsoft Press
出版年: June, 2004
页数: 960
定价: $49.99
装帧: Paperback
ISBN: 9780735619678
作者简介 · · · · · ·
豆瓣成员常用的标签(共65个) · · · · · ·
喜欢读"Code Complete, Second Edition"的人也喜欢 · · · · · ·
按有用程度 按页码先后 最新笔记
-
第141页
GoneChaosGone (埋头做一只伪造猫)
Encapusulation Avoid friend classes I have no real experience in C++, so just have no idea what a "friend class" is. Ref to wikipedia, A friend class in C++, can access the "private" and "protected" members of the class in which it is declared as a friend. On declaration of friend class all member function of the friend class become friend of the class in whic... (更多)
I have no real experience in C++, so just have no idea what a "friend class" is.Ref to wikipedia, A friend class in C++, can access the "private" and "protected" members of the class in which it is declared as a friend. On declaration of friend class all member function of the friend class become friend of the class in which the friend class was declared. Friend status is not inherited; every friendship has to be explicitly declared. Friend classes can help in improving encapsulation if used wisely.But why I wont see it in a modern OO language like Java and C#?Let me clarify how the friend keyword undermines OOP.Private and protected variables and methods are perhaps one of the most important part of OOP. The idea that objects can hold data or logic that only they can use allows you to write your implementation of functionality independent of your environment - and that your environment cannot alter state information that it is not suited to handle. By using friend you are coupling two classes' implementations together - which is much worse then if you just coupled their interface. http://stackoverflow.com/questions/203616/why-does-c-sharp-not-provide-the-c-style-friend-keyword (收起)Encapusulation Avoid friend classes
2012-02-05 23:24:41 回应
-
第143页
GoneChaosGone (埋头做一只伪造猫)
coupling goes hand in glove with abstraction adn encapsulation.Tight coupling occurs when an abstractions is leaky,or when encapsulation is broken.If a class offers an incomplete set of service ,other routines might find they need to read or write its internal data directly. That opens up the class ,making it a glass box instead of a black box, and it virtually eliminates the class' encapsulation.... (更多)
I agree with the point here. But in my general pratice, especially against some colleagues' work, if a routine or attribute does not work as my expection, i will dive deep into the glass box if I can, to find out whether I am wrong or it is a bug. I wont go to my colleague's desk and tell him, "hi, your code is not written in a proper abstract way, please correct it." It is just rude, and will result in some issues in your relationship with your work mates. An alternative way is to do some explanation to some code but without naming the code's auther. Anyway, if someone in the work tell me my work is bad, i will happy to listen to his idea, but it just me. (收起)coupling goes hand in glove with abstraction adn encapsulation.Tight coupling occurs when an abstractions is leaky,or when encapsulation is broken.If a class offers an incomplete set of service ,other routines might find they need to read or write its internal data directly. That opens up the class ,making it a glass box instead of a black box, and it virtually eliminates the class' encapsulation.
2012-02-05 22:59:41 回应
-
第26页
GoneChaosGone (埋头做一只伪造猫)
Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (更多)Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (收起)2012-01-20 06:32:10 回应
-
第5页
可爱的肖恩 (经过涅槃的凤凰会重生)
软件的实现为什么重要? 1、Construction is a large part of software development. 2、Construction is the central activity in software development. 3、With a focus on construction, the individual programmer's productivity can improve enormously. 4、Construction's product, the source code, is often the only accurate description of the software. 5、Construction is the only activity that's guar... (更多)软件的实现为什么重要?
(收起)1、Construction is a large part of software development. 2、Construction is the central activity in software development. 3、With a focus on construction, the individual programmer's productivity can improve enormously. 4、Construction's product, the source code, is often the only accurate description of the software. 5、Construction is the only activity that's guaranteed to be done.
2011-12-29 01:17:26 回应
-
第21页
GoneChaosGone (埋头做一只伪造猫)
Meaphors are heurristics, so even using "Building Construction" is still weak. Because in today's "posh" agile way,everything is keeping changing. Software is delievered frequently (weeks instead of months). Cannot image constructors keep changing their work week by week in the reallife. Software development is a unique process, as no metaphor can be used to describe it. ... (更多)Meaphors are heurristics, so even using "Building Construction" is still weak. Because in today's "posh" agile way,everything is keeping changing. Software is delievered frequently (weeks instead of months). Cannot image constructors keep changing their work week by week in the reallife. Software development is a unique process, as no metaphor can be used to describe it. Metaphors are for rookie :)Experience is not the triky things learned from a IDE, a languge,a framework. It is kind of thing tell you how to make a right decistion to every job. (收起)2012-01-20 05:39:25 回应
-
第26页
GoneChaosGone (埋头做一只伪造猫)
Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (更多)Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (收起)2012-01-20 06:32:10 回应
-
第141页
GoneChaosGone (埋头做一只伪造猫)
Encapusulation Avoid friend classes I have no real experience in C++, so just have no idea what a "friend class" is. Ref to wikipedia, A friend class in C++, can access the "private" and "protected" members of the class in which it is declared as a friend. On declaration of friend class all member function of the friend class become friend of the class in whic... (更多)
I have no real experience in C++, so just have no idea what a "friend class" is.Ref to wikipedia, A friend class in C++, can access the "private" and "protected" members of the class in which it is declared as a friend. On declaration of friend class all member function of the friend class become friend of the class in which the friend class was declared. Friend status is not inherited; every friendship has to be explicitly declared. Friend classes can help in improving encapsulation if used wisely.But why I wont see it in a modern OO language like Java and C#?Let me clarify how the friend keyword undermines OOP.Private and protected variables and methods are perhaps one of the most important part of OOP. The idea that objects can hold data or logic that only they can use allows you to write your implementation of functionality independent of your environment - and that your environment cannot alter state information that it is not suited to handle. By using friend you are coupling two classes' implementations together - which is much worse then if you just coupled their interface. http://stackoverflow.com/questions/203616/why-does-c-sharp-not-provide-the-c-style-friend-keyword (收起)Encapusulation Avoid friend classes
2012-02-05 23:24:41 回应
-
第143页
GoneChaosGone (埋头做一只伪造猫)
coupling goes hand in glove with abstraction adn encapsulation.Tight coupling occurs when an abstractions is leaky,or when encapsulation is broken.If a class offers an incomplete set of service ,other routines might find they need to read or write its internal data directly. That opens up the class ,making it a glass box instead of a black box, and it virtually eliminates the class' encapsulation.... (更多)
I agree with the point here. But in my general pratice, especially against some colleagues' work, if a routine or attribute does not work as my expection, i will dive deep into the glass box if I can, to find out whether I am wrong or it is a bug. I wont go to my colleague's desk and tell him, "hi, your code is not written in a proper abstract way, please correct it." It is just rude, and will result in some issues in your relationship with your work mates. An alternative way is to do some explanation to some code but without naming the code's auther. Anyway, if someone in the work tell me my work is bad, i will happy to listen to his idea, but it just me. (收起)coupling goes hand in glove with abstraction adn encapsulation.Tight coupling occurs when an abstractions is leaky,or when encapsulation is broken.If a class offers an incomplete set of service ,other routines might find they need to read or write its internal data directly. That opens up the class ,making it a glass box instead of a black box, and it virtually eliminates the class' encapsulation.
2012-02-05 22:59:41 回应
-
第26页
GoneChaosGone (埋头做一只伪造猫)
Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (更多)Steve is right, prerequisites is totally depending on your boss's mind, if he wants you begin code asap, then you have to find a way to pretend you've followed his very "correct" decision. (收起)2012-01-20 06:32:10 回应
书评 · · · · · · (共83条) 我来评论这本书
热门评论 最新评论
软件构建的核心就是管理复杂度
-
- mijia(怪兽工程师) 啊,也不知道多少天了,终于啃完了大部头Code Complete。经典就是经典,确实受益匪浅。 总结一下,其实让我记忆深刻的主要是两点: 首先,软件构建的核心就是管理复杂度。虽然书中有不少的篇幅来讨论变量、语句等等这些编程的基本要素,还包括代码改善和调整的策略和方法,可谓不无巨细。不过深入理解一下,这些...... (14回应)2006-05-19 63/66有用来自 电子工业出版社2006版
堪称经典的力作
-
- 想飞的猫 想要学习软件开发的都应该去读这本书。书里面有很多一般很难接触到的最佳实践的东西。很多时候,这些也就是新手和高手之间的区别。当你知道了很多这些东西之后,也就很难有人再去叫你菜鸟。 我认为本书最值得去读的是中间那几章很详细的细节方面的描述,如变量命名之类。我也很讨厌死板的软件工程教条,但我不反对软件工程。其实,这些所...... (10回应)2009-11-11 24/25有用来自 电子工业出版社2006版
《代码大全》——软件开发的世界地图
-
- 庄表伟 我有很浓厚的“地图情结”,以前我写过一篇《我的信仰地图》,最近又做了一次关于Ajax的演讲,名字叫做《Ajax技术地图》。我一直以来的观点是,世界是一个整体,在这个巨大的世界之中,任何事物、任何知识,任何观点,都有其合理、自然的位置。理解这个世界的过程,就是逐步将需要了解的各种事物,在作为整体的一个世界中,找到其位...... (12回应)2006-05-05 32/40有用来自 电子工业出版社2006版
代码大全中英文要点
-
- rocflytosky(曲突徙薪亡恩泽,焦头烂额为上客) 《代码大全》是一本不多见的值得多次阅读的好书,在《代码大全》一书中,每一章后面都有这一章的要点,略读这些要点中我们就可以了解到我们已经掌握了哪些知识,哪些知识还没有掌握,阅读,重读时就有重点了。下面列出这些要点,供没有购买这本书的同学(同仁)参考,或可用作决定“是否应该买这本书”的参考。 第1章 欢迎进入软件构建的世...... (12回应)2006-09-19 17/20有用来自 电子工业出版社2006版
软件构建的集大成者
-
- 草根程序员(xUnit 测试模式 第十八章) 初见《代码大全》,还是该书的第一版,只从书名上看,还以为都是一些代码的示例。觉得还有很多的书需要读,这种实用主义的技巧书,可以先放一放,于是与之失之交臂。 及至后来,才发现原来被中文书名给骗了。 只要将目录浏览一过,就会发现,这本书基本覆盖了软件构建的全过程,从需要分析、系统架构设计到具体的编码规范、编码技巧,程序...... (5回应)2010-03-04 21/23有用来自 电子工业出版社2006版
《代码大全》读后感
-
- Perry 转自我的博客 http://pengqi.me/2011/06/%E3%80%8A%E4%BB%A3%E7%A0%81%E5%A4%A7%E5%85%A8%E3%80%8B%E8%AF%BB%E5%90%8E%E6%84%9F/ 昨天终于把《代码大全》这本900多页的大部头“啃”完了,很有成就感,所以写篇博客梳理......2011-06-08 4/4有用来自 电子工业出版社2006版
经典之作,翻译不行
-
- 空白(云胡不喜) 书名翻译成《代码大全》是一种误导。如果直译,最好译作《关于编写程序代码的一切》。 可惜目前英文不到家,读读应用类的还行,无法读这种较抽象的专业书籍。如果能读通原版的,对提高编码能力绝对有实质性的帮助。 如果能读完这本书,对书中的代码示例有自己的切身体会的话,恭喜你,你已经成为一个合格的程序员了。我尚在合格的......2012-02-03 来自 电子工业出版社2006版
为编码人员写的一本书
-
- 泥土 适合有一定编码经历的程序员阅读。如果大部分章节涉及的问题你都没有感触,说明或者读者没一定编码经历,或者已经跨过了这个层次。对于后一种,就没有必要看了。但对于前一种读者,建议还是看看。看的方法上,不需要字斟句酌,关注其思想和方法就可以了。......2012-01-31 来自 电子工业出版社2006版
Code Complete, Second Edition
-
- 涅瓦纳(一个沉默的观影者与读书人) 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了......2011-07-30
代码大全
-
- 涅瓦纳(一个沉默的观影者与读书人) 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了 我看过了......2011-07-30 来自 电子工业出版社2006版
china-pub近期免费赠书活动大汇总
-
- china-pub(网上书店) http://www.china-pub.com/STATIC07/1106/jsj_zengshu_110616.asp 1、china-pub新浪微博免费赠书(5本) #china-pub赠书#共5册, 《云计算核心技术剖析》 《云计算(第二版)》 《Linux内核设计与实现(原书第3......2011-06-17 来自 电子工业出版社2006版
"Code Complete, Second Edition"的论坛 · · · · · ·
| 每一个小细节 | 来自zy | 2010-11-20 | |
| 看最后三部分就可以了 | 来自QiQ | 2010-02-02 |
这本书的其他版本 · · · · · · ( 全部6 )
- 电子工业出版社版 2006-3 / 2384人读过 / 有售
- 电子工业出版社版 2006-12 / 93人读过 / 有售
- Microsoft Press版 14 May, 1993 / 13人读过
- 学苑出版社版 1993年11月 / 7人读过
以下豆列推荐 · · · · · · (全部)
- 程序员最应该读的图书(原版) (hongqn)
- 程序员必读经典书籍 (Felven)
- Coders and Hackers (Alex Vonduar)
- 最佳软件工程图书Top100 (xyb)
- mmx's Bookshelf (达瑾)
谁读这本书?
喜欢这本书的人常去的小组 · · · · · ·

- TopGeek (357)

- 微软 (1190)

- Mac & iPhone开发者之家 (4999)

- InfoQ中文站 (1000)

- 分布式技术与系统软件 (680)

- 正则表达式 (262)

- 程序员-接活 (338)

- Freebsd (1056)
喜欢这本书的人关注的活动 · · · · · ·
订阅关于Code Complete, Second Edition的评论:
feed: rss 2.0











