Which Programming Language To Learn?

Click For Summary

Discussion Overview

The discussion revolves around selecting a programming language for self-study in preparation for a career in Software Engineering. Participants explore various languages, their benefits, and considerations for learning, including ease of access and cost of software.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • One participant expresses a desire to learn a programming language before returning to school, considering languages like Java, C++, and Python.
  • Another suggests Perl as an easy-to-learn and free option.
  • Some participants note that familiarity with C is beneficial as many languages derive from it.
  • There is a suggestion that C, C++, or Java are commonly used in engineering and research, while others advocate for Ruby or Python as better starting points.
  • Concerns are raised about learning bad habits from self-study, with a recommendation to avoid C or C++ initially.
  • Participants discuss the availability of free compilers and IDEs, with Eclipse and GCC mentioned as options.
  • One participant highlights Python's advantages, including its readability, built-in data structures, and ease of use for beginners.
  • Another participant emphasizes the importance of considering future programming courses when choosing a language.

Areas of Agreement / Disagreement

Participants do not reach a consensus on which programming language is the best to learn first, with multiple competing views on the suitability of languages like C, Python, Ruby, and Perl. The discussion remains unresolved regarding the optimal choice for beginners.

Contextual Notes

Participants mention various factors influencing their recommendations, including the potential for developing bad habits through self-learning and the importance of language features in relation to future learning. There are also discussions about the cost and availability of programming tools.

Who May Find This Useful

Individuals interested in pursuing Software Engineering or related fields, particularly those looking to self-learn programming languages before formal education.

  • #31
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 apparently 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.
 
Physics news on Phys.org
  • #32
Ok, well my next question is this: "Which is harder to learn: Python or Ruby?"
 
  • #33
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
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" . 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" .
 
Last edited by a moderator:
  • #35
Well, I still think my choice for a first language will be between Ruby and Python, depending on which one is more difficult.
 
  • #36
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
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
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
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
I would recommend learning a functional language like OCaml, Haskell or StandardML.
 
  • #42
vanesch said:
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
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
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
skeptic2 said:
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.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
801
  • · Replies 4 ·
Replies
4
Views
2K
Replies
86
Views
2K
  • · Replies 50 ·
2
Replies
50
Views
11K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
2
Views
3K