按年被提到
20152016 · 4 次2026
开源书›编程入门·No.82

Composing Programs

组合程序
John DeNero

用 Python 讲 SICP 思路的伯克利 CS 61A 教材,带代码执行可视化

免费阅读 ↗
被推荐 · 23 人首次 2015-05-09 · 最近 2025-07-25许可证 CC BY-NC-SA 4.0
23不同的人
25活跃月份
8有推荐的月份
26讨论串

Composing Programs 是 UC Berkeley CS 61A 课程的讲义,以 SICP 为蓝本,改用 Python 讲抽象、高阶函数、递归、数据结构、面向对象和解释器等主题。John DeNero 的写法比 SICP 更简洁,书中嵌入 Python Tutor,可以逐步查看代码的执行过程。每章配有课程练习,适合边读边做。和 SICP 相比,它换成更主流的语言,门槛更低,但函数式风格和语言实现的内容不如 SICP 深。

HN 为什么推荐它

HN 上的人常把它当作“用 Python 学 SICP”的替代品推荐给想学 Python 或想入门计算机科学的人,也提到嵌入式代码可视化很有教学价值;批评主要是书没有讨论递归深度限制、栈溢出等 Python 实际会遇到的问题。

难度 2 / 5约 40 小时开放许可
适合谁

想系统学编程思想的 Python 初学者,或想读 SICP 却嫌 Scheme 陌生的人

读之前最好知道
1基本编程概念

怎么读

由 Claude 根据这本书和 HN 上的说法整理,可能有错
  1. 1从第一章开始,别跳过函数和高阶函数的部分
  2. 2用书里的 Python Tutor 可视化逐步跟踪递归和环境模型
  3. 3做每章配套的练习,最好再对照 CS 61A 的课程作业
  4. 4读完想深入语言实现,再去读 SICP 对照

HN 书评

推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算
推荐abhirag · 2017-04

“I found it interesting enough to include it in my ever-growing to-read list, worth checking out.”

觉得有意思,值得一看,已列入待读清单
Why MIT Switched from Scheme to Python (2009)原评论 ↗
推荐sosilkj · 2018-01

“For Python you could start with:”

推荐它作为学 Python 的起点
Ask HN: Learning Python?原评论 ↗
推荐jpamata · 2018-05

“"The text was originally published as lecture notes for CS 61A at UC Berkeley and is based upon the Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman."”

引述简介:Berkeley CS 61A 讲义,基于 SICP
Ask HN: What is the best online course to start learning python?原评论 ↗
推荐morenoh149 · 2019-01

“I'll just mention Composing Programs a take on sicp mostly in python.”

提到它是主要用 Python 写的 SICP 变体
If not SICP, then what? Maybe HTDP?原评论 ↗
推荐sosilkj · 2019-08

“If you are focusing on Python, here are a couple other suggestions that you might find useful:”

推荐它作为受 SICP 启发、面向 Python 学习者的教材
Ask HN: Beginner Programmer: Haskell Book or SICP?原评论 ↗
推荐urthor · 2021-08

“Very well written, concise, and helps with getting a novice programmer going with Python.”

称赞它写得好、简洁,能带新手入门 Python
A Lisp interpreter written in Lisp (2017)原评论 ↗
看全部 17 条 →
推荐cashsterling · 2022-03

“Other than searching for topics to learn, I also recommend these resources to learn more about python and python for physics computation:”

推荐它作为学 Python 的资源
Ask HN: Programming (Python) course for physics prof原评论 ↗
推荐beeburrt · 2023-09

“accompanying book:”

把它作为 CS61A 课程的配套书
Ask HN: Holy grails of free, online courses?原评论 ↗
批评zelphirkalt · 2019-01

“Composing Programs does not even mention Stackoverflow errors and neither does it introduce a decorator to avoid them.”

批评它没提栈溢出错误,也没介绍用 decorator 避免
Composing Programs in Python, SICP Style原评论 ↗
批评zelphirkalt · 2021-11

“So the book is teaching an approach, that often might not be a viable good solution, simply ignoring the problems of the chosen tool.”

批评它只教一种做法,忽略了所选工具的问题
Stop Making Students Use Eclipse (2020)原评论 ↗
引用eatkinson · 2016-01

“[2]: Materials associated with 61A: Composing Programs”

把它列为 61A 课程的配套材料
Berkeley AI Materials原评论 ↗
引用sumukh1 · 2016-02

“Demo of Python Tutor being used in a computer science textbook: Composing Programs”

举它为教科书中嵌入 Python Tutor 的例子
Visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ Code Execution原评论 ↗
引用wikibob · 2017-05

“[9] John DeNero's Composing Programs Book: Composing Programs”

把 DeNero 的这本书列入参考资料
Ask HN: Ruby, Python, or JavaScript for teenager?原评论 ↗
引用sumukh1 · 2020-04

“Online tools to run & visualize code execution directly from the online textbook (ex: Composing Programs)”

举它为可在线运行并可视化代码执行的教材
Don't Make Students Use Eclipse原评论 ↗
引用TuringTest · 2023-02

“SOA uses message passing only as the synch mechanism, but sharing memory allows for other strategies with synch primitives such as semaphores or mutexes”

在讨论 SOA 消息传递与共享内存同步时引用它
All Programming Philosophies Are About State原评论 ↗
引用vector_spaces · 2024-06

“see editions and derived books in Python and JavaScript[1][2]”

列出它等 Python 和 JavaScript 的衍生版本
Why "Structure and Interpretation of Computer Programs" matters (2011)原评论 ↗
引用CalChris · 2025-07

“They don't use SICP anymore. They use John DeNero's online text, Composing Programs.”

指出课程已不再用 SICP,改用它
Why MIT switched from Scheme to Python (2009)原评论 ↗
被提交为 story · 10 次