博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2018-02-27 "Literate Programming"一书摘记之一
阅读量:4330 次
发布时间:2019-06-06

本文共 1326 字,大约阅读时间需要 4 分钟。

书到后才发现是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源码.

待续.

转载于:https://www.cnblogs.com/program-in-chinese/p/10489515.html

你可能感兴趣的文章
mysql 日期时间运算函数(转)
查看>>
初识前端作业1
查看>>
ffmpeg格式转换命令
查看>>
万方数据知识平台 TFHpple +Xpath解析
查看>>
Hive实现oracle的Minus函数
查看>>
秒杀多线程第四篇 一个经典的多线程同步问题
查看>>
RocketMQ配置
查看>>
vs code调试console程序报错--preLaunchTask“build”
查看>>
蚂蚁金服井贤栋:用技术联手金融机构,形成服务小微的生态合力
查看>>
端口号大全
查看>>
机器学习基石笔记2——在何时可以使用机器学习(2)
查看>>
POJ 3740 Easy Finding (DLX模板)
查看>>
MySQL 处理重复数据
查看>>
关于typedef的用法总结(转)
查看>>
【strtok()】——分割字符串
查看>>
Linux下安装rabbitmq
查看>>
曹德旺
查看>>
【转】判断点在多边形内(matlab)
查看>>
java基础之集合:List Set Map的概述以及使用场景
查看>>
Python 线程 进程 协程
查看>>