Language Choice

This is for all discussions related to IT and technology. Hardware, software, programming, it all goes here.
Post Reply

Which language should I learn?

Poll ended at Sun Aug 24, 2014 5:44 pm

Perl
1
17%
Python
3
50%
Java
2
33%
 
Total votes: 6
User avatar
Rakuen Growlithe
Fire Puppy
Posts: 6718
Joined: Tue Apr 01, 2008 2:24 pm
Gender: Male
Sexual preference: Bi
Species: Growlithe (pokemon)
Region: Other
Location: Pretoria
Contact:

Language Choice

#1

Post by Rakuen Growlithe »

For some of my future studies I'm going to need to learn to use mysql and a scripting language. The guy who's going to be training me suggested that knowing Perl, Python or Java would be beneficial. I'm not too familiar with the different languages so I wanted to see what you guys think is the best to learn. I'll need to use these for scientific computing.

I'm thinking of trying Codecadamy to learn the scripting language. Coursea also has courses dedicated to Python but doesn't have for the other languages, so I'm currently leaning towards Python.
"If all mankind minus one, were of one opinion, and only one person were of the contrary opinion, mankind would be no more justified in silencing that one person, than he, if he had the power, would be justified in silencing mankind."
~John Stuart Mill~

“Give me the liberty to know, to utter, and to argue freely according to conscience, above all liberties.”
~John Milton~
Leeward
Recalcitrant Ruminant
Posts: 7036
Joined: Wed Mar 19, 2014 10:23 pm

Re: Language Choice

#2

Post by Leeward »

If you haven't coded much, I would recommend Python first. It is a lot easier to learn because its syntax is flexible and more forgiving, and also more similar to natural language. It has a huge amount of extensions and libraries that come with so much boilerplate code you just have to string everything together. If you can think of any even slightly generic thing to do, it probably already exists. Also Python is general-purpose which means it can be used as object-oriented or functional, and it treats functions as first-class objects (meaning you can pass them as arguments). It uses dynamic typing which can be confusing but also very useful. It also has a lot more built-in types such as sets, tuples and dictionaries. It is fantastic for scientific computing with numpy. There is a massive amount of tutorials for Python available online as well.

However if you like defining everything and making complicated structures that do only exactly what you tell them to, go for Java, which is more strict with typing (unless you use hierarchies and generics). It is entirely object-based though, and does not treat functions as first-class objects. Java, unlike Python, cannot shorten things by aliasing names, so it tends to be long-winded. Also it is sometimes unclear whether things are objects or pointers, so you might get some accidental aliasing if you're not careful. Java has a built-in class for database interfacing which is fairly easy to use.

I have never used Perl, so I can't give an opinion on it unfortunately.

So yeah it comes down to your personal preference, but if this is your first or second language I would recommend Python over Java.
User avatar
Rakuen Growlithe
Fire Puppy
Posts: 6718
Joined: Tue Apr 01, 2008 2:24 pm
Gender: Male
Sexual preference: Bi
Species: Growlithe (pokemon)
Region: Other
Location: Pretoria
Contact:

Re: Language Choice

#3

Post by Rakuen Growlithe »

Reasoning would also be nice if you vote. For example I've heard a big advantage of Java is it works on all sorts of devices. For what I need it for that's irrelevant. It'll only be used on proper computers, most likely those running Linux.

On a side note apparently both Java and Python can be used in R, which is a good thing in my mind. So, Perl does kinda seem dead in the water. Apparently LibreOffice is also planning to replace it's Java use with Python.
"If all mankind minus one, were of one opinion, and only one person were of the contrary opinion, mankind would be no more justified in silencing that one person, than he, if he had the power, would be justified in silencing mankind."
~John Stuart Mill~

“Give me the liberty to know, to utter, and to argue freely according to conscience, above all liberties.”
~John Milton~
User avatar
Sev
Superbike Snow Leopard
Posts: 6596
Joined: Thu Mar 06, 2014 9:27 pm
Gender: Male
Sexual preference: Gay
Species: Snow Leopard
Region: Western Cape
Location: A Twisty Road

Re: Language Choice

#4

Post by Sev »

Python is interpreted, and Java uses the JVM - therefore, compatibility is not a concern in either case.

The reason that I voted for Java is because becoming familiar with it would more easily allow you to branch to other major languages, like C#. Python is its own beast, and, in my mind at least, is more of a scripting language than a true programming language. Plus, I hate only using indentation to denote scope.

I would recommend using C#. It's less verbose than Java, and has a similiar level of support. If you want to develop in Linux with C#, use MonoDevelop.
User avatar
Rakuen Growlithe
Fire Puppy
Posts: 6718
Joined: Tue Apr 01, 2008 2:24 pm
Gender: Male
Sexual preference: Bi
Species: Growlithe (pokemon)
Region: Other
Location: Pretoria
Contact:

Re: Language Choice

#5

Post by Rakuen Growlithe »

I specifically need a scripting language, these are the three that were recommended. I'm not really familiar with the differences and I haven't actually started any of the training yet. I think most of the use will be pulling information from databases/websites and then manipulating it. It's not really about creating new programmes.
"If all mankind minus one, were of one opinion, and only one person were of the contrary opinion, mankind would be no more justified in silencing that one person, than he, if he had the power, would be justified in silencing mankind."
~John Stuart Mill~

“Give me the liberty to know, to utter, and to argue freely according to conscience, above all liberties.”
~John Milton~
Leeward
Recalcitrant Ruminant
Posts: 7036
Joined: Wed Mar 19, 2014 10:23 pm

Re: Language Choice

#6

Post by Leeward »

If it's for scripting then I would recommend Python even more strongly.
User avatar
Rakuen Growlithe
Fire Puppy
Posts: 6718
Joined: Tue Apr 01, 2008 2:24 pm
Gender: Male
Sexual preference: Bi
Species: Growlithe (pokemon)
Region: Other
Location: Pretoria
Contact:

Re: Language Choice

#7

Post by Rakuen Growlithe »

Well I've now, after a big gap in the middle, finished the entire Codecademy Python course. I feel pretty good about that. I also took a Coursera course on the R statistical language, so that's two basic introduction to two different programming languages. We'll see if it helps.
"If all mankind minus one, were of one opinion, and only one person were of the contrary opinion, mankind would be no more justified in silencing that one person, than he, if he had the power, would be justified in silencing mankind."
~John Stuart Mill~

“Give me the liberty to know, to utter, and to argue freely according to conscience, above all liberties.”
~John Milton~
User avatar
Sev
Superbike Snow Leopard
Posts: 6596
Joined: Thu Mar 06, 2014 9:27 pm
Gender: Male
Sexual preference: Gay
Species: Snow Leopard
Region: Western Cape
Location: A Twisty Road

Re: Language Choice

#8

Post by Sev »

Learn Haskell next; you'll thank me!
Post Reply