upvote
When I first learned about recursion I could not understand it (specifically, I didn't understand how eventually you reached a termination point and popped back up the stack). I spent all day thinking and thinking and thinking. As I was falling asleep- in that sort of lucid awake-but-not-awake state, the entire program I wanted to write appeared before me in glowing letters. Some deep part of my brain woke me up, I wrote the program down, and went back to sleep.

When I woke up the next day, I compiled it, ran it, and it worked on the first try (up to the stack limit on my computer... 6 function calls deep).

Since then I've noticed that if I get super-duper obsessive about things I don't understand, insights will start to pop into my head, but at the same time, I can't really talk to other people because the human interaction part of my brain is "paged out". I kind of understand tormented geniuses better knowing that many of them also walk a fine line between human life and discovery.

reply
Newton didn't dream of the apple falling, it actually happened (as such things do) but it didn't hit him on the head.

https://www.newtonproject.ox.ac.uk/view/texts/normalized/OTH...

> after dinner, the weather being warm, we went into the garden, & drank thea under the shade of some appletrees, only he, & myself. amidst other discourse, he told me, he was just in the same situation, as when formerly, the notion of gravitation came into his mind. "why should that apple always descend perpendicularly to the ground," thought he to him self: occasion'd by the fall of an apple, as he sat in a comtemplative mood: "why should it not go sideways, or upwards? but constantly to the earths centre? assuredly, the reason is, that the earth draws it. there must be a drawing power in matter. & the sum of the drawing power in the matter of the earth must be in the earths center, not in any side of the earth. therefore dos this apple fall perpendicularly, or toward the center. if matter thus draws matter; it must be in proportion of its quantity. therefore the apple draws the earth, as well as the earth draws the apple."

reply
This is such quaint, clear, and beautiful writing. It deeply struck me. Thank you for posting it.
reply