I am going to uni in October to do and engineering degree and I have the whole summer now. So I was thinking of learning a new programming language. I don't know what language to learn though. I have some suggestions but they might be completely inadequate. Here they go:
C
Perl
Lisp
Python
FORTRAN

As far as I know FORTRAN is used in computational programming. I don't know much about the others. I tried reading wikipedia but it explains it with terms I don't know. Anyway, I need to make an important decision. I have approximately 3 months with perhaps several hours a day. I will most likely learn several of those but I don't want to learn something which is not used anymore. I also want to do this so that I will be able to write scripts and understand Linux/Unix configuration files better.

PS please feel free to add any other language you think is more appropriate than the ones listed above. As I said I am completely new to programming.

C is used a lot, but I've heard good things about Lisp. FORTRAN is ancient and Python is an interpreted language(this means changes may be examined by merely running the program) that may be compiled to bytecode(meaning it can be run with a lesser performance penalty).

Though, you say "new" programming language. You should pick one that compliments your current knowledge - for example, if you know C++, you should learn C. Python would probably be a nice addition to Java. I know nothing about the other two.

Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.

As for which language is best, people of course have many different opinions. The sentiment I've often heard as of late, and which I think I agree with, is that Python is pretty good if you haven't programmed before.

If you just want a good easy language to learn, you probably want to stop here and give Python a go. I'm going to keep writing, though.

Perl was kind of the de facto standard scripting language on UNIX systems in the past, and still has a lot of use although it seems Python's taken its prior place.

I think FORTRAN is for pretty specialized usages, but depending on what kind of engineering you're doing, it may be important. It's a bit down the charts, ranking at 22.

Lisp is cool, but is not really used very often in the field. There are some exceptions (and I know NASA has used Lisp for a few things), and it's good to learn if you want to try programming a little differently and if you want to better understand how to customize emacs. Outside that, not really recommended if your objective is to use it professionally.

C is the granddaddy of the bunch, and is still widely used despite many people thinking it needs to die a painful death. If your engineering degree has a strong software focus, you'll eventually want to learn it. C and C++ are my personal languages of choice.

For an engineering student, I would recommend C to start with. There's enough to learn with C before jumping into C++. For Fortran, there is a business Fortran and a scientific Fortran. Scientific is used for dealing with very big or small numbers (ie. in a nuclear plant, for instance ).

KOTAPAKA wrote:So I think I will start with Python and then go to C. Do those two match each other?

Nope, but they're different in a good way. Python is object oriented, and C is not; C gets compiled into an executable, but Python is (primarily? always?) an interpreted language.

I always say two things in answer to this question:

(1) You need to learn programming more than any particular language. Pick up a good book on data structures and algorithms (eg, Niklaus Wirth's), in addition to whatever How to program in X book you buy.
(2) Try Perl. It rocks hard.

But what can I write in Perl? Can I write a small program for Unix users? Can I write a small program for me? I mean I know Perl is used in conjunction with PHP in web programming.
I will obviously learn C and probably Perl but is it reasonable to start with them provided I have done no programming apart from some Pascal about 2 years ago (and I don't remember much). Please suggest a learning path.

Perl excels at any kind of text wrangling, but it's good for lots of other things. Obviously its strength in text-manipulation makes Perl good for the web and small sys-admin scripts, but it is also useful for larger utilities (like ack a drop-in replacement for grep) or tools (like svk a revision control tool to work with subversion repositories). It's a misconception that Perl is only good for 10-100 line scripts.

I'm advocating for Perl because I love it, but again I don't really think which language you start with is the biggest deal. Try to learn as much as you can about programming period - the details of the individual language are less important.

What about VB.net? I mean I still don't know what language to start with? If I start with Perl directly wouldn't it be too hard? I think I have a solution. I will start learning the following languages in order:
1. Python
2. C
3. C++
4. Perl

Telemachus wrote:(1) You need to learn programming more than any particular language.

I agree completely. This is why I usually recommend starting with a simpler language. I used SmallTalk (via HyperCard) and Basic (via REALbasic) for many years before ever using C, and the general programming skills I learned there have transferred over very well to C, C++, Python and several others, even though the languages are very different.

While C and C++ are "the biggies", I really don't recommend learning them as your first language. My feeling is that it's very easy to get bogged down with the specifics of the language rather than the logic of the programming. I'd recommend Python or perhaps even SmallTalk (I've been meaning to give Squeak a try myself).

Telemachus wrote:I'm advocating for Perl because I love it, but again I don't really think which language you start with is the biggest deal. Try to learn as much as you can about programming period - the details of the individual language are less important.

I love Perl too, but you don't really "learn" Perl so much as you absorb the parts that are useful to you. It's too big to learn it all, but it's easy to pick up enough to do what you want.

I use it for systems administration/automation and web stuff. I didn't really get around to learning it until I really had a NEED for it. I wanted to do more advanced scripting, and I just don't get BASH script, no matter how hard I try.

I guess my point is Perl is a very useful tool, but I don't think it's the best way to learn programming.

If I had to do it over, I might do C then Python (or vice versa). Maybe C++ after that.