For some reason, probably because I was a tiny kid learning a new thing, this tedious task was so much fun. And that's how I learned my first programming language. Never opened a single tut or instructional book.
They never worked worked first time as I'd invariably mistyped various characters, but the subsequent bug finding taught me about how the code worked.
The bonus was you got a playable game at the end of it.
My very first programming class was Java and I had no experience prior.
I felt so alive writing every character and every line. I was too excited to read the paragraphs of description in the textbook because the code told most of the story anyway. I could look at it, read it and mostly understand it, then retype each character at a time and watch it work. Once it worked, I varied small things. Anything I could improve. Sometimes the goal was to make it as condensed as possible, sometimes it was to try to make it simpler to read, or to adapt a method for ints to also work on floats, or to add parameters making the code even more flexible. Kid in a candy store mentality fits perfect.
I did this for almost every example in the book, even ones we didn't cover in class, a few hundred in total.
It's very hard to learn how the code you're using works when all you've done is copy and paste it.