As a kid, someone gave me a subscription to "3-2-1 Contact", a children's science magazine. Towards the back there'd be 1 or 2 pages of source code for a "game" written in BASIC. The one that still sticks in my mind was a a text-only downhill derby where you selected from a couple options for hill steepness, axle lubrication, and maybe car shape, and it would return how fast your car completed the race. There might have been fewer than 50 lines.
I didn't even have a computer at the time, but I was hooked.
The magazine format changed a couple years later, and they stopped including programs.
But when we started using computers at school, I remembered the instructions for accessing BASIC on our Apple II's, and thus me and my friends were introduced to programming.