I was ten years old and fascinated by computers. I had no idea how these magical electronic devices worked, but I loved them.
When I was growing up we had an Atari 1040STFM. Like most children, all I cared about was games. Back in 1991 The Internet hadn't take off, and social networks were unheard of. Games were so vital to my existence, I wanted to make them. That's when my Dad introduced me to programming through the book ST BASIC Sourcebook and Tutorial:
This book has a section called The Guessing Game which had the source code listed for, you guessed it, a guess-the-number game:
I wrote out the code and got it working. It was an amazing feeling. Then I started to mess with it. Big time.
I found the
RND function and used it to generate a random number up to a limit given by the user; I removed the output that told the user if their guess was too high or too low; I removed any means to quit the game other than by guessing the number correctly. I ran the game and it still worked. Wonderful.
Then I ran it again but this time entered a huge number as the maximum. After a few guesses, it dawned on me: This might take forever to guess. And I can't quit! Oops!.