

Ask HN: What is your first piece of code? - kalerzee

My first piece of code is printing triangle on screen.
======
madhouse
A jumping man, in C+4 BASIC: clear screen, draw an ASCII stick figure, for
loop to wait, clear screen, draw stick figure in different position, for loop
to wait, goto 10.

I still know it by heart, though it was written more than two decades ago.

~~~
kalerzee
So complex.

------
kingofspain
I can't remember, but it would be whatever is the first listing in this:
[http://www.worldofspectrum.org/ZX81BasicProgramming/frontcvr...](http://www.worldofspectrum.org/ZX81BasicProgramming/frontcvr.jpg)

------
dubya
Maybe not the first, but I remember typing the line

## REM TYPE "IS A FLASHY PERSON" IN INVERSE VIDEO

from a listing in the little manual that came with my Atari 800XL, before I
new what REM meant.

------
kschua
INT 20H

Got me started on programming way back in the mid 80s. Once I knew how to make
a program exit, I was more confident of writing more code

------
bartonfink
A "password" program in basic that sat in a loop checking input unless you
typed in a hardcoded string. Not exactly production quality.

------
j_col
Making a sprite of a balloon move across the screen of my Commodore 64 in
BASIC (the code came in the manual with the machine).

------
Natsu
It was some form of:

    
    
      10 PRINT HELLO
      20 GOTO 10
    

on an Apple ][ GS when I was ~6 years old.

~~~
chris_dcosta
Something similar on a Commodore PET at school. Aged 11ish.

------
mdoyle
On the ZX Spectrum:

10 PRINT <something>; 20 GOTO 10

I was hooked from that point on. Brings back memories.

