# Which Programming Language To Learn?

I am currently wanting to go into Software Engineering. With that in mind I want to learn a programming language. I am planning to go back to school and major in either Computer Engineering or Computer Science (depending on which is closer to Software Engineering).

Before I go back next year, I am wanting to try and learn a programming language on my own. I feel it will definitely be beneficial to learn a programming language in the long run. There are many and some stand out more than others...such as Java, C++, Python, etc. I am not certain which language would be most beneficial. I realize in the end it would depend on where I get a job at and what they focus on...

Also, one of the course descriptions at the University of Arizona (where I am going) is as follows:

C SC 352 -- Systems Programming and Unix (3 units)
Description: Programming in C, including single and multi-dimensional arrays, lists, stacks, queues, trees, and bit manipulation. Unix topics, including debuggers, makefiles, shell programming, and other topics that support systems programming.

I am fairly ignorant in regards to programming language and I don't wish to break my wallet, so a programming language which doesn't require me to purchase expensive software would be helpful. Thank you for the advice!

eri
How about Perl? You can pick it up pretty easily, there are some good beginning Perl books out there, it's pretty universal, and it's free.

In what I have read it's a good one to learn. I understand that ultimately I will need to learn more than just one programming language. I have some familiarity with Java, but I don't know how much of what I learned in high school 4 years ago will come back. I also have some familiarity with Visual Basic, but same scenario. I have read that learning C is a good base as many programs "branch" out from C.

j93
C,C++, or Java with emphasis on C++. They are more commonly in use in engineering/research than Perl.

If you want to be hardcore Fortran or Assembly.

Well, since this is something I am wanting to learn on my own, I don't want to pick one too difficult. Does C require any additional software, etc?

j93
A compiler and/or an IDE. Eclipse maybe as an IDE.

What would a good compiler be? Also, how much do those cost?

j93
most are free. Most IDE include a compiler. The simplest thing to do is to download eclipse or another common IDE for C or whatever language you want to learn.

gcc contains many free compilers for C/C++/Java and so on. It's primarily Linux/Unix-based, but you can also get a free Unix-like environment for Windows, cygwin. It's not perfect, but it's certainly worth every penny...

