1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Which Programming Language To Learn?

  1. Jan 13, 2009 #1
    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!
     
  2. jcsd
  3. Jan 13, 2009 #2

    eri

    User Avatar

    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.
     
  4. Jan 13, 2009 #3
    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.
     
  5. Jan 13, 2009 #4

    j93

    User Avatar

    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.
     
  6. Jan 13, 2009 #5
    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?
     
  7. Jan 13, 2009 #6

    j93

    User Avatar

    A compiler and/or an IDE. Eclipse maybe as an IDE.
     
  8. Jan 13, 2009 #7
    What would a good compiler be? Also, how much do those cost?
     
  9. Jan 13, 2009 #8

    j93

    User Avatar

    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.
     
  10. Jan 14, 2009 #9
    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... :smile:
     
  11. Jan 14, 2009 #10
    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: Jan 14, 2009
  12. Jan 14, 2009 #11

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2015 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.
     
  13. Jan 14, 2009 #12
    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: Jan 14, 2009
  14. Jan 14, 2009 #13

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2015 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.
     
  15. Jan 14, 2009 #14
    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.
     
  16. Jan 14, 2009 #15
    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 Computer Engineering Degree and a Computer Science Degree.
     
  17. Jan 14, 2009 #16

    jambaugh

    User Avatar
    Science Advisor
    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.
    It is free to download:http://www.python.org

    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.
     
  18. Jan 14, 2009 #17

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2015 Award

    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.
     
  19. Jan 14, 2009 #18

    mgb_phys

    User Avatar
    Science Advisor
    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.
     
  20. Jan 14, 2009 #19

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2015 Award

    Agreed.

    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.
     
  21. Jan 14, 2009 #20

    mgb_phys

    User Avatar
    Science Advisor
    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!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?