Which Programming Language To Learn?

  • Thread starter Ithryndil
  • Start date
  • #26
142
0
Alright, well like I said, I need to figure out which route from the college to take. In the end my goal is Software Engineering so I need to find out which path is best for that field, whether it be CE or CS at the University of Arizona. However, I am not going back to school until Spring of 2010, so I figured this would be a good way to occupy some of my free time while benefiting me on the long run. Alright, well I think I will go with either Python or Ruby...now to figure out which one.
 
  • #28
142
0
I am prepared to buy a book for either programming language to help me out. While I am learning on my own, I would like to do the best learning I can...and feel a good book would help out.
 
  • #29
mgb_phys
Science Advisor
Homework Helper
7,774
13
O'Reilly, Apress and Pragmatic Programmers all do excellent books on both languages.
The two free books I mentioned above are also available in dead tree form.

But both Ruby and Python work very well with a "type code and try things" approach.
 
  • #30
225
0
If you want to do software engineering...then you will definitely want to be a CS major rather than an ECE major at the UA.

Be aware that the Computer Science curriculum while consisting of various programming languages throughout is based primarily on the science of computers (data structures, algorithm analysis, etc), which does include a good deal of mathematics, and is not specific towards a particular language. You will learn Java during your introduction to programming class and OO class there at the UA, then you will take higher level classes in which you are almost always using C.

The UA also offers a comparative languages class which goes over various paradigms within programming and currently I think one of the languages they use is in there is Ruby.

I would recommend you also disregard that advice that you will develop bad habits if you learn from a book...if that's how you want to learn then you should by all means learn it that way.

As far as first languages are concerned, all the ones mentioned are decent enough...just flip a coin and then learn it.
 
  • #31
f95toli
Science Advisor
Gold Member
3,058
556
I always recommend Ada as a first language, it FORCES you to develop good habits but is at the same time quite easy to learn. It was used in programming courses at my university (although that was 13 years ago).
It is also a very robust language (there is a good reason for why it is still often used to write software for e.g control systems for aircraft).

However, it is not a very "fun" language and I would not really recommend it for any real world applications unless you are writing "critical" software (or have to use it because it is the standard language in your field, it is apparantly still used in the military and by various defence contractors).

Also, note that once you've learned one language you can easily learn another in just a few days; I am not a very good programmer but by know I must have learned to write "useful" pieces of code in about 10 languages or so, although at the moment I seem to be using Python most of the time.
 
  • #32
142
0
Ok, well my next question is this: "Which is harder to learn: Python or Ruby?"
 
  • #33
227
0
I started with python and i didnt like it too much and just went to c++ and have been at it for a while now, I picked up a great book when i started which i could send you in a pdf, it is a university professor teaching an introductory c++ class to students but he documented it basically and wrote it in a book. Itll make you understand just about everything when it come to the basics from basic variables, to loops, functions, procedures, arrays, and and pointers. pm me if your interested.
 
  • #34
jgg
40
0
I also am waiting to enter college, albeit not for software engineering. However, I'm learning Scheme, and it is a fun language to use (I have also used Python and even C++ for a short time). Python is easy to use, however, if you wish to learn more about the fundamentals of programming, I would suggest reading Structure and Interpretation of Computer Programs, available http://mitpress.mit.edu/sicp/full-text/book/book.html" [Broken]. This is based on Scheme, but there are books like it dealing with Python. Again, I'm partial to Scheme, so someone might be able to point out a better book in another language. I hear that How to Think Like a Computer Scientist is good for Python users, but I have never read it myself.Then again, this book looks at (from what I can tell) the fundamentals of Computer Science, so I'm not sure if this would help you or not. Specifically, I'm not sure if this book alone is enough allow one to avoid the bad programming practices Vanadium 50 mentioned.

I don't have a degree in Computer Science, so if I've said anything that would be detrimental to the correct way to learn software engineering, please let me know. I only took the advice I found http://norvig.com/21-days.html" [Broken].
 
Last edited by a moderator:
  • #35
142
0
Well, I still think my choice for a first language will be between Ruby and Python, depending on which one is more difficult.
 
  • #36
Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
2019 Award
25,703
8,892
While it's true what f95toli says about Ada, it's also true that Ada is a procedural language, and the trend is away from purely procedural languages. Yes, Ada 95 adds OO extensions, and I'll even say that they have done a better job than some with that, but this kind of after the fact grafting is never really clean. I'd level the same criticism at C++, by the way, the language I do most of my coding in.

As far as whether Python or Ruby is easiest, I'd try the browser-based demos I linked to above and make up your own mind. The Ruby one has a very nice tutorial; I haven't run the Python one.
 
  • #37
142
0
Yeah, the Ruby one does have a nice tutorial, but I think in the end Python looks a little more challenging from what I have read here and elsewhere. I have also read a bit from Think Python. With that in mind, I am going to go after Python...and if for whatever reason it proves to be too challenging, then I will give Ruby a go. Thanks for the advice!
 
  • #38
