<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>/var/log/mind - Latest Comments in Commentary on Python from a Java programming perspective</title><link>http://var-log-mind.disqus.com/</link><description>Dhananjay Nene’s free (as in free speech) opinions on all things related to Software Engineering</description><atom:link href="https://var-log-mind.disqus.com/commentary_on_python_from_a_java_programming_perspective/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 07 Aug 2013 19:41:21 -0000</lastBuildDate><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-992248227</link><description>&lt;p&gt;Have you heard of PyPy? It is a python interpreter written in python, it is really worth taking a look, you may get surprised, it is much faster then CPython -- 6.2 times faster in average [1].&lt;/p&gt;&lt;p&gt;PyPy is all about speed and optimization, it achieves it mostly by JIT. In some cases it can be even faster then bare C! [2]&lt;/p&gt;&lt;p&gt;"We generally consider things that are slower on PyPy than CPython to be bugs&lt;br&gt;of PyPy." [3]&lt;/p&gt;&lt;p&gt;[1] &lt;a href="http://speed.pypy.org/" rel="nofollow noopener" target="_blank" title="http://speed.pypy.org/"&gt;http://speed.pypy.org/&lt;/a&gt;&lt;br&gt;[2] &lt;a href="http://morepypy.blogspot.com.br/2011/08/pypy-is-faster-than-c-again-string.html" rel="nofollow noopener" target="_blank" title="http://morepypy.blogspot.com.br/2011/08/pypy-is-faster-than-c-again-string.html"&gt;http://morepypy.blogspot.co...&lt;/a&gt;&lt;br&gt;[3] &lt;a href="http://pypy.org/performance.html" rel="nofollow noopener" target="_blank" title="http://pypy.org/performance.html"&gt;http://pypy.org/performance...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Fabiano</dc:creator><pubDate>Wed, 07 Aug 2013 19:41:21 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-442489154</link><description>&lt;p&gt;Very nice post.&lt;/p&gt;&lt;p&gt;I agree that the forced indentation in Python will lead to more readable code. I have seen some terribly formatted code in Java, and wished that indentation were forced there too.&lt;/p&gt;&lt;p&gt;However, when working on a team project some people will set their IDE's to use spaces instead of tabs, and some people might use tabs.&lt;/p&gt;&lt;p&gt;Will that be a problem? Are there any standards regarding indentation in Python?&lt;/p&gt;&lt;p&gt;--&lt;br&gt;Thanks&lt;br&gt;Parag&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Parag Shah</dc:creator><pubDate>Mon, 26 Jan 2009 05:18:09 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2452441</link><description>&lt;p&gt;Interesting article. But was it a team project? I wish there were more people sharing their experience about an (average) team of java developers doing a project in those dynamically typed languages...  IMHO it might be painful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Laurent</dc:creator><pubDate>Sat, 20 Sep 2008 07:40:29 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2437979</link><description>&lt;p&gt;JS,&lt;/p&gt;&lt;p&gt;I concur it is indeed a viable approach and that it is possible that I could&lt;br&gt;choose to exercise that optiion as well. I think it will indeed depend on&lt;br&gt;the nature of the application and its distribution model. I would think that&lt;br&gt;if the application hotspots are fairly localized and if it is intended to be&lt;br&gt;used in few installations, then using C/C++ indeed becomes a attractive&lt;br&gt;option.&lt;/p&gt;&lt;p&gt;Dhananjay&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dhananjay Nene</dc:creator><pubDate>Fri, 19 Sep 2008 01:39:09 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2437959</link><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;One neat thing about Python is that if you have performance bottlenecks, you can drop down into C/C++ code to rewrite just those parts of your system that have problems.  How come you don't see this approach as viable as simply writing the whole application in Java instead of Python with some parts rewritten in C?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">JS</dc:creator><pubDate>Fri, 19 Sep 2008 01:34:40 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2437173</link><description>&lt;p&gt;Quite interesting indeed. A fair bit of similarities I must confess with code snippets as well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dhananjay Nene</dc:creator><pubDate>Thu, 18 Sep 2008 23:37:08 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2430585</link><description>&lt;p&gt;Funny... I wrote a similar blog article a couple months ago. See &lt;a href="http://brizzled.clapper.org/id/75" rel="nofollow noopener" target="_blank" title="http://brizzled.clapper.org/id/75"&gt;http://brizzled.clapper.org...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It's quite interesting to read others' experiences.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Clapper</dc:creator><pubDate>Thu, 18 Sep 2008 14:44:42 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2424930</link><description>&lt;p&gt;Am learning Java at College currently, almost done with the intermediate stuff, I've been wanting to learn python since all the web APIs seem to prefer that. I really liked the article I could relate to it, It would be nicer though if you broke them up into paragraphs, kinda hard to read a long chunk of text, I lost track whenever I shifted focus.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sindhu</dc:creator><pubDate>Thu, 18 Sep 2008 12:48:06 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2411566</link><description>&lt;p&gt;Yes, I was indeed using CPython.&lt;/p&gt;&lt;p&gt;While I have conducted benchmarks on at least 10 occasions, I haven't kept records of the same. However the one time I did maintain detailed records, I documented these here : &lt;a href="http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/" rel="nofollow noopener" target="_blank" title="http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/"&gt;http://blog.dhananjaynene.c...&lt;/a&gt; , it includes a benchmark on CPython, Jython and psyco as well. I will stand by my assertion that there is indeed a substantial difference in run time performance on most counts.&lt;/p&gt;&lt;p&gt;An example of tough refactoring is changing the method name in a scenario where the method is being used in a class hierarchy.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dhananjay Nene</dc:creator><pubDate>Wed, 17 Sep 2008 22:06:37 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2410482</link><description>&lt;p&gt;David,&lt;/p&gt;&lt;p&gt;Nice tutorial and great references as well.&lt;/p&gt;&lt;p&gt;Thanks.&lt;br&gt;Dhananjay&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dhananjay Nene</dc:creator><pubDate>Wed, 17 Sep 2008 20:51:38 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2409255</link><description>&lt;p&gt;Exiting to the command line and executing code? How about running an inferior process in emacs and sending the current region? Any language without eval feels like a pain to use for me :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">apang</dc:creator><pubDate>Wed, 17 Sep 2008 19:04:25 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2407468</link><description>&lt;p&gt;Don't confuse Python-the-language with the Python runtime. I guess you were probably using CPython, which is the (de-facto standard) Python interpreter written in C. You'd probably also be interested in Jython, which will let you compile Python down to Java bytecode. 'Python' isn't necessarily slow; a particular implementation may be.&lt;/p&gt;&lt;p&gt;You don't give any specific examples of where you found CPython to be slow (for some definition of slow), but I'd be interested to see sample code, benchmarks, and perhaps a run on Jython as well.&lt;/p&gt;&lt;p&gt;I spend around 50% of my time in C# (whose tools have similar refactoring capabilities to IDEs such as Eclipse), and the rest in Python. While my development environment for Python (TextMate or emacs) certainly don't have refactoring tools like Visual Studio exposes (and I suspect whatever your chosen Java IDE is also does) I've found that I simply don't need them; a search and replace answers 80% of the common cases. Can you give an example of a refactoring operation that you do with your Java tools that you missed with the Python tools?&lt;/p&gt;&lt;p&gt;It's probably worth mentioning that Python does have high-quality IDEs (Wing springs to mind). These may offer refactoring tools.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dan Fairs</dc:creator><pubDate>Wed, 17 Sep 2008 16:49:45 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2406334</link><description>&lt;p&gt;Welcome to Python!&lt;/p&gt;&lt;p&gt;You may be interested in a tutorial I gave in 2007 at PyCon and OSCON, "Code Like a Pythonista: Idiomatic Python". Full notes here: &lt;a href="http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html" rel="nofollow noopener" target="_blank" title="http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html"&gt;http://python.net/~goodger/...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Goodger</dc:creator><pubDate>Wed, 17 Sep 2008 15:41:42 -0000</pubDate></item><item><title>Re: Commentary on Python from a Java programming perspective</title><link>http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/#comment-2399917</link><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;nice article.I am also learning ruby although i am a java developer just for fun.&lt;/p&gt;&lt;p&gt;Thanks&lt;br&gt;prashant&lt;br&gt;&lt;a href="http://www.prashantjalasutram.blogspot.com" rel="nofollow noopener" target="_blank" title="http://www.prashantjalasutram.blogspot.com"&gt;http://www.prashantjalasutr...&lt;/a&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">prashant</dc:creator><pubDate>Wed, 17 Sep 2008 12:30:48 -0000</pubDate></item></channel></rss>