-
Recursion and How to Get All the records from a paginated API
I was recently working with an API that limited the max number of items it let you call at once. This was frustrating, because I needed everything. The solution, thankfully was recursion. Recursion is really fun when you get to use it. I needed to use this solution in both JavaScript and Python, so I…
-
How We Solve Problems: Recursion
From Wikipedia: recursion is the process of repeating items in a “self-similar” way. Self-similar, in mathematics, is an object that is exactly or approximately similar to a part of itself. A Koch curve has an infinitely repeating self-similarity when it is magnified. In practice, when programming, this is when a method calls itself. This s…
-
How to recursively make a directory (folder) with PHP
When I need to generate or save files in a web application it’s important that I keep all the files in an orderly fashion. Sometimes I think that there’s a fine line between impressionistic and messy. – Lady Gaga Here’s the go-to code I use to generate the directory structure. You can find more solution…