views:

915

answers:

6

Has anyone seen a recent (and fairly balanced) study into the relative costs for software development using differing languages ? I would particular like to see the relative costs of Java Vs. C# Vs. Delphi.

+22  A: 

No. But I'm not fanatic of any, and work as consultant and use to recommend one of them for every requirement I have. So here are some facts to make easier the choose of what to use to address system development requirements that you can have.

In Common:

All of them are the best in their fields:

  • Java is the best Java development option.
  • C# is the best .NET development option.
  • Delphi is the best Native development option.

All of them have:

  • Worldwide third party vendors that provide quality components and libraries.
  • Worldwide well-known applications created with them (for example the Delphi ones may be are more known: Yahoo Go for TV!, Macromedia Captivate, TotalCommander, MediaMonkey, FinalBuilder, InstallAware, WinLicense, MySQL Administrator, etc).

All of them are:

  • Highly reliable technologies with RAD capabilities.
  • Supported by the best development aid tools (UML, etc).
  • Releasing major upgrades in its technologies (Java 7, .NET 4.0 and Delphi multiplatform).

Differences:

3 Things in which C# is better:

  • Quantity of developers available (comparing with Java) that can code in it (*).
  • Has Microsoft behind.
  • Cheaper development costs in terms of wages (usually).

3 Things in which Java is better:

  • Quantity of developers available (comparing with Delphi) that can code in it (*).
  • Portability.
  • Has Sun behind.

3 Things in which Delphi is better:

  • Speed (better performance for time critical systems).
  • Small footprint (the Delphi compiler generates really small binaries).
  • Has no explicit dependencies (easier distribution).

(*) there is a very reliable fact that there are more other-languages-developers that can code in C# than other-languages-developers that can code in Java, that means its easier to find C# programmers. Maybe that explains why in many websites (like this one) and forums that allow multi-language questions, refactorings, etc, there are USUALLY more C# questions and answers (84k vs 50k). Also, since Java jobs are best paid in many parts of the world, common sense points out that Java developers remain longer in their jobs than C# ones, that makes more difficult to find Java developers available than C# ones. And of course there are some other factors that can be discussed, but I'm pretty sure it's usually easier to find a C# programmer than a Java one.

someone
Do you have any links providing evidence for this? As far as I'm aware, there are more Java developers than .NET developers.
hbunny
@stevendick: results of studies on this vary widely depending on precisely how the question is asked. For example, if you ask "I am a <blank> developer", fill in the blank, you only get one answer, then you find slightly more Java than C# developers. If you say "fill in the blank, you get as many answers as you like", then the results are very different. If you say "I can use <blank> language in my work", again, completely different answers. Which one of those questions actually measures what you're interested in measuring?
Eric Lippert
@someone: there are tons of explanations for this. Maybe Microsoft's documentation is crap. Maybe C# developers are stupid and need to ask many questions. Maybe C# developers are smart and like discussing interesting questions. Maybe C# is crap. Maybe C# has more features than Java. Maybe Java developers have other forums where they ask questions. Maybe Java guys work in companies where developers aren't allowed to surf the web. Or maybe, StackOverflow was founded by two .NET community leaders with two extremely popular .NET blogs who brought their entire readership with them to this site.
Jörg W Mittag
Under Delphi I would add "QUALITY of developers". In any representative sample, the proportion of Delphi developers who are "good" developers (attention to detail, knowledge of implementation details, when to apply which patterns when etc etc) will - in my experience - be significantly higher than the proportion in a similarly composed C# or Java group. ymmv.
Deltics
@Jörg W Mittag: well... to be fair, maybe you are right, maybe you are wrong.
someone
If "Java is the best Java development option" is supposed to mean that Java is the best JVM language for the JVM, then I strongly disagree. Groovy/Grails is a much more productive option for writing web apps for the JVM.
Don
It is of course possible (very possible) to write badly in Delphi
Mmarquee
+6  A: 

