4 ms·
Ask HN: What is your first piece of code?
My first piece of code is printing triangle on screen.
- j_col 15y agoMaking 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 15y agoA 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 15y agoSo complex.
- kingofspain 15y agoI can't remember, but it would be whatever is the first listing in this: http://www.worldofspectrum.org/ZX81BasicProgramming/frontcvr.jpg http://www.worldofspectrum.org/ZX81BasicProgramming/frontcvr...
- Natsu 15y agoIt was some form of: 10 PRINT HELLO 20 GOTO 10 on an Apple ][ GS when I was ~6 years old.
- chris_dcosta 15y agoSomething similar on a Commodore PET at school. Aged 11ish.
- dholowiski 15y agoSame, on a TRS-80 when I was about 14.
- bromagosa 15y agoSame, on an MSX when I was 8 :P
- mikegirouard 15y agoDitto, except mine was in QBasic on a DOS box.
- kschua 15y agoINT 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
- mdoyle 15y agoOn the ZX Spectrum: 10 PRINT <something>; 20 GOTO 10 I was hooked from that point on. Brings back memories.
- dubya 15y agoMaybe 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.
- bartonfink 15y agoA "password" program in basic that sat in a loop checking input unless you typed in a hardcoded string. Not exactly production quality.