What language should I start with?
Here's another question I hear a lot: "If I'm just starting out in programming, what language should I be learning?"
You'll hear a lot of different answers to this question, many passionately defended. Every programmer has a favorite way to program, preferences among programming languages, and ideas about how best to learn this complicated subject. Having taught introductory programming using a variety of languages, though, I've arrived at what I think is truly the only right answer to the question.
Which is: it doesn't much matter.
I know that this answer will send many programmers and professors howling. For that matter, it will displease many authors of computer books. It seems like every year there is a course or book offering a new way to learn introductory programming, and no one wants to think that their innovations aren't making a real difference, but unfortunately I think that's the case. Let's take a little history lesson. A long time ago, when I was a lad with little more than a Vic-20 and a dream, you were supposed to learn programming with the BASIC language. In fact, it had been invented expressly as a "teaching" language, because it was thought that "real" programming languages of the time, like ALGOL and its derivatives, were just too darn complicated and scary for the novice. In the same era there was another language called LOGO, not so well remembered now, that was a rudimentary graphics language in which you moved an imaginary "turtle" around the screen, leaving a visible trail, using commands like FORWARD 30 and LEFT 90. That language was designed to introduce schoolchildren to programming.
Not long after that the world was introduced to Pascal. This language was another ALGOL derivative, but like BASIC and LOGO it was designed as a "teaching" language, just one that included most of the features of what was then called a "modern" programming language. For a while, Pascal was the dominant language used in introductory programming courses.
Then "object-oriented" programming came along. If you don't really know what that term means yet, that's okay, just know that Pascal was not object-oriented, but object-oriented programming seemed to be the way all programming was going, and it was thought that object-oriented programming would be easier for novices to understand. So then the object-oriented language C++ became popular in introductory courses. But C++, although straightforward enough at the beginner level, has some complications at the intermediate and advanced levels. Teachers started looking for a replacement, something that was "simple," or at least "simpler," while still being "modern." Now introductory programming courses were being offered in Java, Smalltalk, and a little later, Python, and a lot of other languages besides.
The point of this discursion is to show that throughout the brief history of computer programming, teachers have tried different introductory languages, believing that they had figured out a way to make programming easier. In the end, though, learning to program remains a difficult task, and the overall success rate appears to be unchanged. What makes the learning process easy or difficult is not the language, but rather the approach and the resources. If you take a course, for example, a good teacher makes a world of difference, but also how the course is structured, how much is asked of the student, how big a step in learning is required from one programming assignment to the next.
But how, then, do you choose which language to start with? Here are a couple of suggested approaches.
You could go down to a bookstore (yes, they still exist!) with a nice selection of introductory programming books and look for a book that you like. The key here is to look for the book you like, not so much the language you like. If the writer's style draws you in, and you can easily follow the text, you're more likely to stick with it. Of course, you want to make sure that whatever programming area you are choosing is something that you can get started on relatively easily. For example, if a book is teaching Web server programming, you'll have to set up a Web server, plug-in the files needed for the programming language to execute, link the server up to some development tools, and so on, so maybe you'd rather start with something easier to set up.
Another approach is to think about the kind of programming you want to do eventually, and then select a language that will start you in that direction. Again, though, I would avoid any situation that has a complicated setup procedure -- not because I think it's necessarily beyond the abilities of a beginner, but because it's a large hurdle that can slow initial progress to a crawl, and because the goal is to find out as quickly as possible how much you actually enjoy programming. Believe me, there are lots of people who really enjoy programming who don't enjoy setting up servers and installing development tools.
So here are some particular languages to consider.
I'm going to start with C++. Among other things, C++ is used in systems programming and in the creation of heavyweight games -- by that I mean the kind of games you would play on a console or PC and pay more than $20 for. Also, as a bonus, C++ is the language used in my book. Am I really going to recommend a language on that basis? To quote Phineas: "Yes. Yes I am." If you get into programming and find that you truly enjoy it, the next, most crucial step is learning to solve problems, and I honestly believe my book is a great way to do so, or wouldn't have written it. Anyway, if you want to learn C and C++ and don't want to shell out any cash yet, a good place to start is cprogramming.com. The site contains lots of good basic information about setting up a compiler, language syntax, and so on. There's also a section on C++ books for beginners. Another great resource is cplusplus.com. There's a forum there specifically for new programmers.
If you are interested in web application programming, from small websites up to large-scale enterprise web services, you might look at Java, a C++-derived language. As a bonus, Android applications are typically written in Java, if phone app development is an interest. There are lots of good Java resources freely available on the Internet. You might as well start here: docs.oracle.com/javase/tutorial/index.html. You have several choices when it comes to free Java development environments. Personally I like Eclipse, but believe me, opinions vary. My main advice, and this goes for every language, not just Java, is to remember that the goal is to get in there and start programming. At this stage, don't spend a lot of time worrying about whether or not you're getting the "best" development environment. If you can install it on your computer and figure out how to get it to work, that's good enough. Put a check in that box and move on.
If you think Windows business application programming might be your bag, you might look into Microsoft's C#, yet another C++-derived language. Knowledge of this language will also prepare you for developing on a Windows Phone. There are almost no owners of Windows Phones, which makes learning how to develop for them kind of pointless, but that breeds a lovable underdog mentality, sort of like Chicago Cubs fans. Seriously, though, if you'd like to start with C#, you'll want to start with the official Microsoft pages, such as: msdn.microsoft.com/en-us/vstudio/hh341490.aspx (if my history with Microsoft's site is any guide, expect this link to go dead in mere minutes). From there you can grab Visual Studio Express, the free version of their development suite (which is a good C++ environment, as well).
Guess what? Pascal still exists and is still a reasonable place to start. I haven't tried this development environment, but I hear good things about Free Pascal (www.freepascal.org).
There is also Python, an interpreted language that uses a variety of programming paradigms (if that expression doesn't mean anything to you yet, don't worry, it will). The language is primarily used for scripting, both on websites and elsewhere. Some undergraduate computer science programs have switched to Python as the introductory language, claiming, of course, that students are learning more, or learning easier. I don't buy it, but it's a good place to start as any. Check out wiki.python.org/moin/BeginnersGuide.
Another scripting language is PHP, although unlike Python, PHP is explicitly a web language, with code embedded in HTML pages. As such, I don't know that it's a great place to start if you're just trying to figure out how to program or whether you like programming, unless web programming is specifically what you want to do. If so, head over to php.net/manual/en/getting-started.php.
Okay, I'm going to stop here. There are lots of other languages to choose from, but I think you're best off picking one from the list above. Once you learn the basics of programming, you should explore other languages, and that includes the funky ones like Prolog or Haskell. But trying to figure out if you like programming with an oddball language like Prolog is like trying to decide how good a seafood restaurant is by ordering something off the "landlubber" menu.