Data For Science

The Recursive Book of Recursion

by Al Sweigart

Reviewed in Data Science Briefing #196,

This week’s Data Science Book is " The Recursive Book of Recursion " by Al Sweigart, a highly recommended book for programmers of all levels. The book explains recursion in a clear and approachable way. It begins by laying important groundwork and explains functions and their operation and features. The author spends significant time explaining the call stack, what it does, how it is structured, and how it operates, leading to a discussion of ‘stack overflow,’ one of the risks of using recursion. He then devotes an entire chapter to comparing recursion and iteration, demonstrating that in the vast majority of cases, recursive functions are not necessary and in some cases perform worse than their iterative counterparts.

However, the book also shows where recursion is actually a good idea and where it is a good fit. Sweigart explores traversing tree structures and demonstrates how memoization can improve the efficiency of some recursive functions. The book ends with several projects that build on the concepts that come before, including the Droste Effect, a recursive art technique that generates a similar recursive image from any photograph or drawing utilizing images.

Overall, the Recursive Book of Recursion is a great read for beginners and intermediate programmers alike. The book teaches about recursion and stretches the reader to think differently while confidently showing that seemingly lofty concepts are within reach.

Read another review

All 72 book recommendations

​

Subscribe to get our latest content by email.
    We won't send you spam. Unsubscribe at any time.