tag:blogger.com,1999:blog-7573455095858650997.comments2024-03-15T06:52:05.440-06:00Real World AcademiaEvanhttp://www.blogger.com/profile/03848709590438147138noreply@blogger.comBlogger145125tag:blogger.com,1999:blog-7573455095858650997.post-37458023149626120262013-11-29T11:27:09.479-07:002013-11-29T11:27:09.479-07:00John, thats definitely a popular hypothesis, I hav...John, thats definitely a popular hypothesis, I haven't been able to find any scientific studies that show a higher ROI for the different cases. I think we should be hesitant to accept untested hypothesis as facts.<br />Evanhttps://www.blogger.com/profile/03848709590438147138noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-36278672270008945352013-11-29T11:23:26.076-07:002013-11-29T11:23:26.076-07:00Paddy3113. My conclusion is not just that it fails...Paddy3113. My conclusion is not just that it fails type checks, but that those type check failures represent real bugs found in the dynamically typed program, and that those bugs weren't caught by the unit tests.Evanhttps://www.blogger.com/profile/03848709590438147138noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-1067660441553918752013-09-02T12:32:01.234-06:002013-09-02T12:32:01.234-06:00I have been writing code since I was 12 years old....I have been writing code since I was 12 years old. I've spent a lot of time working in both statically and dynamically typed languages. Which is better? In my opinion, which is better depends on the problem domain that you're attempting to solve.<br /><br />In my experience, most problem domains fall into one of two general categories:<br /><br />1) The application must behave as expected under known conditions.<br />2) The application must behave as expected under unknown conditions.<br /><br />Dynamically typed languages will deliver a higher ROI in case one while statically typed languages will deliver a higher ROI in case 2.<br />Anonymoushttps://www.blogger.com/profile/12808585994616513470noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-34566884362632113322013-08-31T20:25:05.578-06:002013-08-31T20:25:05.578-06:00Evan, I know, this is offtopic and it is not corre...Evan, I know, this is offtopic and it is not correct place to ask, but can you please provide (on very high level) why is Haskell's type system superior to Java's one. I'm just wondering and not going to argue. Or maybe at least you know a good resource to read about this.nucleohttps://www.blogger.com/profile/05341818358653713628noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-74285654413483068062013-08-31T15:28:24.456-06:002013-08-31T15:28:24.456-06:00"I strongly doubt that Java has as good of a ..."I strongly doubt that Java has as good of a static typing system as<br />Haskell"<br /><br />Can you prove yout point, or is it just guessing?nucleohttps://www.blogger.com/profile/05341818358653713628noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-15408070081376045122013-07-13T03:35:51.024-06:002013-07-13T03:35:51.024-06:00Nice post, how i create a line with a file like
s...Nice post, how i create a line with a file like <br />second server1 server2 <br />0 1000 2000<br />1 2000 3000<br />2 3000 4000<br />3 4000 5000<br />how i write the script, and after how i run it from the shell! thank youCbourhttps://www.blogger.com/profile/11207829871013618732noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-62621323298786333272013-02-16T10:54:19.817-07:002013-02-16T10:54:19.817-07:00"No dynamic constructs were used that could n..."No dynamic constructs were used that could not be directly translated into Haskell."<br /><br />So your proof is that translating Python into a statically typed loose analogue fails static type checks.<br /><br />Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-782098085893724882013-02-11T23:10:16.440-07:002013-02-11T23:10:16.440-07:00I would say that error handling in Go is easy. How...I would say that error handling in Go is easy. However, troubleshooting the root cause of an error in Go sucks. As soon as a functions catches the error and returns its own error value, the root cause of the error is lost.<br /><br />An example of this is when I was using a library that called a web service. The library kept returning an error saying it couldn't connect to the server. I checked the server and it was running. I could connect with my browser just fine. It turns out the server I was using had a self-signed certificate that I had imported into my browser but not to my system CA certificates. The library didn't tell me it was an SSL error. It simply said that it couldn't connect.<br /><br />I think this is what people are complaining about when they say Go doesn't have exceptions. Sure you can raise a panic but you can't chain panics and/or errors to show the root cause of a problem.<br />Anonymoushttps://www.blogger.com/profile/12802434762732581606noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-27382401216717696102013-01-24T20:48:35.525-07:002013-01-24T20:48:35.525-07:00I dont get this. Could you explain using code? If ...I dont get this. Could you explain using code? If the code gets full coverage, all execution paths are covered.Eduardonoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-39736152833436021352012-12-29T16:46:14.990-07:002012-12-29T16:46:14.990-07:00"Their just not called exceptions."
The..."Their just not called exceptions."<br /><br />Their -> They'reClayhttps://www.blogger.com/profile/05193609370237229562noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-26515175468872777062012-12-20T08:30:50.911-07:002012-12-20T08:30:50.911-07:00Evan,
Your experiment is very interesting and inf...Evan,<br /><br />Your experiment is very interesting and informative. Thanks for sharing it publicly.<br /><br />It seems to me your results illustrate another aspect of the way code tends to be written in practice, aside from the relative merits of static typic and unit testing. You touch on it in one of your comments on the blog:<br /><br />"My interest was on whether unit testing obviated static typing *in practice*. Obviously in theory unit testing can obviate static typing (you could encode a static type checker as a unit test), but if no one does this then in practice it really doesn't matter."<br /><br />My experience supports your finding that unit test suites aren't necessarily well-crafted. I do not conclude from this that unit testing as such is a flawed technique, however. In my work I like to make full use of whatever capabilities the tools offer. When the language has static typing, I want to use it to advantage; the stronger the typing system, the more effort it saves me toward the goal of delivering code people can understand, modify, and feel confident in. When the language doesn't have strong typing, or if it is dynamically typed, then the burden falls to me to ensure the unit test suite covers everything necessary. That is just part of the job. Different tools have different capabilities; when a tool lacks a capability, we have to fill in the blanks. Some other commenters on your post have said similar things.<br /><br />I don't see this as an either-or question of strong typing versus unit testing. A strongly typed language leaves us free to devote proportionally more time to crafting meaningful and useful test cases to cover whatever the type system doesn't cover.<br /><br />Unfortunately, many people who get paid to write software just pump out code any way they can. You say this "really doesn't matter," and for the purposes of your study that's quite right. <br /><br />In the larger scheme of things, I think it does matter. I think it's a deep problem in our line of work. Maybe the quality of unit test suites could be the focus of a future study based on real code, following your example of how to set up such a study.<br /><br />Anyway, great work. I'll be pointing others to it.Davehttps://www.blogger.com/profile/11755320188910974068noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-80336227254903685082012-12-07T15:14:49.431-07:002012-12-07T15:14:49.431-07:00Type systems can't check for error conditions,...Type systems can't check for error conditions, boundary conditions, unexpected input, etc. though, can they?Granthttps://play.google.com/storenoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-74912923754512844672012-08-14T18:54:52.635-06:002012-08-14T18:54:52.635-06:00A lot of these comments are based on the fact that...A lot of these comments are based on the fact that this post (and possibly the paper) only talk about static typing.<br /><br />a) Haskell's typing is both static and strong. Unlike C++ types, which are mostly weak<br />b) Haskell's typing is *very* static. Unlike Java, which is largely dynamic as well (supporting both up and down casts)<br />c) A lot of people seem unaware that static typing *does not* mean type annotation. Type inference needs to be better advocated in generalStephen Paul Weberhttps://singpolyma.netnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-17422960484202394102012-08-03T07:07:10.664-06:002012-08-03T07:07:10.664-06:00Yesterday, I gave a talk to the Sydney Python User...Yesterday, I gave a talk to the Sydney Python User's Group (SYPY), about this paper. The session was not recorded, but my slides (including speaker's notes) are available on-line:<br /><br />http://somethinkodd.com/sypy/farrer.pdf<br /><br />Big thanks to Evan Farrer for giving me something interesting (and a little bit different) to talk about.Julianhttp://somethinkodd.com/sypy/farrer.pdfnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-19363107989796465722012-07-09T21:52:34.521-06:002012-07-09T21:52:34.521-06:00Unknown. All of the bugs are described in the pape...Unknown. All of the bugs are described in the paper. I think for the casual reader the paper would provide more context for discussing the individual bugs. I published the code for the benefit of any (non-casual readers) who want to verify the translation and ensure that the translation is correct.Evanhttps://www.blogger.com/profile/03848709590438147138noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-17689308355665743272012-07-09T21:33:51.457-06:002012-07-09T21:33:51.457-06:00Mike, I've frequently heard both arguments mad...Mike, I've frequently heard both arguments made frequently by proponents of dynamically typed programming languages. An experiment on the claim you mentioned would be very interesting.Evanhttps://www.blogger.com/profile/03848709590438147138noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-18233177668533209532012-07-09T21:30:01.206-06:002012-07-09T21:30:01.206-06:00"In short, you showed that unit testing in pr..."In short, you showed that unit testing in practice doesn't find all bugs, a conclusion that was already apparent to those writing software."<br /><br />That's not an accurate statement of what I found. There was no argument (as you stated) that unit testing didn't find all bugs. There was an argument that unit testing would find all bugs that static typing would find. I showed that unit testing in practice does not find all of the bugs that static typing finds. Therefore static typing is still needed in order to find the bugs that are likely to be missed by unit testing in practice.<br /><br />As far as answering the bug question on which is more valuable static typing or unit testing. My research does not address and did not attempt to answer this question. I'm not sure that is the right question to ask. I think a more important question is when are the benefits of unit testing worth the costs and when are the benefits of static typing worth the costs. Because they are not mutually exclusive technologies knowing that one is more valuable does not mean that you shouldn't use the other.<br /><br />If you really do care about which is more valuable that's fine, but those that argued that unit testing obviated static typing thought they knew the answer, my experiment seems to indicate that they didn't.Evanhttps://www.blogger.com/profile/03848709590438147138noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-91833891286230887362012-07-09T04:01:27.095-06:002012-07-09T04:01:27.095-06:00Unfortunately, you tested whether "A therefor...Unfortunately, you tested whether "A therefore B". And when you found that statement to be false you assumed that "B therefore A" must be true, which is something you admittedly did not test.<br /><br />I found your reply illuminating in that your logic is a confused as your testing methodology and conclusion.<br /><br />In short, you showed that unit testing in practice doesn't find all bugs, a conclusion that was already apparent to those writing software. <br /><br />You also showed that static typing finds bugs, (again apparent already), but you didn't show that connection between the two.<br /><br />We can argue logic, hypotheses, and conclusions until our faces are blue from lack of oxygen. But academic minutiae is worthless unless it can shed light upon the big questions.<br /><br />In this case that question is: Which is more valuable, static typing, or unit testing?<br /><br />And I'm afraid that question remains unanswered with your thesis.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-40418858983376258292012-07-08T19:01:22.215-06:002012-07-08T19:01:22.215-06:00If you made your program translations available on...If you made your program translations available on github or similar, it would facilite easy browsing & comparison of the source and translated programs for the interested passer-by. As its is, they are bundled up in a tar.gz file download, something of a barrier for the casual reader. <br /><br />You could then hyperlink to the source where some of the errors were found, rather than simply assert you found them, which would make the post more persuasive.<br /><br />Perhaps that's why so little of the comments refer to your actual translated code.Ben Hutchisonhttps://www.blogger.com/profile/04698002385923057473noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-47444916689446452512012-07-08T10:13:34.853-06:002012-07-08T10:13:34.853-06:00First, I'd like to congratulate you on a well-...First, I'd like to congratulate you on a well-done study. I hope the research community will attempt to replicate it, to measure the effect of variables such as source and destination language, size of a project, and the application of metaprogramming techniques (which are more commonly used in some languages rather than others).<br /><br />I blogged a few more observations here: http://blog.rafaelferreira.net/2012/07/types-and-bugs.html.Anonymoushttps://www.blogger.com/profile/03350776762967743057noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-74655066609703226922012-06-29T06:56:04.615-06:002012-06-29T06:56:04.615-06:00Very late to the party, but I feel like I have som...Very late to the party, but I feel like I have something to contribute anyway.<br /><br />I'm on a project using Haskell to implement yet another programming language, and coming up with the theory (i.e. semantics, type rules, etc.) behind it more or less concurrently (the implementation lags by about a month sometimes).<br /><br />Over the past year, Haskell's typechecker has found at least 5 (probably closer to 10, but I don't want to overestimate) _logic_ bugs in the theory for us.Alex Rnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-13953567015148376162012-06-29T03:35:33.364-06:002012-06-29T03:35:33.364-06:00Good research Evan. Obviously, static typing has m...Good research Evan. Obviously, static typing has many advantages.<br /><br />That said, I think Tartley's objection is pretty reasonable. I suspect it takes extra programming time to deal with the type system (though I haven't looked into Haskell specifically) and, to me at least, catching 17 bugs and obviating 4 unit tests seems like a very small gain over 4 libraries worth of code.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-92077966374310346822012-06-28T14:49:48.446-06:002012-06-28T14:49:48.446-06:00Interesting read. And it's nice to see *any* r...Interesting read. And it's nice to see *any* research in this area. Like you've, I've been disappointed by the lack of same.<br /><br />However, I think you misstated the claims on the dynamic side. The claim isn't so much that unit testing will replace static typing, but that the time gained by not having to provide type information and otherwise manage types more than makes up for the time lost by not detecting errors earlier.<br /><br />This argument is typically aimed at the Java/C+ language family. As such, Haskell has two advantages over those: less work managing types, and stronger type checking.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-82854220158078813122012-06-28T01:50:49.008-06:002012-06-28T01:50:49.008-06:00Greetings!
I've translated ( :) ) your blog n...Greetings!<br /><br />I've translated ( :) ) your blog notes into Russian: https://docs.google.com/document/d/1eMc5CbCy0ihCEbbIFUoM6_2eP55vuFyZdr1yAo-lzn8/editAnonymoushttps://www.blogger.com/profile/12160153208038999714noreply@blogger.comtag:blogger.com,1999:blog-7573455095858650997.post-2017660265060403202012-06-26T01:44:59.909-06:002012-06-26T01:44:59.909-06:00Nice to read this post which is really good thanks...Nice to read this post which is really good thanks for sharing this information.PHP MySQL Developmenthttp://www.goodcoresoft.com/php-mysql-development/noreply@blogger.com