Stack OverflowHello world: what did your first ever computer program do ?
[+34] [97] David
[2008-09-03 23:18:04]
[ language-agnostic history fun ]

If you can remember that far back, what did the first computer program you ever wrote do (once you had finished debugging it)?

[+32] [2008-09-03 23:31:42] Adam Davis [ACCEPTED]

Mine was a rocket taking off. Something like:

10 PRINT "  /\"
20 PRINT " /  \"
30 PRINT " |  |"
40 PRINT " |  |"
50 PRINT " |  |"
60 PRINT " |  |"
70 PRINT " |  |"
80 PRINT "/====\"
90 PRINT " ####"
110 GOTO 100

Aw GWBASIC, I hardly knew ye...

(26) I almost marked this post as offensive :) - Even Mien
(2) I was doing that kind of stuff too!! =) (space shuttle) - Anonymous
(2) I would do stuff like that on the display models at radio shack before I could afford my own computer. The sales guys seemed to get a kick out of it. - Ferruccio
(2) Mine would have needed a few more lines... - Jeb
Now you are just dreaming - Matthew Whited
(5) How many people just went and wrote this in five seconds in their language of choice? - Chris Lutz
(10) Oh man, this takes me waaay back. That was my first ever program, too. But, I might add, my rocket was much larger. :p - Konrad Rudolph
[+22] [2008-09-03 23:38:57] FlySwat
20 GOTO 10

Mine was like this too. - Landon
You forgot the ";" at the end which makes the line repeat itself in concatenation. Atleast in the Atari basic. - shoosh
Aaaah - a bit of nostalgia. I think my dad still has out Amstrad CPC 6128k somewhere... - Codebeef
(2) I never knew who Jon was but I did think he was awesome... - dwj
(5) You have a bug in your program. Line 10 should read 10 PRINT "CRAIG IS AWESOME" - Craig
(8) You have a bug in your program. Line 10 should read 10 PRINT "JON SKEET IS AWESOME" - A. Scagnelli
(5) Mine was similar - except it wrote "FATAL ERROR". It loaded at startup on an adult's PC. - Chris S
[+17] [2008-09-03 23:30:06] Mo

It moved a turtle [1] around the screen :)


ah, some great memories there. never was it so hard to put a roof on a square house :) - neouser99
me too. and never was i prouder of a picture i had drawn :) as i recall, i even insisted on taking a picture of the tv connected to my ti99... - Reuben
It was easier if you started at the peak of the roof and went down, instead of starting at the corner and going up. You don't have to worry about sqrt(2) distances. Just give the roof a little overhang at the eaves. - jcdyer
And here I thought the turtle was a local thing (my book was in Dutch) - borisCallens
I learned Logo in Catholic school. We made churches and crosses instead of houses :) - Brian Bolton
[+16] [2009-01-30 01:31:28] Ray Hidayat

One of my first programs, not sure if it was the absolute first one, went like this:

INPUT "Please enter your name: ", name$
IF name$ = "Ray" THEN
  PRINT "You're cool"
  PRINT "You suck"

+1 This was my first as well :) - hammar
[+13] [2008-09-03 23:20:13] Jimmy

Guess a number between 1 and 100 game :)

Mine was on a TI-56 programmable calculator. I stole the random number generator from a different game that came in the manual. - Darron
(2) Wait - would it pick a number and have you guess, or would you pick a number and the program would guess? =) - Erik Forbes
[+7] [2008-09-03 23:32:12] Sergio Acosta

My first 'program' just multiplied two numbers. It was hard-coded in machine instructions in an E-PROM chip for my electronics course in high-school.

I consider myself lucky to have learnt programming all the way from the hardware level up.

Because... all that time spent makes totally higher level languages all understandable? - Tchalvak
[+6] [2008-09-03 23:23:15] The How-To Geek

My first computer program was a little animated man that looked like he was walking, on a Texas Instruments TI 99/4a

Soon after that I got a cartridge of Extended Basic and had access to sprites and joystick functions, so I attempted to make a Super Mario clone. Unfortunately, due to the receipt of an actual Nintendo (NES) the project was canceled indefinitely.

