Reddit Trolling and Other Infinite Loops: A Tale of Learning Python
In case you haven’t tuned in previously, I’m making a point of learning a tiny bit of Python every day (*cough*sporadically*cough*) and I’m using THIS AMAZING BOOK.
Today’s section of Python Programming for Absolute Beginners discussed infinite loops. Here’s the bastardized example I used to display an infinite loop:
Which I then ran:
…and then realized that I had no idea how to stop it from running. I panicked, mashed buttons, and then finally, let it run while I read on further in the book, where it told me to hit Cntl-C.
The book then suggested tracing the program, a process in which you basically run the math by hand in table format, to try to see why your program is failing. In this instance, the value of “faith” never met the “true” condition of “0” — our heroine’s faith in humanity simply skipped into the negative digits as she slowly spiraled into ever-decreasing despair.
…come to think of it, this is not unlike my actual experiences on Reddit.