编程与软件工程worrydream.com编辑精选
可学习的编程
Bret Victor: Learnable Programming
2012 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Bret Victor 的长文《Learnable Programming》讨论编程环境与教学应如何设计:让学习者能看见程序状态、即时获得反馈,并通过直接操作来理解程序,而不是靠死记抽象规则。文章以对 Khan Academy 编程教学的批评为引子,给出大量交互式示例和改进思路。
为什么经久不衰:它把“如何教编程、如何设计编程工具”提升到系统层面,十多年后仍是交互式编程环境与编程教育讨论的经典参照。
HN 评论精选
程序员本来就在通过写代码和观察结果迭代,只是文章主张的交互粒度更细;这对教学有价值。
我认为这并不描述大多数程序员的真实工作。我们通常就是写代码、查看结果、再思考、再写代码,直到问题解决。我很少一开始就完全理解问题,而是通过动手写和看结果来聚焦问题。我们已经这么做,只是粒度不同;对初学者来说这个差异重要,但总体上是很好的教学文章。
scott_s查看英文原文
Programmers, by contrast, have traditionally worked in their heads, first imagining the details of a program, then laboriously coding them. I don't think this describes most real work done by programmers. Rather, what he says we should do, To enable the programmer to achieve increasingly complex feats of creativity, the environment must get the programmer out of her head, by providing an external imagination where the programmer can always be reacting to a work-in-progress. Is exactly what most programmers already do. We usually don't have a nice, interactive environment to do so; it's usually a combination of coding, inspecting results, thinking some more about new issues, coding, inspecting results, on up until the problem is solved. In other words, I think that programmers do tend to solve problems by "pushing paint around." I rarely start with a full appreciation of the problem. But in order to gain that understanding, I have to start trying to solve it, which means starting to write some code, and usually looking at results. As I go through this process, the domain of the problem comes into focus, and I understand better how to solve it. We already do what Bret is talking about, but not at the granularity he is talking about it. For beginners, I can understand why this difference is important. But I certainly solve problems by pushing paint around. In general, I think this is a fantastic piece for teaching programming, but I don't think (so far) that all of it carries over to experienced programmers. The examples of having an autocomplete interface that immediately shows icons of the pictures they can draw is great for people just learning. But that's too fine-grained for experienced programmers. Chess masters don't need to be shown the legal moves on a board for a bishop; their understanding of the problem is so innate at that point that they no longer play the game in such elementary terms. Similarly, experienced programmers develop an intuition for what is possible in their programming environment, and will solve problems at a higher level than "I need to draw something." That is the reason we put up with existing programming environments.
赞赏文章以详尽示例和建设性思路示范了高质量批评,并能影响编程工具与 API 设计。
哇,精彩的批评。首先他没有只说 Khan Academy 没抓住重点,而是用完整示例详细说明如何做得更好。其次他深入讨论如何思考,不只是解决方案。第三他把批评的标准提得非常高;以后我批评别人会觉得有责任给出清晰示例和理由。第四即使我不做编程学习软件,也会受这篇文章影响 API 和系统设计。
greggman查看英文原文
Wow! What an awesome critique. I'm in awe. First off, rather than just saying Khan Academy missed the point, Mr. Victor goes over in extreme detail with full examples with ideas on how to do it better. Second, he really went into some detail about how to think about things. Not just the solutions but ideas and ways of thinking to come up with better solutions. Third, he's set the bar for critiques higher than I've ever seen. Next time I want to critique something I'm going to feel at least some responsibility to give good and clear examples of both what I think is wrong and what I think would be better with reasons. Fourth, even if I never write software to help learning programming or help programming advance in general I'll certainly be influenced in my API and system designs by this post. Thank you Mr. Victor
质疑始终可视化状态的教学假设,认为努力记忆和内化也是技能,应通过比较测试寻找混合方案。
美丽且启发,但是……有时能把“不可见状态”记在脑中本身就是需要学习的技能。比如 dual N-back 训练工作记忆;把状态都显示出来会破坏目的。类似地,费力理解材料可能是内化最佳方式;有研究表明难读字体更易记住。我希望看到对 Victor 式生动风格与其他风格进行比较测试,看哪种长期能力更好。最佳可能是混合:有时超生动交互,有时故意模糊以测试回忆和从最少线索推断模式。
gojomo查看英文原文
Beautiful and inspirational, and yet... Sometimes becoming able to hold the 'invisible state' in memory is the skill to learn. Consider the 'dual N-back' drilling which seems to improve working memory, and then also (by some studies) other testable fluid intelligence. The whole point is holding more and more hidden state in your mind. (To 'show the state' would defeat the purpose of the game.) Similarly, sometimes struggling with the material is the best way to internalize it. Consider some studies that show noisy, hard-to-read text (as on a poorly-printed copy) is better remembered by readers than clean typography. Apparently, the effort of making out messy printing also strengthens the recall. So I'd be interested in seeing comparative testing of the vivid 'Victor' style, and other styles that are more flawed in his analysis, to see which results in the most competence at various followup dates. We might see that the best approach is some mix: sometimes super-vivid interactivity, for initial explanation or helping students over certain humps, but other times intentionally-obscurantist presentations, to test/emphasize recall and the ability to intuit/impute patterns from minimal (rather than maximal) clues.
从更好 API、数据抽象和非程序员工具切入,认为需要在编程与 GUI 之间寻找更好的抽象层。
我喜欢 Bret Victor 的文章和演讲,它们真的很启发人,包括这一篇。第一个例子我立刻想到更好的 API,比如 fill(color(r,g,b)),无聊但有效,也教数据抽象。其次,能赋权非全职程序员编程的工具不够;编程素养应更普及,是思维方式。Excel 高度民主化编程,设计师有 Excel 经验通常更容易理解基础;但 Excel 也糟糕,把关系藏在单元格后,文章也批评。我们需要在主流编程和主流 GUI 之间找有用的抽象层,要更有趣并借鉴历史和科学。
dgb23查看英文原文
I love Bret Victor's essays and talks, they are truly inspiring, including this one. It's too a comprehensive and far reaching essay for me to comment on in general, but I have a few random thoughts to share: Right at the first example what immediately came to mind is simply having a better API. It's a boring but effective solution to say fill(color(r,g,b)). It also teaches data abstraction which is a common and powerful concept in programming (and I think it was introduced in an early chapter in SICP as well). Secondly I think there are not enough good tools that empower non-programmers (not full-time) to program. Programming literacy (to some degree) should be more widespread and I agree with the notion that it is a way of thinking rather than just mechanical. For example Excel is a tool that has managed to democratize programming to a high degree. When I teach designers to code websites, there are some who have had some experience with Excel, and they typically have less of a problem to understand some of the programming basics. On the other hand Excel is also terrible, because it hides relations behind cells. The broader concept of this is also criticized in this essay. In essence we need to find useful abstraction layers between what is main stream programming and main stream GUIs. I know many are actually doing that with varying degrees of success. But I think we need to be much more playful and drawing from history and science rather than thinking in terms of products (to sell) if we want to reach the stated goals.
历次讨论
同类还值得读
开源应用架构
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编辑精选