That can be added as part of the "failed projects" statistics? :D - vmarquez
[+6] [2008-09-04 02:59:44] Nick Retallack

I didn't consider myself actually programming until I picked up The C Programming Language by K&R in high school and I made this silly thing [1], but thinking back to the good old days, I did have some fun with hypercard in 6th grade, where I made a rhythm quiz game -- it generated a measure full of different note values and you had to guess the time signature.

And then I implemented BomberMan in StarCraft, among other things. StarCraft is totally a programming language, right?


[+4] [2008-09-03 23:41:07] Kyle Cronin

My first program was writing a Mad Libs program in QBasic. It was the worst spaghetti code you can imagine with the story templates written directly into the code. I carried it and a version of QBasic around on a floppy to show everyone - I was 11 years old at the time.

[+4] [2008-09-04 00:00:56] Rob Wells


It was a FORTRAN programme, entered on punch cards, at the Royal Military College, Duntroon in Australia in '75. West Point (Sandhurst and Duntroon maintain a tight list of ties together).

The machine was a huge GE mainframe, donated by the company my father worked for, that had core memory. Professor Swan, who'd previously taught physics to my father at RMC, showed me how to program it.

The programme just added a couple of numbers together. But when I saw the results dumped out, I was hooked.

Ooh. Just had a major flashback. My first actual programme was on my own Digi-comp [1] in 1966 and it counted from 0 (where else) up to 7. My Dad brought one back to Oz for me after making one of his visits to the States for work.

I can't believe they're making the Digi-comp again. Gotta buy me one!




[+4] [2008-09-17 08:56:38] Tipa Shel Or

BASIC, 1982, I was 8 yrs old, a small program asking for 2 numbers and then adding them.

I thought loops were the coolest thing on the face of the earth...

(2) I'd say they are still, imagine programming w/o them :-) - André
The world would be more functional without loops ^_~ - Null303
(2) they aren't ? :/ - Valentin Rocher
[+3] [2008-09-04 00:13:57] Apocalisp

My first ever original program was in Sinclair BASIC. It drew a picture of the Death Star using CIRCLE statements, and played the theme from The Empire Strikes Back with BEEP commands.

[+2] [2008-09-03 23:29:56] Jon Limjap

My first one was used the Circle() and Paint() statement in GWBASIC. And using the randomizer to draw circles of various sizes and colors (or rather, shades of CGA grey) on the screen.

[+2] [2008-09-04 02:17:31] Dan Walker

I did 'Hello World', because that's what I had read was traditional as a first program, and who was I to question tradition?

I did the exact same thing in QBASIC, those were the days! - Lucas McCoy
[+2] [2008-09-04 09:25:27] Thomas Vochten

A ticker that showed promotional messages for a non-profit organization in my neighbourhood. It was written in basic on a C64. I had to turn my television/monitor so it faced the window so people could actually see it. If anyone saw it at all ;-)

[+2] [2008-11-03 23:56:06] Rick Minerich

Like most my age I started with something like: 10 PRINT "BUTT" 20 GOTO 10.

My first real program was a AD&D char generator. You could put in what kind of dude you wanted and it would randomly generate stats until an acceptable one was generated. If you picked paladin it could take a few seconds back on my 286 because of the 17 CHR stat requirement.

LOL I wrote one of these. - DMKing
[+1] [2009-05-19 14:44:17] Scott Anderson

My first program was a menu system written in QBASIC that ran from the AUTOEXEC.BAT on DOS. It allowed you to pick what you wanted to run (games, Win 3.1, etc.). Unfortunately it was a bit of a RAM hog :P

[+1] [2008-09-17 09:29:05] Josh Smeaton

A mIRC script that used sockets to connect/login to a website and dynamically 'vote' on a specified list of url-profiles. I had written a few other very very basic scripts in mirc before this, but that was the first that did anything significant.

[+1] [2008-09-17 01:58:50] Jerub

I drew a square, in LOGO.

Probably along the lines of:


[+1] [2008-09-04 08:27:58] Ced-le-pingouin

It was a program asking you how you felt, and the answer was different whether you said something like good ("well, that's great!") or bad ("ooooh, too bad, sorry for you!").

