所有软件都很烂
All Software Sucks

原始链接: https://harmful.cat-v.org/software/

这篇文章认为,软件质量取决于简洁、删减和可靠性,而非功能扩张。Hoare、Thompson 等人的话警告说:复杂性会掩盖缺陷,大多数代码都很差,而扔掉代码也可能富有成效。Hoare 说,可靠性无法用金钱买到;它需要“极致的简洁”。作者还批评业界不断重蹈覆辙,未能从成功中汲取经验。 主要清单将“有害的”技术与更简单、更精简的替代方案对照,推崇纯文本、C/Go/Limbo、CSP 并发、rc/awk、经典正则表达式、tmux、man 手册页、轻量级编译器和 libc 变体、可移植的 Makefile、文本界面、ed/Acme/Sam、UTF-8、Factotum、IRC/STOMP、SMAP、简单的基于文件的存储、Git/Mercurial、OpenBSD、极简 Web 服务器、PostScript/DjVu 以及宽松许可协议。理由大多没有给出;贯穿其中的提示是:复杂性就是敌人。文章最后援引“Worse is Better”和 JWZ 定律,即软件会不断膨胀,直到它能读取邮件,并总结道:大多数功能无用或有害。

Hacker News 上的一个讨论帖讨论了 cat-v.org 的文章《All Software Sucks》,该文批评许多主流工具和做法臃肿或有害。评论者意见不一:有人认为这种批评有道理,尤其是反对动态链接的观点;另一些人则认为它把简单等同于质量,并且带有怀旧倾向——很少有人真的会宁愿用 ed 而不是 vim、Emacs 或 nano。还有人提到,文章列出的“有害”技术范围很广,包括 bash、coreutils、GTK、Qt、SQL、GPL 和 BSD,并批评其绝对化语气不切实际:现实世界中的软件涉及妥协与协作。另一些人指出其中使用非 HTTPS 链接的讽刺之处,并开玩笑说,如果所有软件都很糟糕,那么人也一样糟。
相关文章

原文

“And folks, let’s be honest. Sturgeon was an optimist. Way more than 90% of code is crap.” – Al viro

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture

“One of my most productive days was throwing away 1000 lines of code.” – Ken Thompson

“..At first I hoped that such a technically unsound project would collapse but I soon realized it was doomed to success. Almost anything in software can be implemented, sold, and even used given enough determination. There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars. But there is one quality that cannot be purchased in this way -and that is reliability. The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay.” – C.A.R. Hoare

“It’s a curious thing about our industry: not only do we not learn from our mistakes, we also don’t learn from our successes.” – Keith Braithwaite

This is a work in progress, much is missing.

Harmful thingsLess harmful alternatives SGML, XML, YAML.JSON, CSV, ndb(6), plain(UTF-8) text. NFS, SMB, AFS, WebDAV.9p. C++, Java, Vala, D, Python, Ruby.C, Go, Limbo. pthreads (PoSix threads).CSP-style concurrency: Go, libthread, libtask, Limbo, Erlang, ... Perl, Ruby.rc, awk. PCREStructural Regular Expressions or plain classic/extended regexps (as used in awk, sed, grep, etc.). Bash, tcsh, zsh.rc, OpenBSD's pdksh, ash/dash. GNU Coreutils.Plan 9 from User Space. GNU Screen.tmux. GNU info.Man pages. GCC.8c, tcc. glibc.musl, ucLibc, DietLibc. GNU autoconf/automake, CMake, imake, scons, waf.mk, or plain old portable makefiles. Glib.libc (see above), p9p's C libraries. GTK, Qt, VxWindows.Tk, textual interfaces. Vim, Emacs, nano, Eclipse, ...Acme, Sam, ed. UTF-16, UTF-32, Latin-1, other encodings.UTF-8.. iSCSI, FCoE.AoE (ATA over Ethernet). PAM (Pluggable Authentication Modules).Factotum. Jabber and XMPP.IRC (for IM), STOMP (for general distributed messaging). IMAP.SMAP(Simple Mail Access Protocol). SQL databases.Tutorial D, pq, BigTable, plain old hierarchical filesystems. Subversion, aka svn.Git, Mercurial (aka hg); hell, even CVS or plain old tarballs would be better than svn. FreeBSD, NetBSD, Solaris.OpenBSD. Apache, lighttpd.thttpd, OpenBSD's fork of apache 1.3, nginx, or best of all: don't use HTTP. SVGPS(PostScript) PDFPS(PostScript), DjVu. EPUBDjVu. ALSAOSS4 GPL, LGPL, Apache Software License, MPL, CC.ISC, MIT/X, BSD, CC0, public domain. headsed 11q

Note: At the moment a detailed rationale is not provided for most of this, so figuring out why some things are considered more or less harmful than others is left as an exercise for the reader. Here is a hint: complexity is the bane of all software, simplicity is the most important quality. See also: Worse is Better by Richard Gabriel.

JWZ’s Law of Software Envelopment: “Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.”

Most so called ‘features’ are either useless or worse than useless.

联系我们 contact @ memedata.com