Recursion vs Looping

 


Recursion is the concept in programming whereby you will be looping over something till a condition has caused the recursive loop to come to an end. Recursion can also be a nth level of depth.

Normal looping is the concept in programming whereby you will be looping or iterating over a limited record set or sequence. You would usually know when a loop ends.

If your watching YouTube videos or alternative internet content, your clicking away, clicking through related videos that pop up as recommendations. These recommendations can take you well away from the area of video you were originally watching. If you think about it, your actually in a recursive loop, you don't know when that loop will come to an end. Maybe you stop watching these videos until you need to go to the toilet, until your hungry or tired etc. 

Alternatively, you could be watching videos or view internet content with a timed loop in mind. You could spend no more than an x amount of time clicking around. This loop would be safer. 

In both cases, are you valuing time? Are you in the awful state of recursion where the termination condition is unkown, if that is the case, you will need to redesign your program, else the Shaytan will make this recursion deeper and deeper and deeper and deeper and deeper...EXIT();

Comments