Life, Programming

What was your first program?

The first computer program I ever wrote was written in GW-BASIC. I was 8 or 9, and my dad had gotten me a book from the library that included the BASIC code for simple text-based games; after typing them into our IBM and playing around with them for a few hours, I decided to use what I had learned to write my own program, and it went something like this:

10 INPUT “WHAT IS YOUR NAME?”, N$
20 IF N$ = “CHRIS” THEN PRINT “YOU ARE COOL”
30 IF N$ = “AARON” THEN PRINT “YOU ARE DUMB”
40 END

I thought it was pretty cool; my brother Aaron probably disagreed. I recall having plans to use this program to not only tell me that I was cool, but to store all sorts of secret information that it would only print out if I ran the program, since no one else would think to type in my name. (I suppose this would also count as the first password I ever chose on a computer: my name. Way to go, 8-year-old self.)

Anyway, there’s not much more to this story, but I was wondering:

If you’re a programmer, what was the first program you wrote? What was the first thing you made a computer do that it wasn’t already programmed to do?

Standard

13 comments on “What was your first program?

  1. Almost the exact same as you here. For me, it was a Choose Your Own Adventure-style game, typed in from Analog magazine on an Atari 400. It was great, until I shut the computer off to go swimming at the town lake. See, there was no non-volatile storage on that Atari.

    Soon after, we came into the 80’s and hooked up a cassette tape for storage. Those were the days, of 3 minute load times for a 16k program. :-)

  2. I remember the day well… it was January 2004. You (Chris) had set up a website for me. It included sample things of what I could potentially do on it (i. e. different-sized text, different colors, different text alignments, etc.) complete with cheery little notes like, “I am normal-sized text!”, “I am green text!”, and “I am text that is aligned to the left side of the page!”
    The page featured a picture of me looking very sleepy, brushing my teeth, and making a weird face at the camera.
    The first thing I did was delete that image…

  3. The earliest program of which I still have a printout (last seen during my last move) dates from 1988 and is in MS BASIC; it finds the two integers of up to three digits each the ratio of which is closest to Pi. It was written on the Amstrad CPC6128, but I suspect it would run on any other machine from that era that has MS BASIC in its ROM.

  4. i wrote the animal game in BASIC from the help of 3-2-1 contact magazine. my dad would “play” it (i.e. feed it information) while i was away and thus make it more interesting to figure out the animal i thought up would already be in the database or not. i think i was 8 when i first wrote it.

    are you thinking of an animal? is it bigger than a toaster?

  5. It was an APL program on an Atari 1000. I was about 8 years old, and already a big fan of Infocom adventure games. My father taught me the assignment operator – “?” – and I wrote a program that looked like this:

    WEST?’YOU ARE IN A FOREST. THERE ARE SOME TREES HERE.’
    EAST?’YOU ARE IN A HOUSE. ON THE FLOOR THERE IS A SWORD.’

    “APL 68K”, as I believe it was called, for the Amiga, had an interactive interpreter, so I entered these programs at a prompt, and then delighted in typing:

    > WEST
    YOU ARE IN A FOREST. THERE ARE SOME TREES HERE.

    repeatedly.

    At the time, I don’t believe it occurred to me that there was anything else involved in writing a program; I spent the better part of a week trying to figure out what you could possibly assign to WEST to have it know that the *second* time that you typed it, you wanted to go west *again*. Needless to say this was an exercise in frustration.

    It was two years before I tried to write a program again, the next time in HyperCard. But it was weeks before I realized I was writing a program.

  6. There was a basic program on the C-64 I remember that would scroll random “/” and “\” to make a maze, but I don’t think I wrote it.

    There was a show on “Chaos Theory” and they described the Sierpinski Triangle [http://en.wikipedia.org/wiki/Sierpinski_triangle ], and it was simple enough in rules for me to create one in basic. No imaginary numbers. I think it was my first real, not from a magazine or variation of a standard, program.

  7. I remember that my first program was written in batch code on xp (state of the art at that time – 2001). I was 12yo and intrested in hacking ( lol ), so i made a virus that consisted in :

    @echo off
    echo “THIS IS A VIRUSE!”
    PAUSE

    I never understood why it didn’t spread …

  8. Alexander Baldwin says:

    My first program was echo "Hello World!"; mainly because a book told me to. It was ages before I realised you could do much more fun things if you actually learnt the language!

  9. Bouba says:

    1st program ever ? a loop.

    10 FOR I = 1 to 100
    20 PRINT I
    30 NEXT I

    It was a kind of benchmark test for me.
    I started with a Texas Instrument TI99/4A which turned out to be the slowest computer on the market despite its 16bit CPU. VIC20 and TRS-80 Mod I were way faster…
    If you’re nostalgic too, take a look at the multi-emulator MESS (www.mess.org) and this museum: oldcomputers.net

    Cheers and thanks for RSS Ticker!

Leave a Reply

Your email address will not be published. Required fields are marked *