LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Python, Java, or Ruby? (https://www.linuxquestions.org/questions/programming-9/python-java-or-ruby-631159/)

Doctorzongo 03-27-2008 10:11 PM

Python, Java, or Ruby?
 
Hey guys -- what is your opinion in which I should learn next: Python, Java, or Ruby?


What are the pros and cons of all three?

Thanks.

sundialsvcs 03-27-2008 11:02 PM

My answer to that question would simply be that ... you need to become a student of programming languages. Python, Java, Ruby, PHP, and Perl should all be subjects of your study. Most likely you will find that all of them are now available (or can easily be installed) on your Linux box.

To "learn a language" these days you do not need to start from scratch, nor do you particularly need to write a lot of code. A lot of what you'll be doing is research, and you can do that through the Web. Of course. You don't have to start from scratch. You will feel like your brain is going to explode, at least at first, but you soon learn to expect that and to ignore it.

The feeling of "OMG, I can't learn this, I'm sunk, I'm through, I'm dumb, my six year old nephew's poodle can do this but I can't... oh s*itohdear" ;) ... believe it or not ... is normal. "It will pass."

The more languages you become exposed to, the more it will become clear to you that all of them are "mostly the same, but somehow different." With practice you will develop the ability to switch at-will from one "mode" to another, and thus to bridge the gap between them all. (A very u$eful $kill to acquire!)

In time, you'll see that "a(nother) programming language" is to a software practitioner nothing more than "a(nother) tool in the tool-chest." You don't see auto mechanics running around saying, "sorry, I'm a wrench guy not a screwdriver guy" (unless they work for the guv'mint ;) ). It's just a thing that you "learn how to learn how to" use.

simplicissimus 03-28-2008 01:48 AM

my suggestion
 
My suggestion is to make the choice based on some concrete and practically useful project. Maybe you use some open source tool frequently enough to know it well from a user's point of view, which might be based on any of the mentioned languages - that would be a good candidate.

Real-life projects will always put up some weird situations that pose unexpected difficulties and from these programming problems you can learn a lot.

It is certainly possible to start some kind of academic research on programming languages in general, but for practical purposes it makes more sense to put a single programming language into the main focus.

A fine exercise during your studies could be to convert some existing source code to another language and than back again. It's a good method to reveal strengths and weaknesses of all involved programming languages, their tools and development environments.

Regards,
SIMP

Fedora User

taylor_venable 03-28-2008 09:45 AM

You neglected to mention what you already know. There's a significantly smaller semantic gap between (e.g.) C++ and Java and between Lisp and Java. [Though I kinda doubt if you're starting to learn programming you already know Lisp, but ya never know!] Definitely pay attention to what sundialsvcs says: you'll be best off if you can learn everything, expand your horizons as much as possible, open yourself up to every opportunity. While not everybody has time to invest in that kind of research, it does produce the optimal result. :)

sundialsvcs 03-28-2008 07:12 PM

Quote:

Originally Posted by simplicissimus (Post 3102804)
A fine exercise during your studies could be to convert some existing source code to another language and than back again. It's a good method to reveal strengths and weaknesses of all involved programming languages, their tools and development environments.

That is a superb suggestion! On any Linux system you can easily find copious examples of existing software that is written in just about any language you please. One of the very best ways to learn any language is to study existing professional-grade software that has been written in it.

Just download some and ... read it.

angrybanana 03-30-2008 12:55 PM

Python and Ruby are very similar, python seems to have more support/bindings this is why I prefer python over ruby. That said I really like some of the features that Ruby has, in my opinion, it takes the best of python and perl. Try them all, and see which you like.

Dan04 03-30-2008 03:08 PM

Learn all three of them. Start with Java so you can appreciate how user-friendly the other two are :)

sundialsvcs 03-31-2008 10:29 PM

You know, while I respect the notion that one should "start with Java," and I agree that you should definitely know Java for a variety of reasons, every time I work with that language I am very aware of the fact that it was designed by a very large committee. :)

But that, actually, is not my point.

When you are "learning languages," obviously in your very first exposure to your first language(s) you are simply going to be coping with the mind-explosion. (My first computer program, written nevermind years ago, was 8 lines long .. took me 6 months to write (on paper) .. and had a bug in it.) But as you put a couple of languages under your belt, and maybe before you actually feel like you understand any one of them fully, I want to begin to encourage you to start very early to consider a subtly-different viewpoint...

Start comparing languages. Excluding (maybe, for-the-moment) the more-esoteric tools like Lisp or Prolog, if only for the fact that you are probably not going to encounter such a thing first, start looking at the languages that you've seen. What makes them similar? What makes them different? What did their designers emphasize? And, what did they de-emphasize in order to achieve that emphasis? What sort of problem or task did they "have in mind?"

It's a lot like walking through a Home Depot store and trying to consider the various juicy gotta-have-it tools ;) critically. What is this tool good at? Why? What would make me select this tool for that job?

Dan04 03-31-2008 10:49 PM

Quote:

Originally Posted by sundialsvcs (Post 3106654)
(My first computer program, written nevermind years ago, was 8 lines long .. took me 6 months to write (on paper) .. and had a bug in it.)

I'm curious: What did it do and in what language?

Peterius 03-31-2008 11:14 PM

Never mind, no one needs to know my opinion.


All times are GMT -5. The time now is 02:32 PM.