Ask HN: What is your first piece of code? 4 points by kalerzee 14y ago ↗ HN My first piece of code is printing triangle on screen.
[–] j_col 14y ago ↗ 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).
[–] madhouse 14y ago ↗ 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 14y ago ↗ So complex.
[–] kingofspain 14y ago ↗ I can't remember, but it would be whatever is the first listing in this: http://www.worldofspectrum.org/ZX81BasicProgramming/frontcvr...
[–] Natsu 14y ago ↗ It was some form of: 10 PRINT HELLO 20 GOTO 10 on an Apple ][ GS when I was ~6 years old. [–] chris_dcosta 14y ago ↗ Something similar on a Commodore PET at school. Aged 11ish. [–] dholowiski 14y ago ↗ Same, on a TRS-80 when I was about 14. [–] bromagosa 14y ago ↗ Same, on an MSX when I was 8 :P [–] mikegirouard 14y ago ↗ Ditto, except mine was in QBasic on a DOS box.
[–] kschua 14y ago ↗ INT 20HGot 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
[–] mdoyle 14y ago ↗ On the ZX Spectrum:10 PRINT <something>; 20 GOTO 10I was hooked from that point on. Brings back memories.
[–] dubya 14y ago ↗ Maybe not the first, but I remember typing the line## REM TYPE "IS A FLASHY PERSON" IN INVERSE VIDEOfrom a listing in the little manual that came with my Atari 800XL, before I new what REM meant.
[–] bartonfink 14y ago ↗ A "password" program in basic that sat in a loop checking input unless you typed in a hardcoded string. Not exactly production quality.
13 comments
[ 10.3 ms ] story [ 39.3 ms ] threadI still know it by heart, though it was written more than two decades ago.
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
10 PRINT <something>; 20 GOTO 10
I was hooked from that point on. Brings back memories.
## 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.