Learning your first programming language
singhrahul.com
singhrahul.com
Very simple minimalistic syntax, few concepts, few primitives, few keywords, dynamically-typed / garbage collected, variable arity, no real gotchas, good tool support, great speed, the ability to access a key in a hash either using bracket or dotted notation, and one of the best programming books for any language (PiL).
But it also scales well; closures, first-class / true anonymous functions, metatables / metamethods, nice simple API for talking between script and C, tail-call optimization, coroutines, short circuiting operators.
And, the path from Lua to JavaScript is very straightforward. In fact I'd say that mastery of Lua would make you a mid-level JS programmer right out of the box...
(I wish its syntax was a little less verbose, but that's why I use http://moonscript.org (like coffeescript for lua) right now, although the compiler has some rough edges and looks like it hasn't received much attention for awhile).
Still, personal experiences in using a language would always be different for different people. That's why i recommend asking other programmers for some advice, before jumping into programming for the very first time :)
Well, yes and no. I say no because, on Windows, C is not one of the easier languages to set up. I wouldn't recommend Visual Studio (or any IDE), and getting GCC on Windows (MingW or Cygwin or ???) and updating your PATH isn't obvious. And C compiler errors might be cryptic to a new programmer. And C pointers are tricky. Heck, even printf has its gotchas.
On the other hand, I would say that every programmer would benefit from learning C. If you learn C first then you'll have learned all of the above, and that's great. You'll have some understanding of how arrays are stored in memory, what a compiler does, how references work, etc, which are aspects that other languages hide from you.
For the record, I'd probably recommend Python. Python has a binary installer for Windows, it's lighter on syntax, and it has exceptional documentation. You can play around interactively in the interpreter, and it's a language that has a little bit of everything to try: scripting, objects/inheritance, (some) functional features, etc.
I know a few people who began programming with C (or C++) using TDM-GCC and after a couple of questions asking me about the command prompt they were good to go. To begin with just a gcc -o hello.exe hello.c is all that is needed and as you progress with learning the language the additional params are introduced.
As the command line on Windows is extremely simple I have found it easier to teach people how to use the command line than to switch to another browser. They only need to have a basic knowledge half a dozen commands, which can easily be written down, to get started. Also, and sorry if this seems insulting, if someone can't grok the idea of using cd to change a directory (and therefore under what a directory is) they probably are not going to be able to learn to program no matter what the language.
Here's a personal anecdote. My first exposure to programming was back in 2005. I was living in Tokyo and agreed to do a "language exchange" with a Japanese friend: I would help him with English, he would teach me Ruby. And so we began. We shared our frustrations; we coached each other through the rough spots; we offered up nuance and context for everything. He gave me the gift of instance_eval long before I could have figured it out on my own. I gave him the confidence to hit on foreign girls. Win-win.
The author is right to suggest new programmers should just dive in, without waiting to find the perfect teacher. That's fine. Do, don't wait. But if you do get the chance to study under someone's wing, take it!
But, sadly, it's not always easy to find such kind of teacher. I have met so many teachers in my life who only think about teaching as a job, and simply don't care about the students that much. Based on my experience, i have hardly found 5% of the teachers who are really good at what they do.
If you can't find such kind of teacher, it's best to start on your own :)