I think I was twelve, in GWBASIC, on a PC XT @8MHz with amber screen and Hercules gfx card.

After I saw I could start from nothing and create something that, well, worked (?), I was hooked on programming.

From there I tried to "re-make" every single program or game I liked in BASIC, such as Car Wars, Bomberman, Slot Racer (an old atari 2600 2-player game). I remember I made a "level editor" (well, sort of) in character mode for Slot Racer and Bomberman. My skills were so poor at the time, needless to say my remakes were not so great, graphics- and playability-wise :D

[+1] [2008-09-03 23:26:23] Justin Bennett

I'm sure my very first one was just a simple "Hello World" in C++. After that I can't remember exactly what I did first but one of the early ones I can remember was a poker game. If I remember correctly, I didn't write the logic for all of the possible poker hands, but it did have some of the functionality. It wasn't graphical at all, everything was text-based from the command line.

[+1] [2008-09-04 00:05:21] Frederic Morin

Mine was actualy... compiling. And that's exactly what I was trying to do :)

[+1] [2010-01-20 19:24:43] Tor Valamo

My first was a hit counter in PHP, reading a number from a text file, incrementing it and writing it back.

[+1] [2009-10-11 16:12:23] Ether

My older brother was firing up our brand new Atari 800XL in the living room and showing off some of the demo programs that came with it. At some point a program exited back to the BASIC prompt, and I typed in something that I had seen on a nerd show on a public-access channel:

20 GOTO 10

I had already learned to pad the line numbers to allow for later insertions! :)

I don't know if this was my earliest program; I may have already been exposed to LOGO in school. But I couldn't have been more than 6 at the time. Yet astonishingly, I didn't realize that programming was in my career path until 2nd year university.

[+1] [2009-10-11 16:27:12] blwy10

My very first one was Hello, world in C++ from a book published in 2000s but was using pre-98 C++.

#include <iostream.h>

int main()
    cout << "Hello, world!";

Notice how this screams at you to be outdated and just, plain, wrong.

The first thing I wrote outside the tutorial book was a calculator. It was menu drive, so pretty useless. I later tried some RDP thing, but considering it was 2 months into starting C++ and I was 12, it never succeeded. The next time I tried was now (6 years later), and I got lazy and used Spirit [1] to parse the expressions. In effect, I've been babied my entire life using C++, haha.


[+1] [2010-01-20 18:44:33] Nicholas Flynt

Technically, the first program I ever typed was, in TI82-BASIC:

:Prompt A,B
:Disp C

But I got that out of the textbook. After being somewhat awed by this and playing around with the keywords to figure out what they did, I promptly wrote PONG in TI BASIC. I was a game programmer from day one. ^_^

What's interesting is that, at the time, PONG just seemed simple to do. I had no idea that it was basically the standard "Hello World" for games engines. My version was horribly coded, made religious use of the GOTO and LBL statements, and had a memleak because I didn't know how to END my IF THEN statements (I was GOTOing out of them instead) so it would always crash when the player reached 204 points. I'll remember it forever. 'course, once I got my TI-83, I rewrote the thing properly. Even then, it's been years since I've even turned on a TI calculator, but it's still my humble roots.

Those of you following along from home will point out the lack of a sqrt() function on the TI-82; you're quite correct. However, I couldn't figure out how to type the radical sign, which it did have, and which is what the program actually used. The real command is something like :[radical](expr) -- bonus being that since the -> operator in TI BASIC had such high precedance, you could omit the ) and it was actually encouraged that you omit all ending ) symbols, as it would make the interpreter run faster. Good 'ole days indeed. - Nicholas Flynt
[+1] [2008-09-03 23:37:55] Erik van Brakel

Mine was a circle bouncing off the edges of the screen. Something like this (pseudo):

