An Interest In:
Web News this Week
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
What's the oldest code you have?
Some time ago a friend sent me a backup of our code from when we were starting to learn pascal. It was very nice to see some of my first attempts at programming.
This one is from November of 2004, it's not the first thing I coded but it's the oldest backup I have:
program cor;uses crt;var x,y :byte;i:byte;BEGIN randomize; repeat y:=random(45); if y = 0 then begin y:=1 end; repeat x:=random(80); until x <> 0; i:=random(10); gotoxy(x,y); textcolor(i); write(''); until keypressedEND.
It's a small loop to print small colored blocks in the console ("cor" means "color" in portuguese); It's written in pascal to run in DOS and looks like this running in DOSBox:
I created a gist with all my old sources sources so I don't lose them again. No indenting as I wasn't even aware of what this "indenting" thing was.
Looks like I was pretty "visual" when I started learning, creating small samples to work with colors in DOS and trying to make small games like this small (and broken) Tower of Hanoi implementation (I named it with an "Y" in the original file), it's probably the first game I tried to code:
What about you? What's the oldest thing you have stored or remember you did?
Original Link: https://dev.to/rogerzanoni/what-s-the-oldest-code-you-have-stored-4gk2
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To