most are free. Most IDE include a compiler. The simplest thing to do is to download eclipse or another common IDE for C or whatever language you want to learn.
So, Eclipse would have a compiler in it? Ah, so it looks like if I go with C I should get Eclipse for the IDE and GCC for the compiler...and then from there a good book for it. Does anyone have another language they think would be better for me or most beneficial? I am not sure what I want to do with it yet, but I think that a program that allows me to learn other programs easier would be best considering I would like to learn more later. I suppose what I am getting at is which language results in learning other languages easier (again, I don't want to kill myself in the process). Thanks again for the help.

Last edited:
Staff Emeritus
2019 Award
First, many people think a degree in CS is about learning as many programming languages as possible. Let's sweep that aside right away.

Second, be aware that learning to program on your own is almost certainly going to teach you some bad habits that you will have to unlearn. You'll gain experience, so I don't want to completely dissuade you from the idea, but be aware that there is a very real downside.

Because of this, I would not recommend C or C++. There's time enough to learn them later. You'll be learning abstractions of programming anyway, and when you need to check the syntax, that's what manuals are for. Same with Perl. Twenty years ago, I would have recommended Pascal, but it's getting quite dated. Today Python is not a bad choice, but I would seriously consider looking at Ruby.

First, many people think a degree in CS is about learning as many programming languages as possible. Let's sweep that aside right away.

Second, be aware that learning to program on your own is almost certainly going to teach you some bad habits that you will have to unlearn. You'll gain experience, so I don't want to completely dissuade you from the idea, but be aware that there is a very real downside.

Because of this, I would not recommend C or C++. There's time enough to learn them later. You'll be learning abstractions of programming anyway, and when you need to check the syntax, that's what manuals are for. Same with Perl. Twenty years ago, I would have recommended Pascal, but it's getting quite dated. Today Python is not a bad choice, but I would seriously consider looking at Ruby.
Thanks for the advice, and based off of what I seen regarding the University's CS program, it's not all about learning as many programming languages as possible. However, I do want to do this on my own and at the same time I feel it would be beneficial. I guess now I am back to square one. Places recommend Java, Perl, C, C++, and Ruby. I suppose I should flip a coin so to speak when choosing...but add weight to what has been discussed here so far.

Edit: If anyone has anything else to add, please let me know. I am determined to learn a language. If it helps I would like the language to be fairly easy to learn and to either not cost a lot, or to be free. Thanks again for any and all advice.

Last edited:
Staff Emeritus
2019 Award
As I mentioned before, my recommendation is Ruby. It's not particularly popular, but it is perhaps the one least likely to cause you to learn bad habits.

C++ is still lingua franca. C is an introduction to C++. It would always do you good to preview C. But if you are interested in getting a jump on things, check-out the first-year programming courses you will take. You'll find them in the skoolz course catalog under course requirements for software engineering.

As I mentioned before, my recommendation is Ruby. It's not particularly popular, but it is perhaps the one least likely to cause you to learn bad habits.
Why would I necessarily learn bad habits from picking up a book and attempting to learn other languages? Can you explain what these bad habits are?

Also, the University of Arizona offers a http://www.ece.arizona.edu/prospective-undergrads.php" [Broken].

Last edited by a moderator:
jambaugh
Gold Member
I suggest as a first language try Python.
• It is an interpreted language so you can run the program as a script and don't need to compile first.
• It is quite fast and efficient especially for an interpreted programming language.
• It has a very rich set of built in data structures.
• Its format "forces" readability and its error system makes it quite clear where you make a mistake. (This is by design.)
• It is an OOPL (object oriented programming language) having all the desired features of a modern programming language.
• There is a large package repository with extensions which allow many applications such as interacting with the internet, creating graphical interfaces, etc.
• There is a mechanism for incorporating compiled c or c++ functions.

Once you have some proficiency then I would suggest you learn c and/or c++.

I personally have programmed in BASIC, Fortran, Pascal, C, C++, Cobol (ugg!), Python, and some dabblings at assembly language. I find it best to work out the program in Python, get it running the way I want and then translating it to C++ when and if I need more speed. Usually I don't need that much speed and stick to Python.

Last edited by a moderator:
Staff Emeritus
2019 Award
Why would I necessarily learn bad habits from picking up a book and attempting to learn other languages?
Because you don't know any better. Learning to program and learning a programming language are two different - and perhaps even orthogonal skills. Given that, it's probably a good idea to avoid languages more likely to have you fall into that trap.

C++ is particularly bad, since it has many different ways of doing the same thing. You can write bad code that gives the expected result, which provides positive reinforcement.

jambaugh's suggestion of Python was also my first thought, which is why I suggested Ruby. Ruby is much like Python, and has all it's advantages, but is maybe a little easier for a beginner, as it has its own interactive environment. I'd argue that it's a little more "OO" than Python as well.

mgb_phys
Homework Helper
I would second Python (my favorite) or Ruby as a first language
Do take the C course they offer. Whatever language you use it is important to know 'C' to understand how the computer actually works. By knowing what is happening 'under the hood' you know the costs and consequences of higher level concepts in newer languages like Python. But I would certainly not try and learn c++ first (if at all)

As Vanadium said there is more to CS than programming. Some places deliberately teach using their own invented language or an obscure one such as modula-2 so that everyone starts from the same point and you aren't concerned with details of it's commercial use.
Avoid schools that just teach Java - they tend to be aimed at people that just want to go straight into a job.

Staff Emeritus
2019 Award
Avoid schools that just teach Java - they tend to be aimed at people that just want to go straight into a job.
Agreed.

Some places deliberately teach using their own invented language or an obscure one such as modula-2 so that everyone starts from the same point and you aren't concerned with details of it's commercial use.
MIT starts their students with Lisp. (Scheme, actually) It's not a bad choice for what they expect to teach, but it's also unfamiliar to most freshmen.

I think Python is a good choice - the reason it's not my first choice is that I think it suffers from not really knowing if it's a procedural language with some OO features or vice versa. It's neither fish nor fowl. Ruby is a little cleaner in this regard - it's OO that emulates procedural features. It's also intended for beginners.

mgb_phys
Homework Helper
I was going to add Lisp - but I was afraid of the wrath of the Lisp hackers if I described it as obscure! MIT have switched to python in 6.001

I agree about Python's lack of purity, but for a first language that could be a plus - you can type a single line and get a result. You don't need any "public static void main()" rubbish from Java.
Ruby is just as good, although some of it's built in variables are a bit Perl-ish.

There is a movement to teach kids Javascript as a replacement BASIC, it's built in to every machine (well browser) and you can see the results instantly.
I have a terrible feeling we will see the results of that in college in a few years!

Staff Emeritus
2019 Award
By the way, some languages have interactive web sites that let you explore the language. Here is the one for http://tryruby.hobix.com/" [Broken] (which I have not).

Last edited by a moderator:
I recommend Smalltalk, it's fully OO without all the compromises that have been mentioned with regards to Java, Ruby, Python, etc...

Staff Emeritus
2019 Award
I would not recommend Smalltalk as one's first computer language.

Because you don't know any better. Learning to program and learning a programming language are two different - and perhaps even orthogonal skills. Given that, it's probably a good idea to avoid languages more likely to have you fall into that trap.

C++ is particularly bad, since it has many different ways of doing the same thing. You can write bad code that gives the expected result, which provides positive reinforcement.

jambaugh's suggestion of Python was also my first thought, which is why I suggested Ruby. Ruby is much like Python, and has all it's advantages, but is maybe a little easier for a beginner, as it has its own interactive environment. I'd argue that it's a little more "OO" than Python as well.
Ok, so what I gather is that programs like C, C++, Java have multiple ways to arrive at the same program, whether it be from unnecessary code, or just bad code. However, if the end program works, because I am learning the program, I wouldn't know that I have made a mistake, thus thinking what I did was ok. Since, I am learning on my own, I wouldn't have a teacher there to point out the mistakes.

You are saying I should go with Python or Ruby because I would be less likely to form those bad habits, meaning the programs are in general easier to learn. How does Visual Basic stack up against Python, Ruby, C, C++, and Java?

mgb_phys
Homework Helper
The main problem with languages like C (and to a lesser extent C++,Java) is that you have to manage a lot of the details yourself.
Suppose you wanted to read a list of names from a text file, in Python or Ruby it would be as simple as
Code:
lines = open("sample.txt").readlines()
while in C it would take 10-20 lines of code and a lot of error checking.

When you are learning CS you should be more concerned with the algorithm or technique you are learning about than having to tell the computer where in memory to store each bit of data.

Last edited: