Ten Lines Of Code That Changed My World
27 points by carlana
27 points by carlana
May I add my own:
OPEN "filename.txt" FOR BINARY AS #1
PRINT INT(LOF(1) / 5.1)
CLOSE #1
I was born in the early 80s. My father was a programmer then and would read Computer Weekly magazine. They'd have regular competitions to write simple programs, which would be marked for things like speed, complexity and accuracy. My father told me about a time the challenge was to write a word counter. He walked me through the basic ideas, like looping through characters and counting spaces. But what about the multiple spaces between paragraphs and hyphenated words? It wasn't as simple as it seemed. He was setting me up to appreciate the winner. No for loops, no exceptions, just divide the file size by 5.1, the average length of a word in the English language.
He really laid a seed in me with that story. How intriguing that, as long as the file wasn't too small, such a simple trick could compete on accuracy with more "correct" solutions. I saw that programming wasn't just a mechanical task but one of creativity, flair and surprise.
Mine was: FD 100
Me too! I started with the comic book series Secret Coders. It taught Logo with a bunch of plot mixed in. Super fun.
Using the name touch for a command that silently wipes out the content of existing files sounds like a very bad idea. The real touch command doesn't do that of course.
I always preferred outline to border for CSS debugging as it doesn't change the size of the box.
POKE 36879, __