It is much easier to learn an interpreted language as the first language, IMAO, especially one that has decent support for working from the interpreter prompt directly. While I personally favor Scheme (esp. Dr Scheme), from what I've seen lately Python seems to be an excellent choice to start with. Perl (which does have an interpreter prompt mode, even if hardly anyone uses it) is a very desirable language, of course, but probably a bit hairy for a real beginner. You'll want to learn both C and Perl sooner or later, but I'd get something simpler under my belt first.
BTW, while you can become a decent programmer without them, you'll be a much better programmer if you learn Assemby language. The bad news is, the x86 assembly language is horrible; the good news is, there's a really excellent beginner's book on the market, Assembly Language Step by Step by jeff Duntemann. It is a good enough book that you could actually learn assembly as your first language from it, though I wouldn't advise that even so. It does expect you to use DOS for the first half of the book, though (the second half covers Linux programming; the DOS code should run under DOSEMU or WINE).
If you really want to get into programming in a big way, my recommended course of study would be:
- HTML, if you don't already know it. While not a programming language per se, it is much simpler to learn than a Turing-complete language and it will give you a feel for the way programs are structured, and it's a useful thing to know.
- A simple interpreted language such as Scheme, Python or Smalltalk. These have the advantage that you can practice writing small one or two line functions and test them all at the interpreter prompt, without having to write and compile whole programs at once. Also, it would give you a feel for some of the different styles of programming, which could help later on. However, they are quite different from Perl and C. One unusual possibility is that if you already use Emacs, you can learn eLISP, which gives you the advantage of using a familiar environment. You should learn how to call programs from the shell if the interpreter you're using let's you; in the case of Scheme, you may want to try using the compiler if there is one.
- Pascal or some other Wirth type language, if you think you can spare the time. If you learn one of these, it should make picking up C a little easier - if nothing else, you'll get used to using the compiler tools - but you can skip it if you don't want to bother. Either way, don't spend too much time here, just enough to get the basic ideas.
- Perl, at least the basics. Perl is a very complex language, borrowing widely from C, Lisp, and tcl, but you don't need to know all the details to use it, and writing quick-and-dirty programs in it is easy. You don't so much learn Perl as pick it up; you'll probably be using it for a lot of little things at the same time you are learning C.
- C, at last. While it is actually a simple and clean language - far simpler than Perl or Java - it has some definite quirks. Also, unlike the others, it is a compiled language, which means you'll have to learn about compiling and linking, make, etc., in addition to the language itself (not that it is difficult, but it does add a bit of work).
- Assembly language, at least the basics. While you probably will never do much asm programming, knowing about it can help you understand a lot of aspects of programming, esp. C programming and debugging. Also, a background in assembly is really useful if you need to link programs from different languages, for example, or need to do certain kinds of systems or graphics programming.
- Java or C++. I would recommend Java, as it is a much nicer language overall, but there's a lot of demand for C++.
- Perl, again, this time in greater depth. You'll be surprised how much more it all makes sense, now that you know C. Trust me on this.
|