8 Replies - 417 Views - Last Post: 08 September 2015 - 09:37 AM

#1 Konstantinos88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-June 15

Porting from Python to Java

Posted 08 September 2015 - 08:14 AM

Hello. What is your opinion for porting code from Python to Java? How easy would it be?

Thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Porting from Python to Java

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1458
  • Posts: 3,285
  • Joined: 30-January 11

Re: Porting from Python to Java

Posted 08 September 2015 - 08:20 AM

Depends on what you are converting and how well you know both languages.

If the Python is all OOP then it makes it a lot easier to convert to Java. Becomes a bit harder if it's all procedural but if you are experienced in both then it shouldn't be too much of a problem. May have some issues if the Python is too functional (first class functions) as that is not the case in Java.

Also raises the question of why you want to do this?
Was This Post Helpful? 2
  • +
  • -

#3 Konstantinos88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-June 15

Re: Porting from Python to Java

Posted 08 September 2015 - 08:24 AM

A company wants me to do that (remote job). They have created an app for iPhone and they want to create the same app for android. As they told me, they have all the code in Python and we will port it to Java. What is your opinion?
Was This Post Helpful? 0
  • +
  • -

#4 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1458
  • Posts: 3,285
  • Joined: 30-January 11

Re: Porting from Python to Java

Posted 08 September 2015 - 08:27 AM

An iPhone app in Python? Interesting. This probably means they are using some third party framework to allow them to do that. If the same framework has no Java support then things get more complicated.

So I guess it depends on how well you know Android development with Java. As most probably you are going to need to recreate what they have already (functionally) with little code reuse.
Was This Post Helpful? 1
  • +
  • -

#5 Konstantinos88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-June 15

Re: Porting from Python to Java

Posted 08 September 2015 - 08:33 AM

Maybe they created the first algorithm in Python, and then for both iPhone - Android, they port it to the respective language (for example Java in Android). When I know more details, I will tell you.
Was This Post Helpful? 0
  • +
  • -

#6 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1458
  • Posts: 3,285
  • Joined: 30-January 11

Re: Porting from Python to Java

Posted 08 September 2015 - 08:36 AM

Well yeah there are a lot of possibilities here. They could have the server side service set up in Python and have their apps just wrap those into a nice UI. Or as I said they may be using some framework to write the iPhone app directly in Python as they have other libraries already there.
Was This Post Helpful? 1
  • +
  • -

#7 Konstantinos88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-June 15

Re: Porting from Python to Java

Posted 08 September 2015 - 08:54 AM

They told me that they build a betaversion of the android app and ported the algorithm from Python to Java (maybe they have already done it). And I will be working on the android app and backend on the server.
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Freelance developer
  • member icon

Reputation: 6218
  • View blog
  • Posts: 13,722
  • Joined: 02-June 10

Re: Porting from Python to Java

Posted 08 September 2015 - 09:16 AM

You never answered the earlier question though: How well do you know both languages?

Its like saying "How hard would it be to translate a Russian mystery novel into English?" - Well, if you don't speak and read Russian fluently it would be pretty damned tough. And if you aren't fluent in English as well, then its pretty much impossible to do it well.

My thinking is nobody that knows the languages well enough to do the job should have to ask this. If you know both languages then you know your skills and thus you know how hard it would be FOR YOU. That fact that you're asking hints that you don't know one or both of the languages well enough to know if you can do it. That's a big hint for you. Basically - If you have to ask, then its beyond your skills.

This post has been edited by tlhIn`toq: 08 September 2015 - 09:23 AM

Was This Post Helpful? 0
  • +
  • -

#9 Konstantinos88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-June 15

Re: Porting from Python to Java

Posted 08 September 2015 - 09:37 AM

I have experience in both languages around scientific and engineering fields. For example computer vision (see here: http://programmingco...on_CCdraft.pdf), signal processing, pattern recognition, control systems design and Mathematics. I do not have experience in app developing, now, I am learning...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1