while(true) {
  x = x - dx;
  y = y - dy;
  if (dx > 0 && x == 0)
   dx = -dx;
  ... and so on

hypnotizing images :P

[0] [2010-01-20 18:49:09] jasondavis

LOL My first program, well mine did nothing but look pretty! When I was about 12-13 years old I bought Delphi and all I could do was build a really cool looking app with the forms, it didn't really do anything though but scroll some text and show my photo and a couple other small things that basicly just took my hitting buttons in the IDE then compile.

[0] [2010-01-20 19:00:01] George Edison

Mine was a POSIX compatible kernel with USB 3 support and native NTFS drivers!

Edit: just kidding. It was, I believe, a tic-tac-toe BASIC game.

[0] [2010-01-20 19:08:12] Sumit M Asok

Mine was add two numbers using BASIC

back in 2000 when I was 14years old at school.

i don't even remember how i used to code BASIC.

[0] [2010-01-20 19:21:49] Grembo

List the prime numbers less than 100. It was on a 110 baud phone hookup with the high school mainframe. The year was probably 1971 or 1972 - it was a summer class in BASIC and I was probably between 7th and 8th grade. The teacher was both teaching and learning at the same time. We also had some games that were more like simulations that we could run. Sure made the REAL classes in HS and college a breeze.

[0] [2010-01-24 00:21:17] BenAlabaster

Mine was on the ZX Spectrum 48k and it drew concentric circles... I learned it from the BBC Basic in 30hrs course that my mum bought so she could learn to program. She never did learn to program though... probably because I spent most of her available free time writing and playing computer games on it.

Here I am 26 years on...

[0] [2010-01-24 00:32:19] fastcodejava

My first substantial program was to calculate n! where n was fairly large, say 10000. This was without using any library routine (e.g. BigInteger), of course.

[0] [2010-01-24 01:24:53] Don

Fortran IV on an IBM 1620A, around 1964, NASA Headquarters, basement, FOB 10B, Washington DC

       FANDK 2, 4
       I = 2
       PRINT 900 I
900    FORMAT '9HANSWER = '

[0] [2010-01-24 01:40:00] Wallacoloo

My first program was a .bat file with a "." that you could move around using WASD.

[0] [2010-01-24 01:47:33] Srdjan Jovcic

My first experience with programming was in BASIC on Lola 8A [1]:

20 GOTO 10

[0] [2010-01-24 01:47:33] BReeves

I'll be joining the ranks of those who first programmed something in LOGO. I miss that little turtle...

[0] [2010-01-24 01:57:01] Brian Bolton

Logo, but then again my first useful programs were written for my TI-83.

[0] [2010-02-04 06:04:00] C.W.Holeman II

My first program was synthetic division for a Wang Model 360SE Calculator System [1], media: hand punched single card CP-1 [2].

I did this in response the homework for Algebra II. I never did finish the assignment that day and the teacher considered my time coding the solution as a waste. It sure seemed to me that understanding the process well enough to code it meant I understood the subject but what did I know I was just kid.


[0] [2011-06-11 19:43:05] Navid Rahmani

Mine was:

print "1" + "2"

and I wondered why it prints 12 instead of 3

[0] [2008-09-04 00:08:25] Rodrick Chapman

Drew tangent lines on the graph of a function. TI-81.

[0] [2008-09-03 23:37:37] dagorym

Mine was in BASIC on an Sinclair ZX81, almost 30 years ago now. I don't remember what the program was but we got the computer for Christmas when I was seven and I worked my way through the manual and any other BASIC programming book I could find. Looking at the manual, it was probably the little program to print the square root of a number entered by the user.

[0] [2008-09-04 00:32:55] David McGraw

Wrote a program in Visual Basic that tormented/helped America Online back in the 3.0 days...

[0] [2008-09-04 00:46:22] wvdschel

Mine was a snake game in QBASIC. Given that I didn't have access to any learning material, I didn't use SUBs, just GOTO statements, so after a fixed amount of iterations, the interpreter ran out of stack, and the program crashed. Took me a while to figure out what was happening!

(2) That's funny. GOTO doesn't use up stack. - Joshua
[0] [2008-09-04 01:22:16] DyreSchlock

I made a blackjack style game on my TI-83 calculator. ^_^

[0] [2008-09-04 02:09:26] krakat

In javascript, some board games.

[0] [2008-09-04 02:13:10] bruceatk

Mine took a couple of numbers that were input and then printed out different messages depending on how big the answer was.

The scary part was it was written in Fortran on punch cards.

[0] [2008-09-03 23:46:40] Darren Hague

I seem to remember doing a Fahrenheit/Celsius converter. In Algol 68. On punched cards. The cool kids were using Commodore PETs at the time...

[0] [2008-09-03 23:52:39] Slartibartfast
20 FOR I=1 TO 10  
30 ? A " * " I " = " A * I  
40 NEXT  
50 END

Maybe I've forgot all sintatic details, but I was like 8 year old. I clearly remember that ? was PRINT on Commodore's Basic

[0] [2008-09-04 08:52:24] Brian Leahy

Guess a number between 1 and 100

Higher. Guess again. - Scottie T
[0] [2008-09-04 08:58:21] Johannes

Turbo Pascal 5, and apart from hello world my first real program was

  • handling orders (copied the layout of the order form on text mode screen) saved them into files (one each month)
  • printed them onto order form
  • had drop down type lists for types of products
  • did a balance sheet for month end

After 2 years got replaced by SAP system :-( big fish eats small fish :-)

[0] [2008-09-04 09:12:45] SilverViper

It would have been pretty much like:

10 play "e9e9e7e9e9e7e9f9c9d9e7"

Jingle Bells in gw-basic :D

[0] [2008-09-04 09:24:33] steevc

Well it would have been about 30 years ago when I went to upper school and there was an optional lunchtime computer class run by a maths teacher. We had a 'portable' terminal with acoustic coupler that connected to the local college mini. I remember that a fair few turned up at first, but after a few weeks it was just two of us hacking away on the terminal almost every day. We were writing in Basic and producing lots of thermal printout.

I can't remember what the first program would have been, but probably something like Hello World, followed by some simple calculations. ASCII art also featured strongly.

Ah, nostalgia.

[0] [2008-09-04 02:46:07] shsteimer

I started with html, not a programming language I know, but soon after was writing very simple cgi in perlscript. I dont remember exactly the first one, but it was probably along the lines of sending an email on form submission.

[0] [2008-09-04 03:06:59] rp

I wrote a S/34 in RPG program to list dirty words on a 24x80 green screen. George Carlin would have been proud.

[0] [2008-09-04 03:14:18] community_owned

Mine made a Jeroo hop around a screen.

[0] [2008-09-17 02:09:59] Matt Hucke

My first program that I recall - other than exercises from books and other trivial projects - was a "Breakout" game for the Atari 800xl (circa 1987). I had recently learned in high school physics class that "angle of incidence equals angle of reflection", and that was all the physics I needed to build a Breakout clone.

I did a few more games after that, including a Pong clone (as I already had the bouncing ball math figured out, that's half the work done...), TRON-style light cycles, and a four-colour paint program with circle, ellipse, and line drawing commands.

When I switched to an MS-DOS machine a year or two later, I wrote a Dungeons & Dragons character generator in "Turbo" C - it would provide random numbers for such stats as strength, wisdom, etc., suggest a character name (by throwing random letters together), and then display a printable "character sheet".

The first program I actually received money for writing was an IRC (chat) bot.

[0] [2008-09-17 02:11:27] Mostlyharmless

Crashed the PC. What else?.

EDIT: It was intentional.

[0] [2008-09-17 02:24:50] Omer Zak

My first computer program got, as input, three real numbers A,B,C and computed the roots of the square equation
Ax^2 + Bx + C = 0
The program knew only to handle the case of
B^2 - 4AC >= 0 (i.e. only real roots)

The program was written at July 1969 in FORTRAN IV, using punched cards. It ran on the CDC 6400 computer belonging to the Hebrew University in Jerusalem, Israel. I was 12.5 years old at the time. The computer's memory capacity at the time was 32K 60-bit words (equivalent to 240K 8-bit bytes).

[0] [2008-09-13 16:17:27] aib

I wrote a program that printed "X"s in a loop (in QBASIC on a 286). The next step was randomizing their color.

[0] [2008-09-16 04:57:55] Brent.Longborough

It was in Algol, in 1965, and it printed a 12x12 multiplication table.

For criminy's sake :-<

[0] [2008-09-16 05:03:54] Lukas Šalkauskas

Turbo Pascal (can't remember what version) on 386 MHz PC with 16 MB ram, and 70 MB HDD, I wrote a game which let use guess random number between 1 and (depend on level which is selected: easy - ..100, hard - ..1000, expert - ...10000, insane - ..100000). After user guess it said (the number is bigger/lower). It was just simple game. :) but it was fun ;) Latter on I wrote a snake game .

[0] [2008-09-16 05:04:27] Ben Combee

I had plenty of random Atari BASIC experiments in my youth, but my first real program was an Basic XL-based Atari 800 drawing application that used the joystick to move around a blinking cursor (I think I used the player/missile support for this so it woudln't overwrite the graphics on the screen). You could draw by holding the joystick button, and keys on the keyboard would give you some primitives, like lines, circles, and text. I implemented the circle drawing using about 36 segments calculated using sine and cosine functions, while the text was plotted dot-by-dot after reading the bitmaps out of the Atari's character font. It also supported save and load for pictures. It was rather slow, but I was proud of it and I gave copies to my friends who also had Atari systems.

My first complex game was something called "Camel Racers" that was notable for its use of redefined character sets. However, there was very little game play in it, since you didn't have enemies and the race wasn't timed.

[0] [2008-09-16 11:09:37] Bill Michell

My very first program was written in some version of BASIC running on a PDP-11. It rolled up D&D characters. I can still remember wondering why "FOR X=1 TO 6" wasn't returning a random number... Those were in the days when the teacher kept all the manuals locked in the server room.

My second program attached to one of the other terminals and set itself up as a keylogger grabbing passwords. The only password I ever let it grab was my own, of course.

Good times.

[0] [2008-09-17 09:31:19] steffenj


20 GOTO 10

I guess ... can't really remember if it was "HELLO!" or "Hello!" or something else... :)

[0] [2008-09-17 09:32:03] user13125

I think my first program was a simple text adventure game. It used basic console instructions for printing text and getting input. I copied the instructions from some code I had got from my friend who also gave me some version of Turbo Pascal. I didn't even know how to clear screen or do a loop so I had 25 lines of empty WriteLn commands for every clear screen.

[0] [2008-09-17 09:33:29] FrankS

I started programming by modifying Games on the C64, which were written in Basic. Like giving myself $10000 instead of $100 for the start. After that I created some small quiz games myself in Basic. Pretty basic stuff and really ugly code, but well, I was still at school at that time and about 11 years old I guess.

Apple BASIC for me... Was fun to learn to programming with a list of commands and none of the complete syntax to tell me what I was doing. - Matthew Whited
[0] [2008-09-17 09:51:48] Roland Tepp

I guess my very first "program" was to solve a standard quadratic equation (ax^2 + bx + c).

Next one was a character mode address book with menu system and some nice animations.

Third one was a graphical poker slot game.

All of these were written MSX2 BASIC and I miss sorely that I've since lost the sources to these.

[0] [2008-09-24 01:46:37] community_owned

Cobol program on cards at university. I quit the course. But the next year we got terminals so I majored in computer science. Basic was our first course so I think Hello World was my first termnial program.

[0] [2008-09-24 01:59:11] j'B

Visual Basic 6. Used the KeyDown event to move a PictureBox around the screen. It was the demo lesson for this not-all-that-informative-but-good-at-getting-you-into-programming game development for kids course that I took.

[0] [2008-09-24 19:00:53] Jim C

I spent about 4 hours type hex characters in to a Commodore VIC20 for a trek game. I had to start all over again when my wife tripped over the power cord while saving it to audio tape.

[0] [2008-10-02 09:33:46] RobS

My first "program" was written on a Commodore 64 with a tape drive.

It basically wound forwards and backwards on the tape and read of strings which it displayed on the screen (given user input).

Nothing brilliant, but at the time it was about all I could do with a tape drive which didn't take 15 minutes to load (like tape drive games of that era!)

[0] [2008-10-13 19:07:03] Jeffrey L Whitledge

My first program was written in the autumn of 1987 in GW-BASIC on a Tandy 1000.

The program wrote my name on the screen....

a THOUSAND times!!!!!!!

[0] [2008-10-13 19:12:11] Matt S

I opened C++ for Dummies, copied some code to convert degrees Fahrenheit to Celsius, got it working, was frustrated I didn't understand what I just typed, and stopped coding until years later.

[0] [2008-10-13 19:13:14] stephenbayer

I know exactly what the first computer program I ever wrote did, I know exactly what time it was and where I was sitting. It was an exciting moment in my life. It actually was a two person tick tack toe game written in Z80 assembly. And it was about 30 years ago.

[0] [2008-10-13 19:16:07] BoltBait

My first program was typed out of the CBM PET computer manual. It was a BASIC program that dealt out a deck of cards (think text mode) in random order.

I spent the rest of the day modifying that program to learn how BASIC worked.

(1) Thanks for the negative vote, you ass. - BoltBait
[0] [2008-10-13 19:18:31] Daren Thomas

My dad got me a REXX interpreter (Mansfield Rexx) and an editor (KEdit) and told me to add two numbers. When he came back from work that evening, I had splattered all my attempts to "teach" the computer the concept of positional notation for numbers in a textfile. The computer didn't really understand... I was kind of shocked when Dad did: say 3 + 4. It's as easy as that? Wow! From then on, I was hooked ;)

[0] [2008-10-13 19:18:43] acrosman

The first one I can remember was drawing random lines on the Screen in BASIC on an AppleIIe...but I must have written something before that.

[0] [2008-10-13 19:25:22] Ferruccio

My first computer was a kit (a Heathkit H89). When I finished building it, I had no software to run on it for a couple of weeks until I could make another trip to the HeathKit store an buy a copy of HDOS.

It didn't have BASIC in ROM, but it did have a debugging monitor. These machines did not have any sort of memory-mapped video. They had a serial connection to what was essentially an H19 terminal built into the system. That meant you could control the screen by sending various escape sequences to it.

So, I wrote this little program that would accept a bunch of keystrokes and then play them back to the terminal real fast. By typing in the right escape sequences, you could do some crude animations.

I wrote this little gem in 8080 assembly language. Since I didn't have an OS yet. I had to hand-assemble it to machine code and enter it manually through the debugging monitor every time I wanted to load it into memory. It wasn't too bad. I think it was less than 100 bytes long.

Hand assembled... ahh the pain that never goes away :) - Matthew Whited
[0] [2008-10-31 14:36:19] David Pike

I vividly remember using a Dragon 32 running Microsoft Basic(!) to draw a house. I also remember refactoring it to draw a football pitch instead. And, of course, the old concentric circles routine:

10 PMODE 4,1 : PCLS
20 FOR I=100 TO 1 STEP -1
30 CIRCLE(200,200,I)


[0] [2008-10-31 14:55:23] Joeri Sebrechts

The first one I ever did that wasn't copied from a book was a VB 3 program for calculating a particular mathematical equation, to make my maths homework go quicker. I like to think back with pride on the notion that my very first program was just a way to cater to my inherent laziness. :)

[0] [2008-11-03 23:14:05] goldenratio

I did the "fancy" Hello World, where it would ask you your name and age, and say "Hello ____, you are old!" or something. C in GCC, ah it was sweet.

[0] [2009-05-19 14:54:15] entity64

My first one was a configuration file editor for the CFG files used by Counter-strike.

That really was a challenge and took me over a month, but I learned a great deal of programming basics like IO, internal representation layout, GUI etc... It was written in VB 6 by the way ;-)

Ah, the old times (I was 12 years old at this time)

[0] [2009-08-11 22:52:56] MiffTheFox

I don't remember the specifics, but my first program was written in QBasic.

If I recall correctly, it took a list of years from input and printed out how long ago they were.

Of course, being the naive young programmer that I was, the current year was hard-coded, of course.

[0] [2009-08-11 23:55:39] DisgruntledGoat

My first programming was on my TI-84 calculator. My first program solved a quadratic equation. VERY useful at the time doing GCSE Maths.

My next one was more advanced: a pairs/concentration game. Due to limitations there was only one board layout of 4x2 "cards" which were just the numbers 1-4.

[0] [2009-08-21 13:14:41] bastianneu

I got an unsorted List of Words and had to create sentences out of it. Using for me it was really challenging. :-)

