
本网站不提供下载链接,喜欢看书的朋友请关注公众号:【lennylee的碎碎念】(lennyleede),首页回复:授人以渔,自动获取搜索资源的方法。
内容简介:
豆瓣
扫码直接下载
<![CDATA[
{{= title}}
{{if year}}
{{= year}}
{{/if}}
{{if type == “b”}}
{{= author_name}}
{{else type == “a” }}
{{if en_name}}
{{= en_name}}
{{/if}}
{{/if}}
]]>
The Elements of Programming Style (2/e)
作者:
/
P. J. Plauger
出版社: McGraw-Hill
出版年: 1978-1-1
页数: 168
定价: USD 50.93
装帧: Paperback
ISBN: 9780070342071
豆瓣评分
9.3
5星
4星
3星
2星
1星
The Elements of Programming Style (2/e)的创作者
· · · · · ·
· · · · · ·
原文摘录
· · · · · ·
-
* Write clearly – don’t be too clever.
* Say what you mean, simply and directly.
* Use library functions.
* Avoid temporary variables.
* Write clearly – don’t sacrifice clarity for “efficiency.”
* Let the machine do the dirty work.
* Replace repetitive expressions by calls to a common function.
* Parenthesize to avoid ambiguity.
* Choose variable names that won’t be confused.
* Avoid the Fortran arithmetic IF.
* A void unnecessary branches.
* Use the good features of a language; avoid the bad ones.
* Don’t use conditional branches as a substitute for a logical expression.
* Use the “telephone test” for readability.
* Use DO-END and indenting to delimit groups of statements.
* Use IF-ELSE to emphasize that only one of two actions is to be performed.
* Use DO and DO-WHILE to … (查看原文)

