那就推荐一本消遣书吧

上学最宝贵的收获之一是结交学识过人的朋友。自己闷头学得山穷水尽时,高手轻轻一句点拨,眼前便峰回路转,柳暗花明。每次上完课,有幸和朋友小聚,请教弱智问题, 听朋友妙语解惑,实在是难得的人生乐事。读 The Little Schemer,也有同样的感受。读The Little Schemer的过程,就是被良师引导的过程。
 
用作者的话说,The Little Schemer是一本教人理解计算本质的书。编程语言Scheme不过是传道的载体。书的体例独特。每页分成两列。每列寥寥几行代码,数段散句。左边一列问个问题。右边一列给出答案。作者就用这种轻松对话的形式讲解递归和函数编程。例如下面的截图。
 
 
这本书最吸引我的地方是它讲解的方式:书里仿佛没有什么难点,也没有长篇讨论。每章都是逐层推进的问题和相应的解答。比如翻看书第一页,就是“ atom是不是atom?”。我差点以为买了本缺页的书,下意识的向前翻了一下,看是不是漏掉了开头。 J 在这些精心设计的例子启发下,我们自然地总结出编程的概念和方法。一切水到渠成。和朋友讨论做报告的技巧时,我们的口头禅是“Don't tell. Show.”这本书是绝佳范例。这其实是非常高效的训练,对初学者尤其有用。从现象里归纳出共性、由实践中抽象出模式,在表象下看到本质是解决问题的重要技巧。编程语言也好,公式也好,不过是表达我们思路的手段。何况很多强有力的编程技巧也是前人从无数代码里提炼而来。还有什么比自己体验提炼过程更让人印象深刻的学习手段呢?书不厚。180来页。10章。每章读时都觉得简单,甚至有点琐碎。但书的进度其实毫不含糊。第8章已经引导我们领悟Continuation Passing Style的奥秘。第九章解释了Y-组合子的前世今生,而第十章干脆实现了一个Scheme的解释器。单是第8章就值回书价(本来也不贵。如果连续集The Seasoned Schemer和The Reasoned Schemer一起买,还有折扣)。想象一下,一个对Scheme编程甚至对编程一无所知的新手读完这章后,突然发现CPS函数上挂着的那一大坨累赘事物(黑话所谓的continuation)变得清晰晓畅,已经融入自己的灵魂,是何等爽快的体验。
 
 
我对书唯一不满的地方是它全用各种食物做数据。鱼子酱,沙门鱼,曲奇什么的满篇都是。个人觉得和家谱树一样无趣。对了,作者没有写任何可以激励读者的内容,比如为什么CPS有用。这也许会打击一部分老大的积极性。
 
喜欢The Little Schemer的老大们,多半也会喜欢续集The Seasoned Schemer。用序言的话说,The Little Schemer展示了列表是Lisp编程的心脏,而The Seasoned Schemer展示了函数是Lisp编程的灵魂。
 
The Reasoned Schemer (MIT Press) (The MIT Press) By 作者: Daniel P Friedman – William E Byrd – Oleg Kiselyov – Jason Hemann ISBN-10 书号: 0262535513 ISBN-13 书号: 9780262535519 Edition 版本: second edition 出版日期: 2018-03-09 pages 页数: (206) A new edition of a book, written in a humorous question-and-answer style, that shows how to implement and use an elegant little programming language for logic programming. The goal of this book is to show the beauty and elegance of relational programming, which captures the essence of logic programming. The book shows how to implement a relational programming language in Scheme, or in any other functional language, and demonstrates the remarkable flexibility of the resulting relational programs. As in the first edition, the pedagogical method is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity with a functional language or with the first five chapters of The Little Schemer is assumed. For this second edition, the authors have greatly simplified the programming language used in the book, as well as the implementation of the language. In addition to revising the text extensively, and simplifying and revising the “Laws” and “Commandments,” they have added explicit “Translation” rules to ease translation of Scheme functions into relations. Copyright Contents Foreword Preface Acknowledgements Since the First Edition 1.Playthings 2.Teaching 01d Toys New Tricks 3.Seeing 01d Friends in New Ways 4.Double Your Fun 5.Members Ornly 6.The Fun Never Ends… 7.A Bit Too Much 8.Just a Bit More 9.Thin Ice 10.Under the Hood A.Connecting the Wires B.Welcome to the Club Afterword Index
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值