Loops and Life

What loops in programming has taught us about life?



(image courtesy: https://www.freepik.com/)

Loops..
Fascinating aren't they?

For, While, Do While.. etc

They make our job easier sometimes (with an irony of Big(O) ).

Each has a start , a scope of revolution(changes to be made), incremental or decremental iterations and an end.

We often can relate a lot about life through loops that we use in our day to day programming job. Loop can also teach us few things about life as we know it from birth to death.

If you look close enough then the analogy of life as we know it we can be understood through the simple for-loop(or any loop you may think of in programming).

You might think that I am off my rocker. But, hold on, This article is not entirely about coding rather it's a philosophical journey of life through the loophole of programming.

Please consider the code snippet to understand my point below



I am using incremental for-loop for clarification

Birth: the inception of life where i = 0,

As a human we have a life expectancy of more or less 100. So, i <= 100

All the life we live in stages will be confined between the i = 0 to i <= 100.

(an year in life or a life in an year) is where we complete one iteration of our life and it's time to move ahead i++,

we are nothing but a mere mortal instruments that takes birth, crawls, start walking with baby steps, and with time we grow bit older to get into school, college and we educate ourselves to contribute and get some bread and butter

the * in the comment might support your own customization to the stages of life.

With each iteration we gather something, build and make changes around us. And thus life goes on with i++.

You might wonder why didn't I consider an example with i-- or decremental loop.

Well, perhaps that might be the Curious Case of Benjamin Button


(image courtesy: https://i.ytimg.com/)

Comments