The Elements of Programming Style (2/e)

本网站不提供下载链接,喜欢看书的朋友请关注公众号:【lennylee的碎碎念】(lennyleede),首页回复:授人以渔,自动获取搜索资源的方法。

内容简介:

The Elements of Programming Style (2/e) (豆瓣)<![CDATA[!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||"/",r.setTime(r.getTime()+24*n*60*60*1e3),c="; expires="+r.toGMTString();for(i in o)e.cookie=i+"="+o[i]+c+"; path="+t},n=function(o){var n,t,c,i=o+"=",r=e.cookie.split(";");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\s+|\s+$/g,""),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\"/g,"");return null},t=e.write,c={"douban.com":1,"douban.fm":1,"google.com":1,"google.cn":1,"googleapis.com":1,"gmaptiles.co.kr":1,"gstatic.com":1,"gstatic.cn":1,"google-analytics.com":1,"googleadservices.com":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src="https://www.douban.com/j/except_report?kind=ra022&reason="+encodeURIComponent(e)+"&environment="+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/]+)/gi,g=/http:\/\/(.+?)\.([^\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(“tqs”!==n(“hj”)&&(i(l[1],location.href),o({hj:”tqs”},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);]]>

下载豆瓣客户端

豆瓣 6.0 全新发布
×

豆瓣

扫码直接下载

iPhone
·
Android

豆瓣读书

搜索:

<![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)


    The Elements of Programming Style (2/e)


    作者:

    Brian W. Kernighan

    /

    P. J. Plauger

    出版社: McGraw-Hill
    出版年: 1978-1-1
    页数: 168
    定价: USD 50.93
    装帧: Paperback
    ISBN: 9780070342071

    豆瓣评分

    9.3


    47人评价


    5星

    63.8%


    4星

    29.8%


    3星

    6.4%


    2星

    0.0%


    1星

    0.0%





    评价:






    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 阅读器




    CoffeeScript小书

    1.99元




    Python源码剖析

    38.39元




    编程大师访谈录

    12.50元

    喜欢读”The Elements of Programming Style (2/e)”的人也喜欢
     · · · · · ·


    程序设计实践

    9.1

    Software Tools


    Concepts, Techniques, and Model…

    8.5

    C++代码设计与重用

    7.4

    Elements of Programming

    8.9

    Code Complete

    9.1

    编程精粹

    9.0

    Elemental Design Patterns


    How to Design Programs

    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('你关注的人还没写过长评’);
    }
    });
    });
    ]]>


    胖胖的大头鱼

    2006-10-02 17:22:15

    一本老书,两个牛人,一堆经验

    一本老书,写书的两个牛人. Brian W. Kernighan,熟悉unix/c语言的没有不知道他老人家的大名的,文字漂亮,技术厉害. P. J. Plauger,这位仁兄是为ms提供stl实现的公司头头(不过jjHou说那是可读性最差的一份stl实现,哈哈), 他很早就在c++里面混了,似乎是CUJ的高级编辑. 不过这本书全…

     (展开)


    8


    1

    4回应


    周兆熊

    2015-04-07 16:20:45


    人民邮电出版社2015版

    软件开发中的“格调”

    在三年之前,我从学校毕业,进入公司,正式开始了软件开发工作。我从完成第一个开发任务的过程中学到了很多东西,包括:1)编写程序只是软件开发中的一个流程,并非全部;2)程序编写需要遵循一定的规范,远远不只是实现功能那么简单;3)程序编写者是程序的第一负责人,要对自己…

     (展开)


    1



    1回应


    wuyve

    2014-04-21 11:15:43

    读读Rules还是不错的

    没研究过此书中代码所使用的Fortan和PL/I这两种语言,不过之前读过诸如Writing Solid Code、The Practice of Programming、编程珠玑一类的书,发现它们的Tips都是很类似的,比如:可读性、模块化、防御性编程、浮点计算和判等、数据结构决定程序、测试,等等。此书不知是不是编…

     (展开)


    2



    0回应


    Mr.编程格调

    2018-11-03 23:05:31


    人民邮电出版社2015版

    好书

    这篇书评可能有关键情节透露

    完全忽略了编程思维和编程设计这个重要的捷径,也可以说设计是灵魂,算法是设计的表达,从总体到局部, 如果反过来从局部到总体就会陷入无限的细节和题海当中,变成知无涯而人生有涯,非常浪费时间, 很多人说普通程序根本用不到算法,其实也不是,把一个完整程序流程走下来其…

     (展开)





    0回应


    游侠Harry

    2017-01-09 20:34:27


    人民邮电出版社2015版

    石器时代的语言和规范

    看这本书之前,我刚刚写了一个最原始的BASIC语言解释器作为Parser的练手项目。完成后,用了这个解释器试运行了经典的月球登陆车游戏,顺便分析了游戏的源代码,发现读起来各种不便 1. IF语句只能指定跳转行号,不支持ELSE 2. 只能用IF和GOTO来模拟WHILE循环 3. 没有函数调用,…

     (展开)





    0回应


    萬軍

    2015-07-05 12:28:26


    人民邮电出版社2015版

    编程格调总结

    一、表达 1.写清楚 2.保守使用临时变量 3.明白无歧义 4.不要自己造所有的工具 5.确保判断测试条件清楚易读 二、控制结构 1.先用你顺手的高级语言写一遍程序,这时可以看清楚算法并作相应的调试,程序正确之后,再翻译成你编译器所处理的语言 2.子例程和函数,把…

     (展开)





    0回应


    >

    更多书评
    6篇

    论坛
     · · · · · ·

    请问:这本书的中文名叫啥啊?谢谢! 来自鱼头 6 回应 2015-07-27 23:39:07
    书摘 来自xyb 1 回应 2009-07-30 12:19:35



    这本书的其他版本
     · · · · · ·
     (
    全部3
    )

    • 人民邮电出版社 (2015)

      7.8分 55人读过

      展开有售 (1)

        • McGraw-Hill Education (1974)

          暂无评分

              在哪儿借这本书
               · · · · · ·

              <!–> 图书馆合作–>

              以下书单推荐
               · · · · · ·
               (
              全部
              )

              谁读这本书?
               · · · · · ·

              Nothing
              Nothing
              2025年12月23日 想读

              Keeling•Hsin
              Keeling•Hsin
              2025年7月11日 想读

              john simth
              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

              作者简介:

              原文摘录: