编程与软件工程blogs.uw.edu编辑精选
John Carmack 谈软件工程的艺术与科学
John Carmack discusses the art and science of software engineering
2012 — 2015,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 John Carmack(游戏引擎与编程领域的传奇人物)在一次访谈/演讲中讨论软件工程的'艺术与科学':他谈到编程本质上是程序员之间的社会互动、NASA 式流程能换来极低缺陷率但生产力极低、以及他希望用更严格的语言子集来约束程序员,因为人总会犯错。文章记录了他多年一线编码经验的诸多洞见。
为什么经久不衰:Carmack 以顶级实战经验谈软件工程本质,观点在多年后(如 Rust 的兴起)仍被验证,值得反复回味。
HN 评论精选
不同业务领域需要不同的工程方法,低缺陷流程代价高昂,并非普适。
NASA 式开发流程能实现极低的缺陷率,但生产力也极低。我们团队使用 PSP/TSP 流程,能把缺陷率控制在每千行代码不到一个 bug,但代价是每天产出很少。大多数企业更在乎产品可用而非完美,尤其在可以每天多次发布的 Web 领域。整个行业需要记住:不同业务领域需要截然不同的软件工程方法。
HeyLaughingBoy查看英文原文
With the NASA style development process, they can deliver very very low bug rates, but it’s at a very very low productivity rate I wonder how many non-developers understand this. I, along with the rest of my team, am trained in PSP (http://www.sei.cmu.edu/library/abstracts/reports/00tr022.cfm) and TSP (http://www.sei.cmu.edu/tsp/) and we use it in our day-to-day development. It definitely helps us keep our defect rate below one bug/kLOC but it's an expensive process that results in very low LOC/day productivity. If very low shipped bug counts are very important to your organization, great. But most businesses these days seem to care more about having a usable product than they do a perfect (or close to it) product. Especially if it's on the Web where you can do multiple releases per day. As an industry, we really need to bear in mind that different business domains need radically different approaches to software engineering.
Carmack 的智力与二十年如一日的编码投入相结合,世上罕有。
和 Carmack 交谈让人感到他的智力高出自己整整两个标准差,令人清醒和谦卑。他每个工作日写 8 小时以上代码,坚持了 20 年,经验水平几乎无人能及,而且大多数成功的技术人最终都转去做管理了。他还能对航天工程、NASA 历史、清洁能源等众多话题侃侃而谈,而且很有幽默感。
adastra查看英文原文
I've gotten to know John a little bit, and I have to say it's a strange feeling to have a conversation with a person of his off-the-charts intelligence. I consider myself to be pretty smart-- was known as "the math whiz" in high school, went to top engineering universities and did very well there, have a couple of (minor) entrepreneurial accomplishments, etc. And yet talking to Carmack I feel like I'm talking to someone who is a full two standard deviations beyond me in raw intelligence horsepower. It's a pretty sobering and humbling experience. Part of it is that he really does spend 8+ hours per day coding, every weekday, and has done so for 20 years. You'd think his experience level there is about as high as you can get, so it's always cool to hear him talk about the new things he's still learning at his work. I have to wonder if there's anyone else in the world that has both his raw ability and all those man-years of programming experience. It seems like most successful technical people end up doing management and business. There's a couple of things people probably don't know about Carmack. For one, he can talk intelligently on a lot of different topics. A lot of nitty-gritty aerospace engineering, as well as the history of the space program and NASA for example. He's also up to speed on the latest across a wide range of technology, including things like cleantech. Second, he has a pretty good sense of humor and can be quite funny. Which is surprising I think just because he spends so little time (effectively zero) out being traditionally social, which you'd think would be necessary to getting good at making people laugh. But in conversation he has a pretty sense of comedy and timing. An example from his twitter feed that I clipped a while back: https://twitter.com/ID_AA_Carmack/status/167739644853747712 "Adding film grain, chromatic aberration, and rendering at 24 hz for film look is like putting horse shit in a car for the buggy experience."
Carmack 低估了形式化工具的价值,软件本质上是科学和数学活动。
他关于软件工程社会性的观点是对的,但他低估了工具的价值。他提到 Monad、Lambda 演算后随即否定其作用,这错过了重点:Haskell 乃至 Agda 等语言的尝试是在提炼问题的真正语义,这不仅让代码更清晰,也有助于沟通。我确实相信软件是一门科学(和数学)活动,只是行业大多不这样对待它。
nightski查看英文原文
He is definitely right about the social aspect of software engineering. But I think he sells a lot of the tools short. For example, he brings up things like Monads, Lambda Calculus, and whatnot - but then immediately dismisses them as not affecting what one truly does. But I think this really misses the point. In our industry it is really easy to disguise oneself as a professional (or even just someone who knows what they are doing), without really knowing much of anything. Meaning, our focus as an industry has been on making the simple things as simple as possible (i.e. scripting/dynamic languages, code generation, frameworks). But what I see happening in the Haskell space for example (and even further in languages such as Agda) are attempts to distill things down to their elements. To find the true semantics behind a problem. This not only helps by producing cleaner and more readable code, but it also helps with communication. I really do believe software is a scientific (and mathematical) exercise. The problem is most of industry does not treat it as such, and hence we end up in the mess we are in.
Carmack 关于用语言约束减少错误的观点,后来被 Rust 印证。
'我希望能够启用更严格的语言子集,进一步约束程序员,因为我们 constantly 犯错。'——这看起来正是 Rust 的发展方向。
vvanders查看英文原文
"I would like to be able to enable even more restrictive subsets of languages and restrict programmers even more because we make mistakes constantly." This seems to be very much the direction Rust is going in.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选