Skip to content

Comment on Ask HN: When was your "ah-ha" moment when learning how to program?

Comments

I taught myself GWBasic on an old computer, and wrote awful spaghetti code. I actually wrote a game where every map square had twelve lines of code "Print '....XX...X....X'" that would together print what that piece of the world map looked like. The allowed line numbers went up to 65,535, and as I was planning the game I planned out how I would use all of them.

Then I learned Pascal, in high school, and learned basic things like procedures and local variables. With that, I learned that you should never have to do anything more than once. Everything I subsequently learned was basically technique for following this rule.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.