I certainly agree on sharing the code, as python is more of a script....and should be treated as a script,

But it should be noted the below stated scenario is not something purely hypothetical as lot of companies have source-code without supporting documentation, class files and exe's without documents or source code etc.
in future it is quite possible that companies will have a mission critical applications developed using jython as class files and the sources could be lost.... in such a scenario what can a programmer do ?
 
 
1.) Decompile Jython class into Java using a decompiler, then attempt to understand the flow of logic, a good debugger/profiler can help a bit in this, but this will be painful process.
 
 :-)
 
2.) A brilliant lazy (aka Larry wall )  programmer might step in [ feeling too lazy to read the java] might develop a decompiler for jython, he may later donate the code to the community, which can grow into a important support utility for jython.
 
May be this how jython will blossom into an enterprise platform with lot of like supporting tools around it.
 
Regards,
Siva


From: claudef@br.ibm.com [mailto:claudef@br.ibm.com]
Sent: Saturday, April 03, 2010 12:53 AM
To: jython-users@lists.sourceforge.net
Subject: Re: [Jython-users] Decompiling .jar files for other coding systems


Dear Alex and Tim,

Here's the scenario:
> >>>
> >>> Suppose I develop a project in jython, I deliver jar files and I
> >>> become a luddite, get hit by a bus or something and the client can't
> >>> find another jython programmer.
> >>>
> >>> Java programmers are available. How can a java programmer "pick
> >>> up" after me? Or a clojure programmer or a kawa programmer?
> >>>
> >>>        
> >> Uh, provide the source (.py), not compiled class files?
> >>      
> >    Suppose the follow-up programmers are *not* python/jypython
> >    programmers and want nothing to do with python.


My remark: The scenario described above by Tim does not even show any requirement for decompile (this is an erroneous view from a Java perspective).
                       The correct answer is: Provide the source.

 I agree with you, the attempt to decompile is a whole other story.  Distributing libraries with class files only, indeed is not usual practice among the Jython programmers, nor it is in the open source community. Maybe this point is not about the smooth transition of Python to Java knowledge  and the preparedness of the Java programmers, but its about best practice for developers that use dynamically interpreted languages like Python or Jython.

Watch it as a script, treat it like a script, preserve the source and you should be safe for future maintenance by other professionals. The class file is what matters for the the JVM. its not for us. This statement is also valid for the .jar packages. The source is also the key for future builds on the next releases.    

Indeed we are on same line, without the source its not going to happen.

Regards,
Claude

Claude Falbriard
Developer
AMS Hortolândia / SP - Brazil
phone:    +55 13 9762 4094
cell:         +55 13 8117 3316
e-mail:    claudef@br.ibm.com



From: Alex Grönholm <alex.gronholm@nextday.fi>
To: jython-users@lists.sourceforge.net
Date: 04/02/2010 03:12 PM
Subject: Re: [Jython-users] Decompiling .jar files for other coding systems





2.4.2010 16:47, claudef@br.ibm.com kirjoitti:

Dear Alex,


Your comment and question:


Jar files are just zip files with a different file name extension. If
the code was written in Python, you can't just give those class files to
Java programmers and expect them to carry on.
This is common sense regardless of what languages we're talking about.


I've already experienced situations you described above in your note and this happened within our development team. There use to be fluctuation of manpower mainly regarding the younger work-force. There also exists different cultural backgrounds depending on the location you work. The situation in US might be different as the one in Finland. In US the Python language often is lectured at the Universities as a primary development framework, very useful for educational purpose. Python started in year 1991, while Java came around 1995. At other places like in Brazil, the students are focused to catch global job opportunities which result in the study of  the Java language. Now we have a third trend, which are the dynamically interpreted languages, like PHP, JRuby, Groovy, Python and Jython. They help to streamline the source code (maybe in factor 3), speed up the development through experimentation and consequent use of unit tests. The resulting codes gets more readable, there are features for embedded code deploy and better portability, like for example the capability to run it in a cloud computing environment like the Amazon EC2 or AppEngine. All those dynamic languages are a trend.        


