A subscription to the now defunct children's magazine 3-2-1 Contact. That magazine would sometimes include the code for simple BASIC computer programs. Eventually I figured out they would run on the (then common) Apple II classroom computer at school, tried one (a simple guess the number game with a preset answer), figured out how to change the answer and tweak the code, and got hooked.
Ultimately this led to a degree in software engineering and a job in IT that I quite enjoy, especially when writing scripts or working with code.