views:

1570

answers:

11

If I do a google search with the string "python productive" the first results is a page http://www.ferg.org/projects/python_java_side-by-side.html claiming that "python is more productive of Java". Many Python programmers that I have talked with claim that Python is "more productive", and most of them report the arguments listed in the above cited article.

The article could be summarized in these stametements:

  1. Python allow you write terser code
  2. A more terser is written in lesser time
  3. Then Python is more productive

But the article does not reports any statisticals evidences that support the hypothesis that a more terse code could be developed (not written) in lesser time.

Do you know if there any article that reports statistical evidences that Python is more productive of something else?

Update:

I'm not interested in adovacy arguments. Please do not tell why something should be more productive of something else. I'm interested in studies that measures that the use of something is related or not related to the productivity.

I'm interested in statisticals evidences. If you claim that the productivity depends from many other factors then there should be a statistical study that proves that the language choiche is not statistically correlated to the productivity.

+2  A: 

I think it really is going to depend on the programmer and what you want to do. It's subjective. Someone who is a Java God will outperform someone who is only good at python. Any study that tries to blanketly state that will be far too broad in what it tries to accomplish.

Kevin
+1: The COCOMO cost model (and most empirical studies) show that individuals vary by orders of magnitude no matter what tools they use or don't use.
S.Lott
This comment about COCOMO is very interesting.
Andrea Francia
http://forums.construx.com/blogs/stevemcc/archive/2008/03/27/productivity-variations-among-software-developers-and-teams-the-origin-of-quot-10x-quot.aspx has a good biblography.
S.Lott
From what I have read about the cocomo estimation model is really neat, but at the same time is really complicated and difficult to get all the estimation parameters correct.
Kevin
@Kevin: The point is not COCOMO as a whole. It's the Programmer Capability (PCAP) weighting factor -- and associated research -- that shows huge variability in productivity. Irrespective of language or IDE.
S.Lott
@S.Lott: Absolutely, I get what you were saying (and completely agree). I was mererly expounding on the COCOMO model (and I would assume the COCOMO II model) aboud how it is really complex for use in project estimation.
Kevin
+4  A: 

General claims about productivity do not necessarily make sense. A good software engineer (or project manager) knows what language to pick based on the nature of the project, the requirements of the customer, and the skills of his team.

There is generally no "one language to rule them all", though there are clearly languages that are better for certain domains. I would not write distributed enterprise applications or device drivers in perl, or games in prolog, but there are great uses for them.

Productivity also depends on tool support (e.g., are there good Python IDEs?), on skills, and on the possibility for practitioners to mess up. I am generally wary of functional programming in the hands of the average programmer.

If Python automates or simplifies tasks that Java developers building the same applications would frequently have to do, then yes, it may be more productive, but any evidence you get would still be anecdotal.

Uri
+1  A: 

I think the point about IDEs is a particularly strong one. For example, is there a Python IDE on par with Eclipse, offering the same refactoring capabilities? Conversely, does an IDE with strong refactoring capabilities promote less intelligent up-front design?

This just highlights the difficulty (or, rather the futility) of declaring one language more/less productive than another.

mirzmaster
Actually, Eclipse with PyDev plugin is a wonderful development environment for Python :-)
Roberto Liffredo
And netbeans will be getting first class Python support that should be as good as it's Ruby support (best available), but due to the nature of dynamic languages, there are things an IDE cannot do that are easy with statically typed languages.
Bill K
You need an IDE in Java for many things that don't apply to Python at all (e.g. checked exceptions), so the IDE is not necessarily a plus point; rather, the need for an IDE is a minus point! You can productuve in Python without an IDE (I just use Notepad++).
hasen j
That's just not true. I've almost never used an IDE for checked exceptions as opposed to unchecked--exactly the same handling, I constantly use it for completion, which can only be done correctly in a statically typed language.
Bill K
+3  A: 

You can't measure it, but if you're experienced with Java, and then you learn python and try to do stuff with it, you will realize it by yourself.

It's one of those things that can't be quantified, and frankly even if there was a statistical study, I wouldn't be convinced by it. You can bring a Java guru and a python newbie and give them a task that is better done with java (maybe because there's a specific library or even built-in functionality for it), and maybe in that case the Java guru will be "more productive" than the python newbie.

Some people mention IDEs, in my opinion, you can be productive with python even without an IDE, specially without a beast like Eclipse. You don't have cheked exceptions in python, so you don't need a tool to help you deal with that. Because everything in python is dynamic, you don't have "virtual" methods (although you can mimic them if you really want), so you don't need a tool to help you deal with writing stubs and whatnot. etc. Many things in Java that require an IDE are simply not applicable to python. The only useful thing an IDE in python would do is auto-complete and maybe an interactive shell in the same editor window.

