编程语言与软件工程2017people.csail.mit.edu
用编程语言概念教授通用思维技能 (2008)
Using Programming Language Concepts to Teach General Thinking Skills (2008)
入门 · 约 30 分钟读完前置知识:基础编程经验、编程语言基本概念、论证阅读能力
导读
这篇 2008 年的论文主张,编程语言的概念(如抽象、精确性、清晰性、多视角)可以作为教授通用思维技能的手段,并论证编程在这方面的训练价值。从标题和讨论看,它更像是一篇论点/教学立场文章,而非实证研究——评论者正好抓住其缺少数据这一点。
HN 关注点:编程是否真能训练通用思维,还是只是恰好有用且高薪的技能——讨论焦点在论证缺乏实证支撑。
HN 评论精选
这几条评论里:质疑 2 补充 1 亲历 1
质疑质疑'编程是最好的思维训练'这一主张缺乏实证,且编程的独特价值在于其就业实用性。
我认为编程确实是教授视角、清晰、精确和抽象等通用思维技能的好方法,但我怀疑它是最好的方法(§2.1)。论视角:学多门编程语言比学多门外语更能让人意识到不同视角吗?论抽象:编程语言比数学更能培养概念抽象吗?论精确与清晰:编程比学哲学和逻辑更能培养精确与清晰吗?这些都是实证问题,而文中没有提供任何实证数据。既然论证缺少支撑,反而暗示编程也许并不是学清晰与精确的最佳途径。我认为编程真正突出之处在于它教的是当下需求很高的技能——编程本身。
davekinkead查看英文原文
While I think programming can be a good way to teach general thinking skills like perspective, clarity, precision, and abstraction, I'm dubious about the claim that it is the best way to do so (§2.1). Perspective - does learning multiple programming languages engender more awareness of different perspectives than say, learning multiple foreign natural languages? Abstraction - does learning programming languages develop better use of conceptual abstraction than say, mathematics? Precision and clarity - does learning programming languages develop better precision and clarity than studying philosophy and logic? These are all empirical questions and no empiric data is provided. The lack of support in the argument for the conclusion given also hints that maybe learning programming isn't _the best_ way to learn clarity & precision after all. Where I thinking learning to program stands out as superior is that it teaches a skill that is currently in high demand - programming.
质疑因果可能相反:思维能力是学编程的前提,而非编程的产物。
我不太确定。我觉得通用思维技能反而是理解编程的前提。我见过很多人拼命想学编程,但无论多努力都惨败。
hasenj查看英文原文
I don't know. I think general thinking skills are a pre requisite to understanding programming. I've seen many people try hard to learn programming but fail miserably no matter how much they try.
亲历跨语言迁移的经验来自'编程行为本身',而非某门具体语言。
我是荷兰人,在荷兰某类高中里拉丁语和希腊语是必修的。学拉丁语及其语法框架,对我后来提高德语、意大利语、法语和葡萄牙语帮助很大(我喜欢语言)。但前提是母语要先扎实。看看 LearnXinY,大多数编程语言之间有大量语义上的相似之处。我从 1996 年起做 Web 应用(Perl → ColdFusion → PHP,如今主要是 Ruby/Rails),直觉上让我思维更清晰的与其说是某门语言,不如说是编程这个行为本身。
naskwo查看英文原文
I'm Dutch, and in the Netherlands, for a certain level of high school, Latin and Greek are required. Learning Latin, and its framework (grammar) has been very helpful to me in improving my German, Italian, French and Portuguese (I like languages). However: it's important to have a solid grasp on one (mother tongue) language. If you look at LearnXinY, you can see a lot of semantic parallels between most programming languages. I've been developing web apps since 1996 (Perl > ColdFusion > PHP and mainly Ruby/Rails these days) and found that, intuitively, it's not so much the programming language itself, but rather the act of programming itself that helps me think more clearly.
补充编程训练的是辨别好坏抽象与识别'泄漏抽象'的能力,可迁移到现实判断。
编程让你学到区分好抽象与坏抽象的实用方法。好抽象应让问题更易推理、让你更高效;坏抽象会让问题复杂化甚至无法解决,因为它强加的假设限制了思路。区分可用与不可用抽象的能力在现实生活中很有用。比如辨别宗教与邪教,不是去研读圣经或圣典,而是看这套抽象信念体系迄今运作得如何,例如它成功养育了多少代人、取得多少进步。你还会学到几乎每种编程抽象都有一定程度的泄漏,你很可能会遇到边界情况,需要调整抽象或退回更底层的方案。用宗教类比,固守地球只有 6000 年的教条,就没法推理进化论这类问题。
jarek-foksa查看英文原文
When programming you learn practical ways to distinguish between good and bad abstractions. A good abstraction should make it easier to reason about given problem and make you more efficient. A bad abstraction complicates the problem or even makes it impossible to solve because of the assumptions imposed by the abstract system. The skill to tell apart working vs non-working abstraction is useful in real life. For example to distinguish a religion from a cult, you don't study the bible or some other holy book, instead you look how that abstract believe system has been working so far, e.g. by checking how many generations have been successfully raised with it and how much progress they made. You also learn that almost every programming abstraction is leaky to some extent. You are very likely going to run into edge cases where the abstraction needs to be adjusted or replaced with a lower level one in order to get things done. Again, using the religion analogy, sticking to the dogma that the Earth is 6000 years old is going to make it impossible to reason about e.g. the theory of evolution.
历次讨论
- 2017Hacker News 讨论帖208 分 · 30 评
同领域还值得读
Google 的软件工程(2017)
Software Engineering at Google (2017)
介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…
编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选Peter Naur:编程作为理论构建 (1985)
Peter Naur – Programming as Theory Building (1985)
Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…
编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选SciPy 1.0:Python 科学计算的基础算法
SciPy 1.0: fundamental algorithms for scientific computing in Python
这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…
编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选Lisp 的历史(1979)
History of Lisp (1979)
这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…
编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选使用 NumPy 进行数组编程
Array Programming with NumPy
这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。
编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选