What we also see is a synergy between the language syntax. I would not be surprised to see pythonic feature to show-up up in the Java 7 syntax. We already see this happing in the Groovy 1.7 (for. ex. closures).  If the syntax solution is good it will propagate into the other languages. Now if you want a really sharp programmer, he will start to learn one of the dynamic languages. To answer your question: How long its takes a coder to dive into such a new technology?  The learning of Python syntax having a Java background will not take more than two month doing self-study in part-time. There is high quality training material available from the
jython.org site, also the cookbook from Mr. Dave Kuhlman and the brand new Jython book. The critical point is if a coder is willing to face new technologies and learn it quickly.

While Java is the COBOL of century 21,  the Jython language is fun (..this counts for me..). People that starts learning it, use to get addicted, its a positive experience. In that sense and with a small training effort, you can expect a Java coder to carry on.


Hope you find the answer for your doubts and it gives you the arguments for motivation of the Java work-force.


I'm not sure why you wrote all this, but I think you missed my point here. Only a developer with intimate knowledge of the Jython interpreter's internals stands any chance at figuring out a class file that was constructed by Jython. Tim was asking how Java programmers (with no Python knowledge whatsoever) could continue his work based only on a jar file full of such class files. I was just saying that it's not going to happen.
Regards,
Claude



Claude Falbriard
Developer
AMS Hortolândia / SP - Brazil
phone:    +55 13 9762 4094
cell:         +55 13 8117 3316
e-mail:    
claudef@br.ibm.com


From: Alex Grönholm <alex.gronholm@nextday.fi>
To: "jython-users@lists.sourceforge.net" <jython-users@lists.sourceforge.net>
Date: 04/02/2010 05:02 AM
Subject: Re: [Jython-users] Decompiling .jar files for other coding systems






2.4.2010 4:33, Tim Johnson kirjoitti:
> * Alex Grönholm
<alex.gronholm@nextday.fi>  [100401 12:28]:
>    
>> 1.4.2010 23:07, Tim Johnson kirjoitti:
>>      
>>> * Alex Grönholm
<alex.gronholm@nextday.fi>   [100401 11:27]:
>>>
>>>        
>>>> 1.4.2010 20:56, Tim Johnson kirjoitti:
>>>>
>>>>          
>>>>> FYI:
>>>>> I've been a programmer for over 20 years, 8 of it in python, 12 in
>>>>> C, but I am a total noob when it comes to java.
>>>>>
>>>>> I've played around a little with jar and see that I can extract code
>>>>> from a jar file.
>>>>>
>>>>> Here's the scenario:
>>>>>
>>>>> Suppose I develop a project in jython, I deliver jar files and I
>>>>> become a luddite, get hit by a bus or something and the client can't
>>>>> find another jython programmer.
>>>>>
>>>>> Java programmers are available. How can a java programmer "pick
>>>>> up" after me? Or a clojure programmer or a kawa programmer?
>>>>>
>>>>>
>>>>>            
>>>> Uh, provide the source (.py), not compiled class files?
>>>>
>>>>          
>>>     Suppose the follow-up programmers are *not* python/jypython
>>>     programmers and want nothing to do with python.
>>>
>>>        
>> Well then you are SOL. Because decompiling jython-made class files
>> doesn't give you reasonable java code. Have you tried?
>>      
>   I have done nothing with jython.
>   I ran some jar files from sea monkey as in jar xvf myfile.jar.
>   The output from them is all I have to go on.
>   Thanks
>    
Jar files are just zip files with a different file name extension. If
the code was written in Python, you can't just give those class files to
Java programmers and expect them to carry on.
This is common sense regardless of what languages we're talking about.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.

http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jython-users mailing list

Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users