2. Go to 1.
I'm not being a dick. That's actually the best way to learn. You can read books (and certainly will while doing number 1) but if you don't actually take the time to sit down and build something, you'll never get a good enough feel for how to program.
Once you've iterated that loop a couple of times, you'll realize you've done it all wrong. But that's what learning is all about.
Step 2. Read some tutorials on the net to expand your knowledge. Investigate open source programs like BeautifulSoup. Use open source stuff to build toy programs with (e.g. RSS reader or screenscraper).
Step 3. Implement a project of moderate complexity, while reading more advanced books, and browsing Python blogs to get a broader understanding of how things work.
I assume this process would work for Ruby or PHP, but I think Python is the perfect language for learners.
I learned Scheme first, but I think Python is an equally great starting language. In fact, I would be very curious to hear everyone's opinions on Python vs. Scheme as a starting language...preferably without having your standard language flamewar. I know about the MIT switch to the Zelle book and their reasoning. What are some other pros and cons? I still lean towards Scheme a bit, because I think the functional approach to problem-solving can be more powerful...at least it was more eye-opening to me. (But, then, I'm not a person that was especially gifted at mathematics.) Ideas?
If someone just wants to see results ASAP, if they see programming as some annoyance to get out of the way in order to get stuff done, give them Python (as a bonus, it may change their minds and get them in love with programming). For those with more curiosity, who want to get a deep understanding of things in general, or for those with a deeper interest in programming in particular, I would try Scheme first.
This is not to say that Python and Scheme are opposite extremes in terms of practicality and ability to enlighten. Both languages are pretty good at both IMO. You can't go very wrong with either.
If it is a webapp I recommend learning JavaScript, for that you will have to learn HTML and CSS before you start writing JavaScript code.
What you really have to do is to pick a simple programming language and start coding with it. For me, the way to learn programming is by creating code, first pick your programming language, then start reading about it, be sure to start with a simple book or tutorial, don't look for advanced books.
What I'm saying is: Read a lot, code a lot, and have fun!
Good Luck.
You should go with Python, the syntax is really easy and the code it produces is sexy.
To get you started right away, figure out what and how this does:
for i in range(5): print i
12345
It's quite arbitrary that what you see is different, and while there is some rationale to it, it's not very enlightening. Definitely not the kind of thing I'd have a newcomer focus on.You should go with Python, the syntax is really easy and the code it produces is sexy.
To get you started right away, figure out what and how this does:
for i in range(5):