OK, here's the thing about the "terse" argument: Java has so much clutter overhead, i.e. public static void main! System.stdout.writeln (or what the hell was it?), remind me again how do you get input from the user? Yea, there's no specific way, you always end up writing a wrapper class around it!! Remind me again how do you read a file? which library do you have to import? oh, go read the API docs and browse through tons of stream readers and writers, while in python, it's just open('filename'). You can run through all lines of a text file by simply: for line in open('filename'):.

In Java there's so much overhead of words it just clutters your mind and diverts your attention from your main task. This overhead is a real hindrance, there's only about 7 items you could hold in your short term memory, for line in file fills one item; how many items do you need to fill if you use Java IOStream classes for that task? How many slots do you have left for thing related to the actual task you're doing?

hasen j
+1  A: 

Well, the very same google search points also a link to an interview to GvR, where he explain the reasons for the productivity gain. He lists, in particular:

  • terser language, hence less typing
  • built-in data types
  • duck typing
  • rich set of standard libraries

About the first point, some further data comes from Code Complete, where Python has an index of 6 equivalent lines of C code , while Java and C++ are on 2.5.

Whatever those numbers mean, something I personally like very much with python is the idea of pythonicity. Once you get it, the language is very coherent, and rarely you get the feeling that it gets in your way. This helps really a lot in focusing on the problem, instead of the implementation, and therefore achieving an higher development speed.

Roberto Liffredo
This article reports any statisticals evidences that there is a productivity gain? The question is not concerned in advocacing article but in those articls that reports statisticals evidences and empirical studies.
Andrea Francia
The article is an interview with the main Python author, so it may be biased.I usually consider data from Code Complete definitely reliable; it is adapted from "Estimating Software costs" (Jones 1998) and "An empirical comparison of seven computer languages", that is also referenced by Konrad.
Roberto Liffredo
Could you please indicate the reference to the page on Code Complete that contains these data?
Andrea Francia
Code Complete 2 (Steve McConnel, 2004), page 62
Roberto Liffredo
I have bad luck the Code Complete sample chapters does not contains this page :(
Andrea Francia
+14  A: 

All evidence is anecdotal.

You can't ever find published studies that show the general superiority of one language over another because there are too many confounds:

  • Individual programmers differ greatly in ability
  • Some tasks are more amenable to a given language/library than others (what constitues representative set of tasks?)
  • Different languages have different core libraries
  • Different languages have different tool chains
  • Interaction of two or more of the above (e.g. familiarity of programmer X with tools Y)
  • etc. the list goes on and on and on

Even though you can design experiments to control for some of these, the variability still requires a huge amount of statistical power to get any meaningful result, and no one ever does studies where like 1000 programmers do the exact same task in different languages, so there's never anything definitive.

The upshot is, each of us knows what the best languages/tools are, and so we can advocate them without fear of being shot down by a published study. :)

Brian
why the down vote?? upvoted again
hasen j
+1: Individual programmers vary in productivity by orders of magnitude.
S.Lott
All evidence is certainly not anecdotal. However, it's impossible to have controlled studies of productivity regarding software development.
S.Lott
I agree that some things related to python's productivity gains are easy to see and not as subjective, but if python just doesn't fit your style, then no study is going to help make it a better fit.
Jeremy Cantrell
This seems relevant:http://www.slideshare.net/gvwilson/bits-of-evidence-2338367
Brian
@S.Lott: I disagree. Back in the days when IBM believed in research, they set up huge controlled experiments for this kind of thing, rigorous enough to produce meaningful results, some of which are quoted in *Code Complete*. So: It's certainly *possible*.
Carl Smotricz
+14  A: 

Yes, there's an excellent paper by Lutz Prechelt on this subject:

An Empirical Comparison of Seven Programming Languages

Of course, this paper doesn’t “prove” the superiority of any particular language. But it probably comes as close as any scientific study can come to the truth. On the other hand, the data of this study is very dated, and in the fast-developing world of software engineering this actually plays an important role since both the languages and the tools have vastly improved over time.

Konrad Rudolph
@onnodb: weird … maybe your proxy? However, try googling for the title, there are alternative download sources, albeit not as nicely formatted. Also try the paper entitled “An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl” – which is more or less the same, AFAIK.
Konrad Rudolph
What a cool study. Shame it's so old.I would expect newer languages to have made some gains since 2000.
Shmoopty
A: 

I think there are cases where one or the other may be more productive, but the question I always ask is how would this language perform on a mixed team involving people who were not good at programming and would cause more problems than they solve, people who think they know everything and like to write tricky code using all the neat language features available, family oriented programmers who just want to go home at 5:00, etc.