I would say C, Fortran, or Python. Stay away from Visual Basic (I learn it and I haven't use it since. ._.) and JAVA isn't too use that often (due to its structure and how you need packages for everything).

My best recommendation would be C/C++, just because that seems to be the prevailing language. (Fortran if you want to do research or higher level, Python...well that would be my friend's suggestion and he's been bugging me for some time about it))
 
  • #39
mgb_phys
Science Advisor
Homework Helper
7,774
13
C++ is possibly the most common used language (although Java/C# might have overtaken it).
But it is a bad language to start with. C++ is very complex and to use it properly you have to use a number of complex features (templates, boost, streams, exceptions etc).
Because of this a lot of intro books mix in C features when teaching C++ (almost all of C is allowed in C++ code). This leads to a lot of production code that is a nasty mixture of the worst features of both and is the reason for the 'learning bad habits' quote above.

There is a new learning C++ book by the create of the language (Bjarne Stroustrup) which might be better - but that it is a 1200page introduction text suggests it is too complex a task.
The other drawback with C++ (and Java) is that a lot of boiler plate code is required for even the simplest program - it is frustrating to have to start learning anything by adding 10 lines of 'magic stuff you aren't supposed to understand'
 
  • #40
vanesch
Staff Emeritus
Science Advisor
Gold Member
5,028
16
Actually, I would think that what language you want to learn, and in fact even what style of programming you want to learn, depends also on what kind of applications you have in mind. If you are going to work anywhere near the hardware, I think that C is unavoidable, as you are close to the machine. If you are going to combine a computer and an oscilloscope, go for C.

For instance, I regularly combine hardware programming and software, and then I'm with VHDL for the hardware, and C for the software. If you design your own processor in VHDL, then it seems pretty logical to program it in a language which is close to it, such as C.

However, I suppose that if you are further away from the hardware, then probably the advice here is good - but I don't touch upon these fields, so I wouldn't know.
 
  • #41
DavidSnider
Gold Member
495
137
I would recommend learning a functional language like OCaml, Haskell or StandardML.
 
  • #42
mgb_phys
Science Advisor
Homework Helper
7,774
13
depends also on what kind of applications you have in mind.
The OP was heading to college and wanted to learn a FIRST programming language in order to learn CS - which is a very different question from what is the best language for X.

I think that C is unavoidable, as you are close to the machine.
In most people's opinion you can't be a good programmer if you don't know C at some level.
Even if you are using a modern garbage collected high level language - you have to understand why asking for a new tiny bit of memory many times inside a loop is a bad idea.
 
  • #43
142
0
Just to be clear, I have until the Spring of 2010 until I head back. While I don't like the idea of taking this year off, I feel it is necessary at this time. So, the motivation during this time is to learn something which will at least be beneficial to me and to the career path I plan on heading into. I would much rather do that during my time away from school than just taking it easy. I do understand that CS isn't all about learning as many programming languages as possible, and that's not my goal here. Also, I really have no idea in regards to what applications to program...hopefully this will give me some idea.
 
  • #44
1,762
59
What are the factors that determine which programming language to use? Is it strictly a matter of using the same language that the other programmers use or are there specific attributes that make one language more appropriate for a job than others?
 
  • #45
mgb_phys
Science Advisor
Homework Helper
7,774
13
What are the factors that determine which programming language to use?
Often your language choice is fixed because there is existing code, libraries and in-house skills that make switching very expensive.

Is it strictly a matter of using the same language that the other programmers use or are there specific attributes that make one language more appropriate for a job than others?
Both - you can't arrive at Microsoft on day one and announce that Windows should be re-written in C# because it's better!
That's why so many of the new languages (Python/Ruby/Php) got their start on the web. Since the web projects are often new and being written from scratch there is no reason to use Cobol because your existing accounts package does. The flip side of this is programmers doing projects in order to learn the new cool language rather than the most suitable.

The other area of new language use is scripts, since they are written by one person for their own use nobody else needs to know what they are written in - so Python/Tcl/Perl/Awk etc crept in 'under the radar'.

There are some tasks that need the features of a specialist language and if you work in that area you are going to have to learn the language. You could argue that SQL is such, perhaps Erlang for telecoms or ADA for defence.

Othertimes the platform forces the choice, if you are working on an embedded uC with 64K memory you are going to be using C (if you're lucky), if it's in a web browser probably Javascript.
 

Related Threads on Which Programming Language To Learn?

Replies
7
Views
6K
  • Last Post
Replies
15
Views
4K
Replies
14
Views
3K
  • Last Post
Replies
12
Views
4K
Replies
15
Views
11K
Replies
20
Views
10K
Replies
27
Views
14K
  • Last Post
3
Replies
50
Views
8K
  • Last Post
Replies
13
Views
2K
Top