编程与软件工程xuanji.appspot.com编辑精选
交互式 SICP
Show HN: Interactive SICP
2012 — 2014,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是作者把《计算机程序的构造和抽象》(SICP) 原书内容做成网页交互版的 Show HN 项目:书中的 Scheme 代码片段可以点击编辑并在浏览器内直接求值(基于 biwascheme 解释器 + CodeMirror 编辑器),还配有自动判分的编程练习和选择题。2012 年首次发布时只完成了第一节,2014 年再次提交时已扩展到更多小节,并改进了求值引擎(异步求值、MathJax 公式、代码块依赖管理)。
为什么经久不衰:它把一本经典教材从"读"变成了"动手跑",让 SICP 的抽象概念可以当场验证;同时作者持续多年的迭代和关于教学法的讨论,使它成为编程教育工具化的一次有代表性的尝试。
HN 评论精选
作者自述:可点击编辑并即时求值的代码块、自动判分练习,纯客户端实现,目前只完成第一节。
大家好,我是作者。这是我第一次在 HN 发 Show HN。大部分人应该都知道 SICP 是什么。我上过一门用它当教材的课(可惜只讲了前三章),非常喜欢。大部分高亮代码片段都可以点击编辑,改完后点别处或按 ctrl-enter 重新求值这段 Scheme 代码。还有一些需要写代码的自动判分练习,以及一些选择题(灵感来自 Coursera)。目前只上线了第一节。我不觉得自己能独立把整本 SICP 转成这种形式,欢迎任何人帮忙。我尽量把 API 做得精简,同时仍能执行任意代码(用于自动判分)。主要代码在 isicp/coding.js,内容存放在各章的 html 文件里,全部是客户端 JavaScript 实现。Scheme 解释器用的是 biwascheme,编辑器用 codemirror。
zodiac查看英文原文
Hello everyone, OP here. This is my first Show HN post. I guess most of you should know what SICP is. I took a class where it was used as a textbook (only the first 3 chapters, unfortunately) and loved it. Most of the syntax-highlighted code fragments can be clicked on and edited. Either click somewhere else after that or press ctrl-enter to re-evaluate the scheme code. There are also some auto-graded exercises which involve writing code, as well as some multiple-choice questions (inspired by coursera) So far only the first section is up. I don't think I can finish converting the whole of SICP to this format, so any help is much appreciated! I've tried to make the API as short as I can, but still able to run arbitrary code (eg for auto-graders). The main code is in isicp/coding.js and the content is stored in chapter-specific html files. All this is done via client-side javascript. I used biwascheme for the scheme interpreter and codemirror for the editor.
对教学顺序的批评:SICP 偏难,应先教更基础的概念并做交互可视化,再过渡到 SICP。
SICP 是一本进阶教材,拿它教零基础的人学编程大概是个错误。Brian Harvey 做了很好的工作,把它简化得更适合大一新生,我认为他的 CS61A 是最好的入门课(不过我不觉得那个 sentence ADT 是好主意,反而让内容更乱而不是更清楚)。HtDP2 的路线也很出色,但问题是它带有 Racket 推广色彩(第一章里 dr.racket 这个词出现上百次)。用图形原语让程序的改动可见这个想法很棒,但也很有争议——出现得太早了(不过它确实能推动进度、让进展可见)。我认为应该先教多参数函数、一等公民(值有类型、一切都是指针)、pair、list,然后是泛型函数和环境,并像那个 Python 工具一样做交互式可视化。之后可以讲 HtDP 的部分内容,再讲 SICP。真正享受这个入门过程的人,自己会把整本书读完的。
dschiptsov查看英文原文
SICP is an advanced text, and using it to teach amateurs how to program is, probably, a mistake. Brian Harvey have done a great job to simplify and make it more freshman-friendly. I think his CS61A is the best intro course available (but I don't think that the sentence ADT is a such great idea, and it make things little messier, not more clear). The HtDP2 approach is also remarkable, but problem is it is part of Racket promotion (word dr.racket is used hundred times in the first chapter). The idea to make changes in a program visible, via using graphical primitive functions is brilliant, but controversial one - it is too soon (but it kicks and makes a progress visible) I think that functions with multiple arguments, first-class "citizens" (values has a type, everything is a pointer), pairs, lists, then generic functions and environments must be taught first, and visualized interactively, similar to that python tool. Then, after, you can teach parts from HtDP and then SICP. People who really enjoyed this initiation will go through whole books themselves.)
2014 年更新:内容与引擎都有改进,但因时间不足未完成全书,考虑众筹。
大家好,我是作者。抱歉忘了给 appengine 开计费,页面现在应该能正常显示了。去年我在 HN 分享过 Interactive SICP,觉得是时候再发一次。这段时间我:增加了书中更多小节、替换了 JavaScript 版 Scheme 引擎、加入了 MathJax、把求值改成异步(避免长时间计算卡住界面)、改进了代码块之间的依赖管理、把交互库独立出来(很快会发布)。没能做到的是把整本书都做成可交互的,因为时间不够。我在考虑用 Indiegogo 众筹,让我和合著者能全职把这本书做完。大家觉得怎么样?
zodiac查看英文原文
Hello everyone, author here. Sorry for forgetting to enable billing on appengine - the page should be displaying now. I shared Interactive SICP with HN last year (https://news.ycombinator.com/item?id=4860370), and thought it was time to share it again. Since that time, I've - added more sections of the book - replaced the javascript scheme engine - added mathjax - made the evaluation asynchronous (to avoid freezing the UI during long computations) - improved dependency management between blocks of code - separated out the interactive library - I should be releasing it soon! What I haven't been able to do is to make the entire book interactive due to a lack of time. I was thinking of using indiegogo to pay myself and my co-author so that we can finish the book. What do you guys think?
仅有内嵌解释器不等于更好学,建议参考 Bret Victor 关于可学习编程环境的理念。
不知道你熟不熟悉 Bret Victor 对 Khan Academy 实时编程环境的那篇详细批评(worrydream.com/LearnableProgramming/)。这个项目看起来能从中获益不少。内嵌的交互式 Scheme 解释器确实让 SICP 的例子更容易跟着做、跟着玩,但仅凭这一点并不会让内容本身更易懂、更好学。一个真正应用了 Victor 文中"可学习性"与"可理解性"原则的"SICP 学习环境",对今天的学习者会非常有价值。这当然是很大的工作量,但对项目来说会是一条有意思的路。
mgunes查看英文原文
I wonder if you are familiar with Bret Victor's elaborate criticism of Khan Academy's live coding environment. This effort looks like it could really benefit from its insights. http://worrydream.com/LearnableProgramming/ While an inline interactive Scheme interpreter does make the SICP examples easier to follow and play with, it doesn't by itself make the content more understandable and learnable. A "learning environment for SICP", with the principles of learnability and understandability in Victor's article applied, would be very beneficial for present day learners. It surely is a lot of work, but would be an interesting route for your project to take.
历次讨论
同类还值得读
开源应用架构
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编辑精选