Время разработки на различных языках

Кто-либо знает о каком-либо исследовании или сравнительных тестах того, сколько времени оно берет для разработки того же приложения во множестве языков? Действительно я ищу Java по сравнению с C++, но любые сравнения были бы полезны. У меня есть чувство, что существует раздел в Коде, Завершенном об этом, но моя копия работает.

Править:

Существует много интересных ответов на этот вопрос, но кажется, что существует отсутствие действительно хорошего исследования. Я внес предложение в meta об этой проблеме.

35
задан Community 20 March 2017 в 10:29
поделиться

14 ответов

Pratt & Whitney, purveyors of jet engines for civilian and military applications, did a study on this many years ago, without actually intending to do the study.

They went on the same metrics kick everyone else went on in the 1990s. They collected a bunch of data about their jet engine controller projects, including timecard data. They crunched it. The poor sap who got to crunch the data noticed something in the results: the military projects uniformly had twice the programmer productivity and one/fourth the defect density as the civilian projects.

This, by itself, is significant. It means you only need half as many programmers, and you aren't going to spend quite as much time fixing bugs. What is even more important is that this was an apples-to-apples comparison. A jet engine controller is a jet engine controller.

He then went looking for candidate explanations. All of the usual candidates: individual experience, team size, toolsets, software processes, requirements stability, everything, were trotted out, and they were ruled out when it was seen that the story on those items was uniformly the same on both sides of the aisle. At the end of the day, only one statistically significant difference showed up.

The civilian projects were written in every language you could think of. The military projects were all written in Ada.

IN EVERY SINGLE CASE, against every other comer, for jet engine controllers at Pratt & Whitney, using Ada gave double the productivity and one/fourth the defect density.

I know what the flying code monkeys are going to say. "You can do good work in any language." In theory, that's true. In practice, however, it appears that, at least at Pratt & Whitney, language made a difference.

Last I heard about this, Pratt & Whitney upper management decreed that ALL jet engine controller projects would be done in Ada.

No, I don't have a citation. No paper was ever written. My source on this story was the poor sap who crunched the numbers.

This, incidentally, was BEFORE Boeing did the 777, and BEFORE the 777 brake subcontractor story happened. But that's another story.

38
ответ дан 27 November 2019 в 06:33
поделиться

Есть причина, по которой нет реальных сравнений в этом аспекте, за исключением анекдотических свидетельств (которые можно найти в пользу почти любого языка).

На самом деле написание кода занимает относительно небольшую часть времени разработчика. Даже если язык позволяет сократить время написания кода вдвое, к моменту завершения проекта это будет почти незаметно. Дизайн, структура программы, процесс разработки - все гораздо важнее, кроме того, есть библиотеки, инструменты и опыт работы с ними.

Некоторые языки лучше подходят для определенных процессов разработки, чем другие, поэтому, если вы остановились на дизайне и процесс, вы можете решить, какой язык будет более эффективным, но не раньше.

(не заметил, что есть аналогичный ответ, поэтому не стесняйтесь его игнорировать)

0
ответ дан 27 November 2019 в 06:33
поделиться

Эта история Ады может быть приукрашенной версией этого: http://www.adaic.com/whyada/ada-vs-c/cada_art.html

0
ответ дан 27 November 2019 в 06:33
поделиться

According to Norvig, Lutz Prechelt published just such an article in the October 1999 CACM: "Comparing Java vs. C/C++ Efficiency Issues to Interpersonal Issues".

Norvig includes a link to that article. Unfortunately, the ACM, despite having a bitmap graphic proclaiming their goal of "Advancing Computing as a Science & Profession", couldn't figure out how to maintain stable links on their webpage, so it's just a 404 now. Perhaps your local library could help you out.

0
ответ дан 27 November 2019 в 06:33
поделиться

This question is a little old fashioned. Focusing on development time solely based on the choice of language is of limited value. There are so many other factors that have equal or more impact than the language itself:

  1. The libraries or frameworks available / used.
  2. The level of quality required (ie. defect count).
  3. The type of application (eg. GUI, server, driver etc...)
  4. The level of maintainability required.
  5. Developer experience in the language.
  6. The platform or OS the application is built on.

As an example, many would say Java is the better choice over C++ to build enterprise (line of business) applications. This is not normally because of the language itself, but instead it is perceived that Java has better (or more mature) web server and database frameworks available to it. This may or may not be true, but that is beside the point.

You may even find that the building an application using the same language on different operating systems or platforms gives greatly differing development time. For example using C++ on Linux to build a GUI application may take longer than a Windows based GUI application using C++ because of less extensive and mature GUI libraries avaialble on Linux (once again this is debatable).

