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源码.
待续.
2018-02-27 "Literate Programming"一书摘记之一的更多相关文章
- SAP接口编程 之 JCo3.0系列(02) : JCo Client Programming
SAP接口编程 之 JCo3.0系列(02) : JCo Client Programming 字数545 阅读52 评论0 喜欢1 JCo3.0调用SAP函数的过程 大致可以总结为以下步骤: 连接至 ...
- 文艺编程 Literate Programming
(译注:这篇文章是 Donald Knuth 一篇1983年的论文:Literate Programming 的介绍部分.有人翻译为“字面编程”,是极其错误的说法,literate 根本就没有“字面” ...
- 2018 ACM-ICPC, Syrian Collegiate Programming Contest
2018 ACM-ICPC, Syrian Collegiate Programming Contest A Hello SCPC 2018! 水题 B Binary Hamming 水题 C Por ...
- 【VSCode】Windows下VSCode编译调试c/c++【更新 2018.03.27】
--------– 2018.03.27 更新--------- 便携版已更新,点此获取便携版 已知BUG:中文目录无法正常调试 用于cpptools 0.15.0插件的配置文件更新 新的launch ...
- (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest(爽题)
layout: post title: (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest(爽题) author: " ...
- (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest
layout: post title: (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest author: "luow ...
- The 2018 ACM-ICPC Chinese Collegiate Programming Contest Moving On
Firdaws and Fatinah are living in a country with nn cities, numbered from 11 to nn.Each city has a r ...
- 2022.02.27 CF811E Vladik and Entertaining Flags
2022.02.27 CF811E Vladik and Entertaining Flags https://www.luogu.com.cn/problem/CF811E Step 1 题意 在一 ...
- 2022.02.27 CF811E Vladik and Entertaining Flags(线段树+并查集)
2022.02.27 CF811E Vladik and Entertaining Flags(线段树+并查集) https://www.luogu.com.cn/problem/CF811E Ste ...
随机推荐
- C#使用iTextSharp+ZXing.Net+FreeSpire.PDF生成和打印pdf文档
项目需求(Winform)可以批量打印某个模板,经过百度和摸索,使用iTextSharp+ZXing.Net+FreeSpire.PDF三个类库实现了生成pdf.生成条形码和打印pdf功能. 首先在项 ...
- 背水一战 Windows 10 (66) - 控件(WebView): 监听和处理 WebView 的事件
[源码下载] 背水一战 Windows 10 (66) - 控件(WebView): 监听和处理 WebView 的事件 作者:webabcd 介绍背水一战 Windows 10 之 控件(WebVi ...
- Java设计模式----解释器模式
计算器中,我们输入“20 + 10 - 5”,计算器会得出结果25并返回给我们.可你有没有想过计算器是怎样完成四则运算的?或者说,计算器是怎样识别你输入的这串字符串信息,并加以解析,然后执行之,得出结 ...
- MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause
MySQL[Err]1055 上次MySQL5.7.19主从建立完成之后,所有的测试都是在MySQL命令行下进行的,最近用Navicat Premium进行MySQL的连接,然后在插入数据的时候MyS ...
- vscode中iview的</Col>标签报错问题
直接看问题截图: 这是vetur中eslint的问题,在vscode菜单中,文件->首选项->设置 找到 “vetur.validation.template”: true 将其改为fal ...
- .NET Core 2.0 Preview 1发布下载和文档
.NET Core 2.0.0 Preview 1 发布于 2017 5.10. 你可以通过 Visual Studio 2017 Preview 15.3, Visual Studio for Ma ...
- javascript的hashCode实现
hashCode = function(str){ var hash = 0; if (str.length == 0) return hash; for (i = 0; i < str.len ...
- linux下配置nginx反向代理例子
官方说明: 例子: 虚拟机ip:192.168.85.3,物理机VMware Network Adapter VMnet8 ip:192.168.85.1 1,准备tomcat 准备一tomcat, ...
- python3中的range函数返回的是列表吗?
注意,这里说的Python3里面的range函数,和Python2是不同的,返回的不是列表,是可迭代对象. 在python3中,如果执行下面的语句 print(range(10)) 得到结果是 ran ...
- js判断客户端是pc还是手机及获取浏览器版本
//判断是pc还是移动端 function browserRedirect() { var sUserAgent = navigator.userAgent.toLowerCase(); var bI ...