Getting oriented

The first thing to do is read our ProgrammingFaq. Most of the questions and answers should be understandable to someone with no programming experience, but you might want to skip for now any that are too technical. Now you'll be ready for the big decision of choosing...

Your first programming language

There is anything but agreement among programmers about what the "best" first programming language to learn is. Here we list some common ones, along with information on their supporters' reasons for using them and some links to good learning material.

Ruby

Ruby is a dynamic, object oriented language Official Ruby homepage. While Ruby has been around for about 10 years now, it has recently become very popular due to the success of the Ruby on Rails web programming framework based on the language.

There are two excellent resources for learning to program in Ruby. Both assume little or no programming background: Learn to Program by Chris Pine and Why's Poignant Guide to Ruby by a very talented fellow who goes by the strange monicker Why the lucky stiff. The latter is available for free and is quite fun.

Python

Traditional "first programming languages" are ImperativeLanguages. They've always been the most popular overall. Choices like BasicLanguage and PascalLanguage, both created for educational purposes, have been popular in the past. A lot of schools still use these in their first programming classes. However, the Internet coder community generally looks down on these. They're both decades old. BasicLanguage is given as the usual example of a language so bad that you will harm yourself by learning it first.

So what modern language steps up to take their places? A lot of people think it's PythonLanguage. It lets you do a lot of things easily in quite clean ways. (Of course, "cleanness" is relative. See below for first language suggestions from people who have a different idea of it.) It has a very large user community that's quite willing to help you learn it.

You can start learning at the Python for Beginners page at python.org. This site contains lots of great resources, including two book-length documents that teach you programming (with focus on Python) from the ground up, How to Think Like a Computer Scientist and Learning to Program.

Scheme

Obviously, many fans of FunctionalLanguages have corresponding first language recommendations. The most popular one is SchemeLanguage. Many of the top ComputerScience universities use Scheme in early programming classes. It is a very cleanly designed language and well-geared towards the kind of mathematical thinking about programming that computer scientists tend to recommend. Why not develop good habits from the beginning?

Another advantage is the ready availability of popular textbooks on Scheme for beginners for free on the web. These include How to Design Programs and The Structure and Interpretation of Computer Programs (with video lectures). Another popular web tutorial is Teach Yourself Scheme in Fixnum Days, though it assumes a bit of prior programming knowledge.

Haskell

SchemeLanguage is one of the DynamicallyTypedLanguages. There are also many popular StaticallyTypedLanguages that are also FunctionalLanguages, such as HaskellLanguage. One basic summary of what this difference means is that HaskellLanguage is much more strict about the kinds of programs you can write, in a way that will help you avoid many common kinds of errors and help a compiler produce more efficient programs.

HaskellLanguage takes the mathematical mindset given above in support of SchemeLanguage to the extreme: a HaskellLanguage program is nothing but a mathematical expression to be simplified. To people unfamiliar with FunctionalLanguages, this may sound confusing and counterintuitive. However, many of us think that this is actually a much simpler and more powerful way to write programs. It makes understanding how your programs work much easier. People who learn ImperativeLanguages first often have a hard time adjusting to FunctionalLanguages, but we think that learning HaskellLanguage or MlLanguage first should not be any harder than learning to program in ImperativeLanguages well, and that it will leave you better prepared for all kinds of programming.

There is a Learning Haskell page at haskell.org. It has links to many tutorials and references. You can also find an excellent online Haskell book for beginners, Two Dozen Short Lessons in Haskell. In addition there is a list of resources on our own HaskellLanguage page.

C and C++

C and C++ are easily the most debatable choices for beginners, and there are valid reasons for either choice of whether or not to learn them first. On one side, C and C++ allow for the introduction of insanely challenging to locate problems, and you may not find intuitive some of their features that allow uncontrolled access to memory. However, C++ adds a number of high level constructs and library code that can be used to avoid dealing with memory in most situations. Another positive to C++ is that it is currently (and I stress the word "currently") the "industry standard," meaning that it is used in most professional environments. That means that there is generally more documentation about it and more people who know a lot about it. However, all of this could change at any time, and make this paragraph (or even the entire page) inaccurate, so that makes it even harder to tell you for sure whether C and C++ are viable options.

See CPlusPlusForBeginners for debate on this subject.

Others

Starting to learn

In order to actually learn the language you have chosen, the following process is recommended:

Be prepared to write a lot of code. Code every day, whether you like it or not. Aim to write at least a million lines of code in your life time. And remember, whatever code you write, don't ever delete them or throw them away. Keep them so that years later you could clearly see your improvements. :-)

The "read code" step can be skipped if it's really too hard, but reading documentation and writing code are the two essential steps.

Getting help along the way

We're here to help you at any step in your programming education! However, if we're going to help you, you have to follow some simple guidelines. We think most people who will help you on the Internet will also appreciate these as well. Don't ask for personal help as a substitute for actually reading a good source of information on a language. This holds both for new programmers, for reading the books or tutorials that are teaching them their first languages; and for experienced programmers, for checking the online documentation of the tools they use before asking about them. A common reply you may get for a very basic question is RTFM, for "Read The Fine Manual." (Well, some people may use a more disrespectful word than Fine. :) ) This is a reminder for you to make sure you don't already have the information you've asked for, probably written out in a clearer form than someone could come up with on the spot.

Of course, the first place to look for information is on this Wiki site. You should see search boxes that you can use at the bottom of every page. If you don't find anything there, then drop by our IrcChannel at any time of day for real time chat. We actually hope that you'll choose to hang around in our channel whenever you're online. This gives you a chance to learn by seeing other questions and answers and perhaps answering others' questions. It's also a good opportunity to make some new friends. Being around a group of others who are truly interested in learning the same things you are will be very helpful in your quest!

Thankfully, there are many more places to get programming help on the Internet than those that we run. The FreeNode IRC network where we have our chat channel also has popular channels for all of the languages recommended here. You can check out the channel for any programming language by adding a # to the beginning of its name and joining that channel. For instance, there are #python, #scheme, and #haskell channels. The Open Directory, a categorized web link directory maintained quite well by volunteers, has a Programming category that can serve as a starting point in exploring what is available on the web. There's always the almighty Google, of course. Asking a question that is found easily by a web search is a sure way to annoy people here!

If you are still uncomfortable with searching for information yourself, then read TheZenOfSearch.

LearnProgramming (last edited 2008-07-09 05:47:45 by localhost)