[0] [2008-09-17 09:08:28] Joshi Spawnbrood

I made a qbasic program, under MS-DOS, to play a little motive.

[0] [2008-09-17 09:22:41] Nick Pierpoint

Well, after 10 PRINT "NICK"; 20 GOTO 10... first proper program (if you can call it that) was "Transversion" for the ZX Spectrum in 1984. I think we made £300 for it, which was, frankly, a fortune back in the days of paper rounds.

Just Googled it and found a poor remake:

Not yet available on the Wii.

[0] [2009-05-19 14:40:46] community_owned

First program I created was a DOS simualtor written in QBasic. It had the most important applications available such as more, help, and format. Worked on it in lunch breaks on my junior high schools computers, specifically one that had been formated. I just made a boot floppy and did everything with that.

The format c: command in particular got some attention. A teacher came by and saw what "I was doing" and I was promptly kicked out of the computer lab for a month. No help in saying that I was practicing my programming skills on a computer that could not be used for anything else anyways (school neither had an IT department nor an IT person, just inherited the computers from a company as-is).

[0] [2008-12-11 01:21:28] nevster

My brother went to a computer camp around 1980. He came home with a 40 page tutorial printed on that purple paper they used to use in schools back then [1].

I read it with fascination. Didn't have a computer though. But I can say I truly learnt my first bit of programming by reading that document over and over.

