I think I was 11 or so when I went to a summer camp with my new laptop (an old thing that I got for free on the fleamarket). The idea was to play games on it - unfortunately it hadn't any on it.
One of the parents there then remebered that there's often some sort of BASIC preinstalled on these DOS/Win3.11-machines which normally had some demo-code (including games). It turned out that there was indeed one (Gorillas, an artillery/worms-like game), but got quickly boring. So he showed my friend and me some basic commands for QBASIC and the rest is history ;)
I have some fond memories of that (and subsequent) camps, like trying to figure out if RAND() would actually return 0 or only bigger numbers. So we just wrote a program that generated random numbers and would stop if it encoutered a zero. Then we let it run while we went hiking trough some mountains.
Another fun thing was to figure out new instructions. There was a manual, but we couldn't read it because it was in english. But it had a nice list of all the commands. So we took one that sounded cool and tried to figure out what it did.
After that, my friend got a laptop too and we would try to out-code the other. One time, we tried to implement an "operating system" (it consisted of a long and fancy start-up animation and a nice menu to launch other programs). Every time, one of us implemented a new feature into his "OS", he increased the version number, copied it on a floppy and went around screaming "Guys! Look! This the newest version of my OS!"
</end of story>
I started getting more and more interested in the things I saw like the way the chat programs worked (they were java applets), exploring them as a user and mod and learning how to "hack" them. It wasn't long before this lead me to communities where I was also shown HTML and I started learning about it.
When I was 10-11, I got into modding boards like the InvisionFree ones, which taught me a lot more about HTML and exposed me to JavaScript as you only had limited access to them so that's how all the modding was done, and a lot of those communities intersected with ones about making your own forum systems and/or modifying forums you had more access to (like hosting your own phpBB or IPB forums) which got me interested in PHP and MySQL.
By that point I'd heard a lot about C, etc. too and I was a lot more curious about computers than I was my schoolwork so I'd spend as much time learning about everything I could as possible. I started migrating to more general programming and hacking oriented communities when I was 12 and would stay up literally all night most nights and make up the sleep on the weekends, and I haven't had a proper sleeping schedule since.
It was a pretty natural process, from looking at some of their scripts and wondering "wtf" all the way to downloading the mysterious PHP interpreter and asking for help on rather trivial problems.
When I got to high school the BASIC class disgusted me. The teacher had zero experience and no style. Every assignment or lesson was out of a book that must have been 10 years old.
Edit: I've never used any books. It's really amazing how much is out there with a single internet connection.
Every assignment or lesson was out of a book
that must have been 10 years old.
Why does a book for introduction to programming need to be newer than 10 years? SICP is almost 30 years old.I assure you no revolutions in elementary BASIC programming have happened since 2002 :)
Not much later I started experimenting with Javascript, which did not go too well because I didn't know of the existance of error messages (using IE6), had no experience of course, and there was nobody to guide me. I also hadn't discovered forums yet, and none of the classmates I had on MSN were into coding yet. But I learned it eventually :)
- play games if you plugged the cartridge into the side. We had one cartridge "Popcorn", which occupied Christmas day.
- if you didn't plug a cartridge into the side it dropped you into a BASIC interpreter and sat there with a blinking cursor waiting for you to program it.
So on Boxing Day I started reading the BASIC manual and started learning to program. I still remember parts of that first program, a bingo number puller.
20 IF N=1 OR N=2 OR N=3 OR N=4 OR N=5 OR N=6 OR N=7 OR N=8 OR N=9 OR N=10 OR N=11 OR N=12 OR N=13 OR N=14 OR N=15 THEN PRINT "B"
now get off my lawn.