豆友152905485
3赞
2022-11-23 14:58:17
喜欢读”The Elements of Programming Style (2/e)”的人也喜欢的电子书
· · · · · ·
支持 Web、iPhone、iPad、Android 阅读器
喜欢读”The Elements of Programming Style (2/e)”的人也喜欢
· · · · · ·
-
-
程序设计实践
9.1
-
-
C++代码设计与重用
7.4
-
-
Code Complete
9.1
-
-
编程精粹
9.0
-
-
C++ Gotchas
8.6
短评
· · · · · ·
(
全部 12 条
)
-
0
有用
Ljhero
2014-05-16 21:43:07
经典的编程风格指南。虽然里面示例是Fortran和PL/I代码,但总结的编写优秀代码的规则具有普遍性,比如不要过早优化,过度注释等。
-
0
有用
冷艳锯
2014-12-28 20:02:50
这些rules应该在刚学编程的时候就介绍。另,FORTRAN和PL/I读起来很吃力,字母全是大写的高级语言看起来跟汇编语言差不多
-
2
有用
軒轅鍾書
2013-11-25 17:31:25
很多建议还是很好的,特别是关于Input的validity,cover边界值等,这是之前自己一直忽视的。其余部分,简言之:programming也是注释的一部分;coding首先是正确,然后清晰、健壮,再是高效;各个部分要做到“增之一分则太长,减之一分则太短,着粉则太白,施朱则太赤。”
-
0
有用
windstorm
2009-12-21 10:55:13
挺好得,就是Fortran太难懂
-
0
有用
bigpiglet
2013-01-28 10:24:07
看的是摘要的翻译版本,这些原则都还蛮是实用的。
我要写书评
The Elements of Programming Style (2/e)的书评 · · · · · ·
( 全部 6 条 )
<![CDATA[
var cur_sort = '';
$('#reviews-wrapper .review_filter a').on('click', function () {
var sort = $(this).data('sort');
if(sort === cur_sort) return;
if(sort === 'follow' && true){
window.location.href = '//www.douban.com/accounts/login?source=movie';
return;
}
if($('#reviews-wrapper .review_filter').data('doing')) return;
$('#reviews-wrapper .review_filter').data('doing', true);
cur_sort = sort;
$('#reviews-wrapper .review_filter a').removeClass('cur');
$(this).addClass('cur');
$.getJSON('reviews', { sort: sort }, function(res) {
$('#reviews-wrapper .review-list').remove();
$('#reviews-wrapper [href="reviews?sort=follow"]').parent().remove();
$('#reviews-wrapper .review_filter').after(res.html);
$('#reviews-wrapper .review_filter').data('doing', false);
$('#reviews-wrapper .review_filter').removeData('doing');
if (res.count === 0) {
$('#reviews-wrapper .review-list').html('你关注的人还没写过长评’);
}
});
});
]]>
一本老书,两个牛人,一堆经验
一本老书,写书的两个牛人. Brian W. Kernighan,熟悉unix/c语言的没有不知道他老人家的大名的,文字漂亮,技术厉害. P. J. Plauger,这位仁兄是为ms提供stl实现的公司头头(不过jjHou说那是可读性最差的一份stl实现,哈哈), 他很早就在c++里面混了,似乎是CUJ的高级编辑. 不过这本书全…
(展开)
软件开发中的“格调”
在三年之前,我从学校毕业,进入公司,正式开始了软件开发工作。我从完成第一个开发任务的过程中学到了很多东西,包括:1)编写程序只是软件开发中的一个流程,并非全部;2)程序编写需要遵循一定的规范,远远不只是实现功能那么简单;3)程序编写者是程序的第一负责人,要对自己…
(展开)
读读Rules还是不错的
没研究过此书中代码所使用的Fortan和PL/I这两种语言,不过之前读过诸如Writing Solid Code、The Practice of Programming、编程珠玑一类的书,发现它们的Tips都是很类似的,比如:可读性、模块化、防御性编程、浮点计算和判等、数据结构决定程序、测试,等等。此书不知是不是编…
(展开)
好书
这篇书评可能有关键情节透露
完全忽略了编程思维和编程设计这个重要的捷径,也可以说设计是灵魂,算法是设计的表达,从总体到局部, 如果反过来从局部到总体就会陷入无限的细节和题海当中,变成知无涯而人生有涯,非常浪费时间, 很多人说普通程序根本用不到算法,其实也不是,把一个完整程序流程走下来其…
(展开)
石器时代的语言和规范
看这本书之前,我刚刚写了一个最原始的BASIC语言解释器作为Parser的练手项目。完成后,用了这个解释器试运行了经典的月球登陆车游戏,顺便分析了游戏的源代码,发现读起来各种不便 1. IF语句只能指定跳转行号,不支持ELSE 2. 只能用IF和GOTO来模拟WHILE循环 3. 没有函数调用,…
(展开)
编程格调总结
一、表达 1.写清楚 2.保守使用临时变量 3.明白无歧义 4.不要自己造所有的工具 5.确保判断测试条件清楚易读 二、控制结构 1.先用你顺手的高级语言写一遍程序,这时可以看清楚算法并作相应的调试,程序正确之后,再翻译成你编译器所处理的语言 2.子例程和函数,把…
(展开)
>
更多书评
6篇
论坛
· · · · · ·
| 请问:这本书的中文名叫啥啊?谢谢! | 来自鱼头 | 6 回应 | 2015-07-27 23:39:07 |
| 书摘 | 来自xyb | 1 回应 | 2009-07-30 12:19:35 |
这本书的其他版本
· · · · · ·
(
全部3
)
-
7.8分 55人读过
-
暂无评分
在哪儿借这本书
· · · · · ·
<!–> 图书馆合作–>
以下书单推荐
· · · · · ·
(
全部
)
- 计算机理论
(mashan_snail) - 软件 IT 经典
(uncutstone) - 我认为是精品的编程相关的书
(徐宥) - 牛B程序员必读清单
(reLax) - 技术面经
(reLax)
谁读这本书?
· · · · · ·
![]()
Nothing
2025年12月23日 想读
![]()
Keeling•Hsin
2025年7月11日 想读
![]()
john simth
2025年2月8日 想读
![]()
回家吃饭
2024年11月16日 想读
> 25人在读
> 63人读过
> 961人想读
0 && asides.length > 0 && articles[0].offsetHeight >= asides[0].offsetHeight) {
(global.DoubanAdSlots = global.DoubanAdSlots || []).push(‘dale_book_subject_middle_right’);
}
})(this);
]]>
二手市场
· · · · · ·
· · · · · ·
订阅关于The Elements of Programming Style (2/e)的评论:
feed: rss 2.0
= 2000) {
(global.DoubanAdSlots = global.DoubanAdSlots || []).push(‘dale_book_subject_bottom_super_banner’);
}
})(this);
]]>
© 2005-2026 douban.com, all rights reserved 北京豆网科技有限公司
<![CDATA[
var setMethodWithNs = function(namespace) {
var ns = namespace ? namespace + '.' : ''
, fn = function(string) {
if(!ns) {return string}
return ns + string
}
return fn
}
var gaWithNamespace = function(fn, namespace) {
var method = setMethodWithNs(namespace)
fn.call(this, method)
}
var _gaq = _gaq || []
, accounts = [
{ id: 'UA-7019765-1', namespace: 'douban' }
, { id: 'UA-7019765-16', namespace: '' }
]
, gaInit = function(account) {
gaWithNamespace(function(method) {
gaInitFn.call(this, method, account)
}, account.namespace)
}
, gaInitFn = function(method, account) {
_gaq.push([method('_setAccount'), account.id])
_gaq.push([method('_addOrganic'), 'google', 'q'])
_gaq.push([method('_addOrganic'), 'baidu', 'wd'])
_gaq.push([method('_addOrganic'), 'soso', 'w'])
_gaq.push([method('_addOrganic'), 'youdao', 'q'])
_gaq.push([method('_addOrganic'), 'so.360.cn', 'q'])
_gaq.push([method('_addOrganic'), 'sogou', 'query'])
if (account.namespace) {
_gaq.push([method('_addIgnoredOrganic'), '豆瓣'])
_gaq.push([method('_addIgnoredOrganic'), 'douban'])
_gaq.push([method('_addIgnoredOrganic'), '豆瓣网'])
_gaq.push([method('_addIgnoredOrganic'), 'www.douban.com'])
}
if (account.namespace === 'douban') {
_gaq.push([method('_setDomainName'), '.douban.com'])
}
_gaq.push([method('_setCustomVar'), 1, 'responsive_view_mode', 'desktop', 3])
_gaq.push([method('_setCustomVar'), 2, 'login_status', '0', 2]);
_gaq.push([method('_trackPageview')])
}
for(var i = 0, l = accounts.length; i
作者简介:
原文摘录:


![[加拿大] 布莱恩·克尼汉](https://img3.doubanio.com/view/personage/m/public/10a5f801d3bf42b9f87d15e401faa333.jpg)







