Recursion, as defined by this novice computer scientist, is a function or object that calls upon itself to yield its output.To understand this, I like to picture my function as a square- when I call it, and it calls itself (through recursion) I go a layer deeper into it- visually, into a slightly smaller square right below. As long as I keep recursing, I'll go into deeper, smaller square layers. As a novice computer scientist, and regular homo sapien, this is not useful for two reasons: a) my function will never return a value, and is by that merit, futile and b) being in a pit of infinitely shrinking squares sounds no fun; if there was a hope that I would stop sinking, it would take me an awful long time to climb to the top(did I mention I was sinking along with my recursing function?).Considering the previous examples, I'd be stuck clicking on Google's 'did you mean recursion' until the sun exploded( assuming I am immortal), and I'd be asking my friend the same incessant question until the above also occurred. For this reason, I need base cases- points at which my function will stop recursing by returning a value. At the moment that I get a value, the layer above me uses it as its input, and I can climb the layers to the top to yield a final value. As this novice computer scientist has learned, to implement an effective recursive function, one must then determine the base cases (the point of STOP),what I like to call the recursive factor (by how much or how is the function sinking), and as with every function, the operations that need to be applied to it (standard stuff).
Recursion is useful in that it allows the breakup of a problem into smaller subsets. In my brief experience with this topic, it has been most useful to evaluate nested lists, which I previously had to do with cleverly crafter for loops. Thus, recursion allows for much simpler, less cluttered code.
For all novice computer scientist out there, I instil some advice: patience is key to understanding this stuff -recursion is not for the faint of heart. If like me, you happen to be a regular homo sapien with pretty standard cognitive powers, be prepared to spend some time on it. Sharpening your climbing skills couldn't hurt either.