Boggles my mind when coders don't save everything they've ever written. It's easy to be a digital pack-rat without much consequence. That said, my first Java 1.02 programs from the 90's still compile and the old jars run surprisingly well too. Color me impressed!
It was quite different before the internet. I'm still holding out hope of finding some of my old BASIC programs from the 80s on a 5¼-inch floppy disk in my parents' basement. But they are probably gone.
Even before GitHub, probably. Dropbox was a big step forward, still.