4
$\begingroup$

I am a university student taking an Artificial Intelligence class this semester. Our professor's programming language of choice is Java, but it seems that perhaps with some nudging, he can change it to Python.

I wanted to know if there is any merit in doing so. I know a programming language is just a programming language - however, given the industry's wide use of Python when implementing AI algorithms (especially with ML), I think it makes much more sense for us to use Python. It will be easier to transition from a University environment to an Industrial one having done several assignments in Python and having a clear understanding of all the tools it provides than if we continue using Java, correct?

What are the advantages and disadvantages of a switch from Java to Python?

$\endgroup$
  • 1
    $\begingroup$ Welcome to ai.se...I feel python is definitely the better choice in the current scenario...The course will probably teach you how to implement a month model..But you don't want to do it from scartch Everytime...It's very very cumbersome..And here comes the library support advantage of python.. $\endgroup$ – DuttaA May 9 '18 at 14:53
4
$\begingroup$

While dyedgreen is right in some respects, I don't agree entirely with that sentiment. Sure, you can theoretically use any language as long as you know the maths and understand the concepts inside and out whilst having some applicable knowledge.

However, I don't believe if you are starting from scratch, you should learn to develop models in Java. While the underlying material is the same, all you are doing is wasting time IMO learning a language that is rarely used in the field and lacks sufficient support by most modern ML frameworks. Also, while this is rather subjective, python feels better when used as a data science language. Working with data especially is where that difference is clear to me.

That being said, this could all change, and Java could become the ML language of choice(extremely unlikely).

$\endgroup$
2
$\begingroup$

I don't think there is much merit in using one language over the other.

It's true that you will get a better feeling for what libraries etc. are available in Python when using it, but I think it's more important to focus on the mathematics and application of the algorithms and techniques you will learn, as these will be relevant regardless of the language / library you end up using.

$\endgroup$
2
$\begingroup$

I'm going to go ahead and disagree with the others. From an academic perspective for AI or any CS related assignment Java (or C or C++) will always have much more benefit as you will get to write the actual code instead of using libraries others have already written. That way later on when you transition to Python or whatever language you choose you'll know whats under the hood and use it and optimise it more effectively than someone who only knows which libraries to use for what application.

$\endgroup$
  • $\begingroup$ Your premise of learning by implementing isn’t wrong, but there’s no correlation between this and the Java vs Python debate. Java has ample libraries and it’s entirely possible (arguably easier) to implement such by hand in Python. $\endgroup$ – G__ May 10 '18 at 2:38
  • $\begingroup$ My point was to avoid the libraries whilst learning. $\endgroup$ – solarflare May 10 '18 at 3:24
  • $\begingroup$ Sure, I get it - but I read the answer as recommending Java over Python specifically because it would force/allow writing of code versus library glue, and I contend that you can take the coding OR library glue approach in either ecosystem. $\endgroup$ – G__ May 10 '18 at 4:27
  • $\begingroup$ " It will be easier to transition from a University environment to an Industrial one having done several assignments in Python and having a clear understanding of all the tools it provides than if we continue using Java" - I read that as "hey I want to use Python because it has better tools making ML easier". $\endgroup$ – solarflare May 10 '18 at 4:32
  • $\begingroup$ Yea, I can't say I agree with this. You can be as low-level or abstracted as you please. The amount of learning in that case is based on personal self-awareness. For a university course knowing what you don't understand and what you need to improve on is extremely important $\endgroup$ – hisairnessag3 May 10 '18 at 5:42
0
$\begingroup$

To add a few cents, I do not think it will make any difference. The reason is that the content of the course will be, by design (if you can teach it using java), very general, general enough so it will not matter what language you use (this has to be so otherwise you would not be able to use Java). Once you need to do advanced stuff and want to automatize the basic algorithms, you can switch to python, where you can use super advanced API's like Keras, which is on top of tensorflow which is on top of python. To give you a particular example, with full time dedication you should be able to switch from matlab to python and implement your first keras model, by self learning, in not more than a couple of months.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.