How long did it take you to reach your "ah-ha" moment when you first learned how to program? And how/what did you get to that point?
P.S. Would love to hear some exercises you did to apply what you were learning.
For the next few years, I played around with C+4 basic, didn't do anything serious. But in 1991, we got our first PC, and I tried to port the stuff I wrote on the C+4 to gwbasic, and later QBasic, but didn't succeed. So I dropped basic, and tried Turbo Pascal. That was my second ah-ha moment, when I discovered its help.
By 1998, I was reasonably fluent in Pascal and 386 assembly, but then my harddrive crashed, and I lost everything I wrote and collected since '91. That's when I installed Linux, and started to poke around with Perl (we had internet at school, and it was full of perl scripts. I choose perl because that's what I found the most resources for), and I discovered regular expressions: third ah-ha moment.
The fourth ah-ha moment was when I started to play with esoteric languages, which in turn resulted in learning a couple of other, real and interesting languages aswell. And then I realised that hey, I can program! And I don't care what the language is, once I knew a few, I could very easily learn another!
That moment was when it dawned on me, that programming is something much deeper, and something much more than simply writing code in one's language of choice.
And then I found the "Learn You a Haskell for Great Good" book, and when I finished it, I was enlightened.
It's all available online currently here: http://learnyouahaskell.com/chapters
Hmm if I try real hard I can probably recreate it here: 169 0 141 15 144 169 1 141 15 144 76 0 32
Anyway, when I got home, I tried it out. It changes the screen color, but then crashed because of a mistake in the loop instruction.
That was definitely an AHA moment - realizing how CPU's work.
My other was after my first year of college at University of Minnesota (99-00). I had AP comp sci AB so I didn't need to take the first year intro CS classes, but I hung out at the ACM a lot and someone told me about quick-sort or I learned it in class and it was the most complex intricate piece of code I'd ever seen. I was mesmerized by it, but everyone else just bitched about how "crazy" it was. That's when I knew I was in the right major.
I guess a third one would be when every one I knew that was into computers changed their major because it was too hard and I was the only one left. That was a bit of an ah-ha moment I guess.
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.
I suspect that this is the most important learning moment - what is it in programming that excites you? (probably won't be this article :)
Not quite sure actually. I've always been fascinated with computers and the web from a young age. And I've gotten to a point where I have (at least what I'd like to think of as) great ideas and not being able to program is what's been "holding me back" from executing them. So, I bit the bullet and decided to start learning how to program.
After that moment I started looking for ways to do what 'I' wanted the computer to do instead of just what I was told the computer could do... and was then happily exploring stuff beyond what the teachers knew (which was not too much either, back then).
De-bugging makes you think like a programmer. I can now look at code of a language I do not know and find where the error is by 'gestalt'
Props to taking a VIC20 manual on vacation to Spain. Serious nerd street cred :)
You can self teach yourself alot by learning as you go, but until I took the time to specifically study data structures I hadn't made it over the hump, my 'ah-ha' moment so to speak.
Can you recommend a good source on learning data structures?
Mathematics and programming are similar in so many regards. No reason to confuse people like this.