I finally got to try the stuff out on a friend's Apple II - his father was a Maths Professor at Macquarie Uni. First program was probably Hello World and 20 goto 10 but can't be sure. Other than that, we played lots of Wizardry. :)


[0] [2008-12-11 01:44:44] Kwang Mark Eleven

A Fortran program, punched in 80-column cards, that printed a Christmas Tree.

[0] [2008-12-20 00:15:03] Tom Schaefer

Mine was in BASIC on a TRS-80 Model 1 that calculated c, given a and b (simple pythageorean theorem calculator).

My first ALGOL program (or which I still program in today) did the exact same thing. That has sort of become my standard test to see if I can call a function and return a value. Just barely more interesting than "Hello, World". Here is an example: I'm new here, but maybe the first ALGOL program entered yet :)


    real a, b;
    file rem (kind = remote, units=characters);
    real procedure Pythag(a, b);
         value a, b;
         real a, b;
       if a > 0 and 
          b > 0 then
          Pythag := SQRT(a**2 + b**2);
    end Pythag;
    read(rem,<"Enter a and b (separated by a comma)",I5, I5>,a, b);
    display (String(Pythag(a, b),*));


[0] [2009-01-23 01:18:08] community_owned

Display the Mandelbrot set. I was actually the navigator to a friend of mine who knew Turbo Pascal (and had a computer at home). I still keep the printout :-)

