TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Recursive Book of Recursion

79 点作者 auraham4 个月前

11 条评论

Willingham4 个月前
- “To understand recursion, you must first understand recursion.” During the months I’ve spent writing this book, I can assure you that this joke gets funnier the more you hear it.<p>I love to read books like this rather than the AI generated slush that seems to be so abundant today. This author has done a great job here. Although I have to say, it is sad that I feel like I have to ‘audit’ everything to see if it’s written by a robot before I invest too much time in it &#x2F;:
评论 #42593248 未加载
deveesh_shetty4 个月前
I remember reading &quot;Automate boring stuffs with Python&quot; it helped me a lot while I was in my early college years.<p>I glanced through the initial chapter of this book, and it is so well written even for any newbie to understand.<p>Personally I have had pretty hard time understanding recursion and all the intricacies of it, and still sometimes can&#x27;t wrap my head around it.<p>Would love to read this book, I have filled the fotm for a review to read the free ebook, hopefully i receive a copy!
fire_lake4 个月前
I don’t understand this book.<p>It begins by explaining how great recursion is.<p>Then later it explains why you shouldn’t use it for large inputs in the two chosen languages (JavaScript and Python) to avoid blowing up the stack.<p>Then it argues that tail call optimisation is bad!<p>So when is a good time to use recursion?!?<p>And what is the purpose of the book?
评论 #42595354 未加载
评论 #42594790 未加载
voxl4 个月前
Claiming recursion is taught badly and then trying to teach recursion immediately via call stacks is certainly a choice. The guts of how your favorite compiler implements recursion is hardly what I would call &quot;the correct way&quot; to teach the concept.<p>It&#x27;s not shocking that students snooze their way through discrete math, try their hardest to forget induction proofs, and the arrive in algorithms or some other higher level class and try their hardest to forget recursion&#x2F;dynamic programming.<p>The reality is the concepts are hard and demand practice to obtain familiarity. There is no quick path to mathematical maturity. If you try your hardest to phone in induction then surprise surprise recursion is nonsensical to you.
评论 #42594413 未加载
评论 #42595049 未加载
ccapndave4 个月前
Enjoying this so far! One initial comment is that I&#x27;m not sure the JS examples should all be embedded in an HTML page; why not code them to be run in node which means you can scrap the `script` tags and use `console.log` which is shorter removes the need for including line breaks.
评论 #42598479 未加载
analog314 个月前
I first learned about recursion in math class, through the theory of induction. Unfortunately, I fear that induction will disappear from the math curriculum if it&#x27;s not seen as a problem solving technique.
评论 #42601032 未加载
dugmartin4 个月前
I think I’ve posted this here before but the best short explanation of recursion I’ve ever heard was from my programming languages professor 35 years ago when we were testing out algorithms in a toy Lisp we had to write at the start of the course. All non-infinite recursive algorithms should have a “base case and a smaller caller”, meaning there needs to be a terminal state and the algorithm should narrow its scope on each recursive call. I still use that to this day when I happen to need to write a recursive algorithm.
评论 #42595595 未加载
评论 #42595480 未加载
评论 #42596736 未加载
评论 #42595348 未加载
评论 #42596292 未加载
bko4 个月前
As an aside, why is buying from the publisher (the preferred method) almost always more expensive? In this case it&#x27;s $40 vs $30.<p>Why list it on Amazon for less? Shouldn&#x27;t the direct from publisher be lower since they don&#x27;t have to pay Amazon? Plus Amazon throws in free one day shipping.<p>What&#x27;s the economics behind this?
tpoacher4 个月前
Page 1: For more details, refer to page 1.
treebeard9014 个月前
&quot;It is exactly of the same nature as the Hindu&#x27;s view, that the world rested upon an elephant and the elephant rested upon a tortoise; and when they said, &#x27;How about the tortoise?&#x27; the Indian said, &#x27;Suppose we change the subject.&#x27; &quot;
retarga4 个月前
Yet another Python marketeer. I suggest Lisp or SML to understand recursion.<p>The author was vocal on Reddit defending the suspension of Tim Peters. I&#x27;m not sure if he ever has contributed anything substantial to Python itself. Implicitly defending slander and ostracism is vile, so avoid this one.