I keep hearing these phrases like "if the programmer wants to shoot himself in the foot, let him", as though the speaker has never been on a team.

When on a project team like the one I just described, I would not consider a language that allowed me to "Shoot myself in the foot" if it also meant that any of my teammates could also shoot me in the foot.

The thing is, by definition most projects will either fail or, eventually, be maintained by a team of widely varying talents--so as far as I'm concerned, I have to assume that of all non-trivial projects.

Bill K
+15  A: 

Yes, and there are also statistical studies that prove that dogs are more productive than cats. Both are equally valid. ;-)

by popular demand, here are a couple of "studies" - take them with a block of salt!

  1. An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl PDF warning!
  2. Programming Language Productivity PDF warning! Note that these statistics are for a "string processing problem", so one might expect the winner to be...Perl of course!

and Jeff Atwood's musings are interesting as well

the issues of programmer productivity are far more complex than what language is being used. Productivity among programmers can vary wildly, and is affected by the problem domain plus many other factors. Thus no "study" can ever be "definitive". See Understanding Software Productivity and Productivity Variations Among Software Developers and Teams for additional information.

Finally, the right tool for the right job is still the rule. No exceptions.

Steven A. Lowe
The question is about the presence of these studies and it is not about what peoples think about theirs validity. Even if your comment was not required is appreciated. If you really know that there are these studies could you kindly post a reference to them?
Andrea Francia
@Andrea Francia: "There are lies, damned lies, and statistics" -- Mark Twain. You should realize that statistics cannot "prove" anything.
Steven A. Lowe
The question is about the esistence of these statistics not about the sociological issue that statistics (in general) could be misused to support a point.
Andrea Francia
@Andrea Francia: feel free to just make up some statistics, they will be just as valid as any "study" you might find on the web. ;-)
Steven A. Lowe
@Steven A. Lowe: I'm interested on scientific peer reviewed studies published on scientific journals.
Andrea Francia
@Andrea Francia: I found some studies, slightly less questionable than the advocacy page in your question. Use them as you see fit, but bear in mind that productivity varies wildly among programmers, and no studies control for this critical variable.
Steven A. Lowe
@Steven A. Lowe: Where? The fact that certains claims are not supported by studies and that some studies, that indicate that persons are more important than the tool, does not suit well with these claims is also a result.
Andrea Francia
@Andrea Francia: sorry, it took longer to edit than anticipated, try again.
Steven A. Lowe
@Steven: Statistics can prove a likelines of something being true. The problem in statistics does not lay in itself, but how you can "cook" or adjust the terms of a statistical poll so that it results ambiguous to interpretation. The problem is human, not mathematical.
Stefano Borini
@[Stefano Borini]: agreed - which was the point of the Mark Twain quote ;-)
Steven A. Lowe
+2  A: 

It's a poorly-conceived question, and as such can't be meaningfully answered. If you came to me with a project proposal and asked me what language would be the most productive, the last thing in the world I would look at was a "scientific" comparison of how random programmers did implementing an algorithm in different languages.

I'd ask:

  • What does the software have to do?
  • What technical constraints are there on the software?
  • Who will develop the software?
  • What methodology will they use?
  • How will the software be supported?
  • Who will maintain the software?

At some stage of the game, I'd rely on "non-scientific" or "anecdotal" evidence to guide my decision-making. I don't need a scientific study to tell me that I shouldn't be developing device drivers in a scripting language. Nor do I need one to tell me that a team of C++ programmers is probably going to be able to implement a small project in C++ faster than they'd be able to in Python.

If at any point in this process, I reached for a study that demonstrated that some developers implemented a specific algorithm in Python twice as fast as other developers implemented it in Java, you'd fire me and get someone else to run the project, if you had any brains.

Robert Rossney
+1 The purpouse of this questions is to make clear the that claims about Python productivity like those in http://www.ferg.org/projects/python_java_side-by-side.html are unfounded. They aren't wrong, but they aren't correct. They are unfounded.
Andrea Francia
Actually, reports of programmers skilled in both Java and Python who have used both in their work are the best possible support, because those programmers are taking all the issues I mentioned into account.
Robert Rossney
your third question should be your first question: the team matters most of all
Steven A. Lowe
A: 

This is not talking to the topic, but in personal experience.....I've CONTINUALLY seen Java, C++, C and C# developers blow the doors off their prior performance if you stick them in front of python or ruby and make them use it.

I just so happen to work at 2 places where that happened, and was amused to find people complaining they had to do it, but admitting they were faster at doing it...

Michael Langford