[0] [2009-01-30 00:50:57] Noel Walters

A moon landing game for the Sinclair MK14 [1] Sinclair MK14

pseudocode algorithm:

initialize velocity, altitude, fuel-remaining, winning-altitude and fatal-velocity
output velocity, altitude and fuel-remaining
input thrust
input burn-duration
calculate new-velocity, altitude and fuel-remaining
if altitude > wining altitude and fuel-remaining > 0 then goto loop
if altitude < winning-altitude and velocity < fatal-velocity "you win" else "you lose"

As I recall It had to control each segment of the 8 digit 7 segment LED display independently.

I wrote the program on paper in 6502 machine code and entered it using the ROM based monitor program. The thing ran for about 90 minutes on one pp9 battery after which the program was lost and had to be re programed with a new battery.


[0] [2009-01-30 01:14:28] hover

Tribute to AD [1]


[0] [2009-01-30 01:17:46] taquito

lol besides "Hello, World!" I iterated the first thousand numbers of the Fibonacci Sequence.

[0] [2009-01-30 01:25:44] Randal Schwartz

The first code I wrote was in FOCAL, although I never ran it on a real computer. It nudged my dad into finding a place for me to program, which was in HP2000 Time Shared Basic. After reviewing the manual, I wrote a 100-line application to emulate a 4-function calculator, and it worked the first time. Yeay.