Quantitative comparisons of this sort would be very hard to pin down, due to the number of complicating variables: developers' experience with the language, suitability of the language to the target domain, developers' overall quality (it's been argued that non-mainstream languages attract higher quality developers), tradeoffs with the resulting product (is a Ruby or Python app as fast as a well-written Delphi or C++ app?), etc.

In Code Complete, 2nd Ed., Steve McConnell lists several languages in terms of their expressive power (how many lines of equivalent C code can be expressed in a single statement of each language). It's been suggested that programmers' productivity in lines of code is relatively constant regardless of language; if this is true, then the expressive power of each language should give a rough estimate of the relative cost of development in each language. From Table 4.1, page 62:

LANGUAGE       LEVEL RELATIVE TO C
C              1
C++            2.5
Fortran 95     2
Java           2.5
Perl           6
Python         6
Smalltalk      6
Visual Basic   4.5

He lists several sources for this table: Estimating Software Costs, Software Cost Estimation with Cocomo II, and "An Empirical Comparison of Seven Programming Languages" (by Prechelt, from IEEE Computer, October 2000).

The figures that McConnell cites are all several years old, but from what I understand, the Cocomo II model is ridiculously detailed, so current Cocomo II material may offer current numbers on Delphi and C#.

Josh Kelley
McConnell's numbers are very out-of-date; .NET languages (both VB and C#) have advanced tremendously since then, especially with generics and LINQ. LINQ adds a functional programming capability in .NET, and that can skew the productivity numbers a lot.
Cylon Cat
I think the argument is flawed, since it assumes the developer spends 100% of the time coding, and says nothing about the quality of code produced. For many projects, the percentage is nearer 30% (I think from the Mythical Man-Month.)
mdma
+1 for pointing out that coding is not where most of the time was spent. I never saw a project that was canceled or got late because of the language it was using (assuming reasonable choices, of course).
chr
I heard somewhere that java and c++ are not exactly equal...Java 2.5 and c++ 2.6 or something like this...it's relevant at big projects at several thousands of LOCs
poeschlorn
+17  A: 

I don't know about formal studies, but I've heard plenty of anecdotal accounts of companies taking an existing app in Delphi and rewriting it in C# for one reason or another. They all end about the same way.

It took twice as long to rewrite the program in C# as it did to originally write it in Delphi, even with all the business logic and domain knowledge already worked out and present in the form of the existing Delphi codebase. During this time, they were not releasing updates because all their resources were busy with the rewrite, allowing their competition to gain market share. And when it was done, it was a 1.0-level product. Glitchy, slow, and hard to use, often with severe backwards-compatibility issues.

The reason why are open to interpretation, but I think one of the major factors that makes Delphi so much more productive than C# (or Java) is the language's look and feel.

It's common knowledge that a lot more work, time and effort goes into maintaining and debugging modern programs than initially wriitng them, but That principle isn't often followed to its logical conclusion. If what requires the most work is maintaining the program, then picking a language on the basis of it being easy or quick to write code in is premature optimization. You get a better return on your investment if you use a language that is easy to read and maintain. And when it comes to code readability, Pascal (Delphi) beats the C family hands-down.

It's not a formal study, but it's worth thinking about.

Mason Wheeler
Very well put. I would refine it slightly - it is still possible to write "bad" code in Pascal, but generally you have to go out of your way to do so... equally it is possible to write "good" code in curly brace languages, but again you have to go out of your way to do so. i.e. Pascal - in general - will yield better results for the same amount of effort.
Deltics
You don't rewrite entire application. You refactor it, this way you avoid such gaps, despite it might seem that the process is more painful. It is not only related to Delphi->C# move.
macias
What does "C family" even mean? It's 3 completely different languages. And the answer and comments smell like a "holy war" argument, while OP asked for concrete evidence of relative costs.
HeavyWave
I consider Delphi to be a member of the C-family of languages. The only major syntactic difference between Delphi and the other languages mentioned above is that it uses `begin` and `end` rather than curly braces to denote block scope.
Don
@Don: That's completely wrong. For one thing, Pascal was created before C and influenced its design, not the other way around. All the control structures have different syntax, especially **for** and **case**. The rules for declaring variables are very different. In the C family, anything can be a boolean, which leads to all sorts of ugly syntax (Yoda conditions, separate logical and bitwise versions of the boolean operators, etc.) while in Pascal, boolean is a well-defined type that the compiler understands. I could go on but I'm running out of characters. They're quite different, though.
Mason Wheeler
@Mason - But Delphi is not Pascal, it's Oobject Pascal, which was created after C. To say that a language is in the C-family means that it looks broadly similar to C#, Java, C++, etc. It doesn't mean it's exactly like C. In the grand scheme of things, I still think Delphi looks broadly similar to these languages, unlike Lisp, Ruby, SQL, etc.
Don
@Don: I think what you're looking for is that C and Pascal (and all their descendants) are members of the Algol family.
Mason Wheeler
+5  A: 

I've never looked for such a study, but I would be surprised if one existed. Any experiment designed to measure and compare actual development costs across multiple languages in a proper scientific fashion would be incredibly expensive.

To do it properly:

  • You would need to specify a number of non-trivial projects across a range of application domains.

  • You would need to form a number project teams, each of which is composed of developers with significant experience in developing large-scale applications in one of the languages.

  • Then you would need to implement each project N times for each language ... to get a statistically significant result.

So you would need developer effort equivalent to project-size * nos-languages * nos-projects * nos-repetitions. Assuming a non-trivial project takes 1 man-year, that there are 5 projects and they are developed 5 times in each language (to give us a large enough sample size to be statistically significant), that is 25 experienced-developer-years ... say US$2 million to US$5 million ... PER LANGUAGE EXAMINED.

Those numbers are (obviously) pulled out of the air, but my point is that a proper scientific comparison of development costs for different language would be prohibitively expensive.

And even then, the study results would not address:

  • on-going maintainability / maintenance costs,
  • how the numbers scale to large projects,
  • language specific effects of team size,
  • availability, costs and benefits of development tools for respective languages,
  • ease / difficulty of forming experienced teams for each language,
  • and so on.

And the results would be out-dated in 3 to 5 years.

Stephen C
A: 

Like others said, there is no studies... because nobody is interested. There is no measurable difference. Take almost any book on project management and you'll see no mention of languages barring examples, no relying on specific language features. Most time any money consuming problems over project life cycle are not coding problems, but architectural and organizational.

To put things in perspective, if you encounter serious drawback of the language and have to implement some workaround - you lose a few hours. Maintaining person might spent some more hours understanding what and why you did there A work day or two will be lost. Well, if you come to work in a wrong mood, you lose the same day. If you have problems understanding requirement or communicating with colleagues and management, you easily lose weeks and months.

ima
+1  A: 

"quality of developers" is hard to gauge. Java and (to a lesser extent) C# are used a lot in schools and universities to train pupils in the rudiments of programming. Many of these end up on support forums with homework questions and would be counted somehow as being programmers (and poor ones) using that language. In reality the vast majority of them never will write a single line of code after completing that mandatory introductory course, and most of the rest probably won't write in that language.

--- rant about "comparative studies" about programmer competence complete ---

As said, it's very hard if not impossible to give a cost comparison estimate for implementing something in different languages, at least as a general case to be used for all projects. Some things lend themselves better to .NET, others to Java, others again might be best done in Excel macros.

And development cost is usually only a fraction of the TCO of a system, especially if it's something like a multitier application running on application servers with databases, etc. If the customer already has a serverfarm running IIS with MS SQL Server databases as a backend, selling them a JEE application using an Oracle backend is doing them a disservice, even if that would be the most logical choice for the application otherwise. The development cost might be lower, but the running cost for the customer would be a lot higher.

On the other end of the scale, a website for your corner grocery store who wants to start taking orders through the net for delivery in the neighbourhood shouldn't be implemented in either .NET or JEE. The cost of the solution (especially hosting) would far outweigh the benefits. A simple thing based on for example php or rails would serve that customer far better. Hosting cost is reduced, no expensive license fees for database and application servers needs be paid, he might actually make some money using the resulting website.

jwenting