TLDR: Visualizing Recursion in Python with Just a Decorator
Date: 2020-12-13 Source: https://arpitbhayani.me/blogs/recursion-visualizer-python
Overview
Visualize recursion in Python! Learn to build a simple recursion tree visualizer using decorators and the recviz package. One programming paradigm, that is hardest to visualize, as almost every single programmer out there will agree on, is Recursion).
Key Points
- One programming paradigm, that is hardest to visualize, as almost every single programmer out there will agree on, is Recursion).
- Publishing it on PyPI: Everything mentioned above is published in a Python Package and hosted on PyPI at pypi/recviz.
- We usually use pen and paper to visualize the flow and check how recursion is behaving.
- But what if, this could be done programmatically, and today we address this very problem and try to come up with a simple yet effective solution.
- This essay is going to be a little different from the usuals; instead of taking a look into a research paper or an algorithm, we will implement a simple and easy recursion visualizer for Python.