1
ответ дан 27 November 2019 в 06:33
поделиться

Most programs have to interface with some other framework. It tends to be a good idea to pick the language that has libraries specifically for what you are trying to do. For instance are you trying to build a distributed redundant messaging system? If so I would use Erlang. Are you trying to make a quick and dirty data driven website, use Ruby and Rails. You get the idea. Real time DirectX where performance is key, C++/C/Asm.

If you are writing something that is algorithm based I would look to a functional language like Haskell, although it has a very high learning curve.

1
ответ дан 27 November 2019 в 06:33
поделиться

It would make more sense to benchmark the programmers, not the languages. The time to write a program in any mainstream language depends more on the ability of the programmer in that language than on qualities of that specific language.

3
ответ дан 27 November 2019 в 06:33
поделиться
5
ответ дан 27 November 2019 в 06:33
поделиться

A couple of anecdotal data points:

On Project Euler, which invites programming solutions to mathematical problems,

  • the shortest solutions are almost invariably written in J or K, a relative of APL; there are occasionally MatLab solutions in the same range. It can be argued, though, that these languages specialized in math.
  • runners up were Ruby solutions. A lot of algorithm can be wrapped in very little code, and it's much more legible than J / K.
  • Python and Haskell solutions also did very well, LOC-wise.

The question asked about "fastest development," not "shortest code." But it's conceivable that shorter solutions are faster to come up with - certainly for slow typists!


There's an annual competition among roboticists. Contestants are given some specs for some hardware, a practical problem to solve in software, and limited time to do so. Again very domain specific, of course. Programmers have their choice of tools, including language of course. Every year, the winning team (often a single person) used Forth.


This admittedly limited sample suggests that "development speed" and "effect of language on speed" is often very dependent on the problem domain.

6
ответ дан 27 November 2019 в 06:33
поделиться

Opinion: more important is what is faster for a given developer, for example yourself. What you are used to, will usually be faster. If you are used to 20 years of C++ pitfalls and never skip an uninitialized variable, that will be faster than Java for anybody.

If you remember all parameters of CreateWindowEx() by heart, it will be faster than MFC or winforms.

10
ответ дан 27 November 2019 в 06:33
поделиться

This article(a pdf) has some benchmarks (note that it's from 2000) between C, C++, Perl, Java, Perl, Python, Rexx and Tcl.

Some common wisdom I believe holds true (also somewhere within the article):

The number of lines written per hour is independent of the language
13
ответ дан 27 November 2019 в 06:33
поделиться

One of the few funded scientific studies that I'm aware of on cross-language productivity, from the early 90s, funded by ARPA and the ONR,

We describe the results of an experiment in which several обычные языки программирования, вместе с функциональным языком Haskell, использовались для прототипа Военно-морской центр надводной войны (NSWC) требование для геометрической области Сервер. Полученные программы и показатели развития были рассмотрены комитет, выбранный ВМФ. В результаты показывают, что Haskell прототип занял значительно меньше времени развиваться и было значительно больше кратко и проще для понимания, чем the..

22
ответ дан 27 November 2019 в 06:33
поделиться

I think most benchmarks and statements on this topic will mean very little.

Benchmarks can always be gamed; see the history of "Pet Store".

A language that's good at solving one kind of problem might not apply as well to another.

What matters most is the skill of your team, its knowledge of a particular technology, and how well you know the domain you're trying to solve.

UPDATE: Control software for jet engines and helicopters is a very specialized subset of computing problems. It's characterized by very rigorous, complete, detailed specs and QA that means the multi-million dollar aircraft cannot crash.

I can second the (very good) citation by John Strohm of Pratt & Whitney control software written in Ada. The control software for Kaman helicopters sold to Australia was also written in Ada.

But this does not lead to the conclusion that if you decided to write your next web site in Ada that you'd have higher productivity and fewer defects than you would if you chose C# or Java or Python or Ruby. All languages are not equally good in all problem domains.

3
ответ дан 27 November 2019 в 06:33
поделиться

Erlang vs C ++ / Corba

"... Поскольку Erlang DCC меньше четверти аналогичной реализации C ++ / CORBA, разработка продукта на Erlang должна быть быстрой. и поддерживаемый код. Мы пришли к выводу, что Erlang и связанные с ним библиотеки подходят для быстрой разработки поддерживаемых и высоконадежных распределенных продуктов ».

Статья здесь

0
ответ дан 27 November 2019 в 06:33
поделиться
Другие вопросы по тегам:

Похожие вопросы: