Live data from Hacker News

Study of 49 programmers: static type system had no effect on development time

cs.washington.edu

91–100 of 192 posts

Re: Study of 49 programmers: static type system had no effect on development time

#91

I tend to find the strongest proponents of static typing are the least familiar with dynamic languages

I lived almost entirely in Ruby from about 2003-2010. Going back to statically typed languages for iOS development has reminded me now nice it is to let the computer catch all my trivial mistakes.

On the rare occasion you really need the kind of anything-goes dynamism of Ruby/Python/JS you can just roll your own dispatch tables.

Re: Study of 49 programmers: static type system had no effect on development time

#92

I'm still torn between dynamic and static typing. The main disadvantage of dynamic typing for me is the lack of verifiable documentation about what data a function needs, and which data comes out of it. This becomes a problem when a) the data is complex (e.g. dictionary of lists of items with certain properties) b) I haven't looked at the function for a while. In those cases, I find statically typed code easier to re…

I use tests for documentation. They seem like more work at the start, but they're more flexible. You can self-document things with tests that you cannot with just types. For example, here are some tests from the lisp interpreter I've been working on: http://github.com/akkartik/wart/blob/8a8cf96816/030.test You're right that tests aren't close to code. But that can be good or bad. Since it's not next to the code it ca…

Static type systems don't excuse you from writing tests. But they do effectively write a whole class of tests for you, and run them much faster and give you more precise errors than manual testing ever will.

People complain about C++ compile times but I've heard of big Ruby projects with test suites that take 20+ hours to run.

Re: Study of 49 programmers: static type system had no effect on development time

#93
post #36

It seems to be very basic static typing along the lines what Java or C has stashed on top an Smalltalkesque object-oriented language, so I am not surprised, the many years I used dynamically typed languages I maybe once or twice had a type error of the kind "confusing int with string" (e.g. when selecting a number from database and it being returned as string). For the benefits of static typing I would rather look in…

I'd be more interested in comparing Haskell to one of those even stronger typed programming languages. I'm forgetting the name of them, but it would be interesting to see how much is too much.

Re: Study of 49 programmers: static type system had no effect on development time

#94
post #83

Earlier quoted context omitted.

No, it isn't. Please read the paper and not the HN title. The paper clearly states that static typing slowed development time down .

"In the experiments the existence of the static type system has neither a positive nor a negative impact on an application's development time (under the conditions of the experiment)." Maybe the abstract is lying, but that seems to agree with my original premise. That is, the type system had no effect on development time. Now, the paper makes no comment either way--all it says is that the type system did not have an…

Read further than the abstract. It's just an abstract.

To quote:

We measured two different points in the development: first, the development time until a minimal scanner has been implemented, and second the quality of the resulting software measured by the number of successful test cases fulfilled by the parser. In none of these measured points the use of a static type system turned out to have a successful impact. In the first case, the use of a statically typed programming language had a significant negative impact, in the latter one, no significant difference could be measured.

Re: Study of 49 programmers: static type system had no effect on development time

#95

Earlier quoted context omitted.

Please read the paper and not the HN title. The paper's title is casting doubts on the positive impact of statically typed languages as they had a negative impact on development time. (though not quality)

From the very first paragraph : In the experiments the existence of the static type system has neither a positive nor a negative impact on an application's development time (under the conditions of the experiment). What's the point of dynamic languages if they don't even make the initial implementation faster? They're certainly harder to maintain afterwards.

From the conclusion:

We measured two different points in the development: first, the development time until a minimal scanner has been implemented, and second the quality of the resulting software measured by the number of successful test cases fulfilled by the parser. In none of these measured points the use of a static type system turned out to have a successful impact. In the first case, the use of a statically typed programming language had a significant negative impact, in the latter one, no significant difference could be measured.

Re: Study of 49 programmers: static type system had no effect on development time

#96

I'm still torn between dynamic and static typing. The main disadvantage of dynamic typing for me is the lack of verifiable documentation about what data a function needs, and which data comes out of it. This becomes a problem when a) the data is complex (e.g. dictionary of lists of items with certain properties) b) I haven't looked at the function for a while. In those cases, I find statically typed code easier to re…

You might want to read up on Design By Contract, if you haven't already. It's an approach to writing robust software by incorporating explicit pre- and post-conditions into code. IIRC they were used to generate documentation for functions as well as to do the run-time checks. It originally came from the Eiffel community I believe, but has spread to other languages as well.

Re: Study of 49 programmers: static type system had no effect on development time

#97
I'm a bit puzzled which role programmer ability has in this experiment. What strikes me is the enormous spread in programmer quality within each group. Varying from 0.7 to 15 hours for the scanner assignment and 50% to 100% of succeeded test cases. The spread occurs over both groups.

That programmer quality shows way stronger effects than the measured effect of a typing system would suggest to me that

- the measurement was flawed?

- programmer ability beats language choice by orders of magnitude?

Or do I make a category error here?

Re: Study of 49 programmers: static type system had no effect on development time

#98
post #73

Earlier quoted context omitted.

You are hitting exactly the main point. Dynamic languages are very good for prototyping or small scale projects. But they fail to address the context of programming large scale applications with teams distributed across multiple sites.

I'm betting youtube is bigger than all of your sites combined, and they use python.

And you have no idea how they struggled while developing it. Besides, it's not entirely written in python.

Re: Study of 49 programmers: static type system had no effect on development time

#99

The study may or may not be flawed, but what's really interesting to me is the reaction. We need more science in our computer science, which means more experiments and more results like this. We should also be open to the truth that we use the tools we like because we like them rather than because they're technically superior, even though we pimp them ad nauseum as though they are. I once read an article about a tech…

I don't know how science can help you here. In the case of the improved fan design, well that's easily testable. However, I don't want to go down the rabbit hole and argue social vs natural sciences. I find it dumbfounding that in this day and age, people can still create rather arbitrary social experiments with only 49 people and then think they can draw grandiose conclusions from their "data".

Well, in this study there are no grandiose conclusions.

Re: Study of 49 programmers: static type system had no effect on development time

#100
This is an interesting paper, but I'd dismiss the findings as a strong argument in the dynamic vs static typing debate. I think the setup is a little bit skewed as it's plays into the strengths of dynamic languages:

* The whole api consisted of 14 classes, which makes the conclusion that static typing doesn't help with API discoverability somewhat moot.

* We are not talking about Haskell, Scala or even Java/C++ flavor of static typing. The statically typed language offers no generics, no support for encapsulation, no type inference etc.

* IDE support seems to be absolutely minimal.

A methodical problem is that they seem to skip over the abysmal success rate: Only one(!) guy or gal was able to get 100%, more than halve of them was unable to implement a meaningful parser at all. To be honest, it looks a little bit like the subjects were overwhelmed by the unfamiliar syntax and/or most of them where really inexperienced (the paper says that none of them ever implemented a scanner or parser).

Post reply on HN