zoukankan      html  css  js  c++  java
  • 2018-02-27 "Literate Programming"一书摘记之一

    书到后才发现是Knuth的论文集, 第一篇就在网上: Computer programming as an art (1974). 其中"Taste and Style"(品味和风格)一节说到"好"程序的一部分要素:

    ...when it works correctly. Secondly, if it is easy to change, when the time for adaptation arises. Both of these goals are achieved when the program is easily readable and understandable to a person who knows the appropriate language.

    很高兴看到他早就指出可读性的重要性.

    不远处就是那句经典的:

    Premature optimization is the root of all evil (or at least most of it) in programming.

    时间有限, 就跳过了那些网上已有的论文. 如:

    structured programming with goto statements (1974)

    "a structured program to generate all topological sorting arrangements"

    直接跳到"Literate Programming(1984)"一章. 先看最后一页(总共30+). 之后写到哪里算哪里吧.

    这两句很有趣:

    My hope is that the ability to make explanations more natural will cause more programmers to discover the joys of literate programming, because I believe it's quite a pleasure to combine verbal and mathematical skills; but perhaps I'm hoping for too much. ...
    Perhaps we will even one day find Pulitzer prizes awarded to computer programs.

    遥远地握握手. 想让程序像文章一样是个好坑, 估计个人是爬不出来了.

    倒数第二页提到:

    I don't believe every computer language should attempt to offer all things to all people.

    WEB系统结合了TEX和Pascal, 是为当时的计算机科学家设计. 论文主体是介绍一个完整的例子(20页左右). 粗看一下WEB好像是一个类自然语言语法的语言, 编译可以生成TEX文档和Pascal源码.

    待续.

  • 相关阅读:
    微信小程序反编译
    Mac 绑定Gitlab或者GitHub帐号,从新生成公钥
    Vue调试工具vue-devtools安装及使用
    NPM和Yarn添加淘宝镜像
    权限菜单设计
    Axure RP 7.0注册码
    Mac用户抓包软件Charles 4.0 破解 以及 抓取Https链接设置
    [转]c++导出函数dll供c#调用
    ef(EntityFramework)动态传递数据库连接字符串
    [转]sqlserver查询系统表统计表行数和占用空间
  • 原文地址:https://www.cnblogs.com/program-in-chinese/p/10489515.html
Copyright © 2011-2022 走看看