From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.42.120.146 with SMTP id f18mr323197icr.21.1427284017719; Wed, 25 Mar 2015 04:46:57 -0700 (PDT) X-Received: by 10.182.52.169 with SMTP id u9mr81561obo.35.1427284017702; Wed, 25 Mar 2015 04:46:57 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!z20no4743494igj.0!news-out.google.com!db6ni62798igc.0!nntp.google.com!z20no4743489igj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 25 Mar 2015 04:46:57 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=212.99.10.164; posting-account=ku4DIwoAAACRt0A2H-srh5aOk_YodLAH NNTP-Posting-Host: 212.99.10.164 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Languages don't matter. A mathematical refutation From: =?ISO-8859-1?Q?Jean_Fran=E7ois_Martinez?= Injection-Date: Wed, 25 Mar 2015 11:46:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5946 X-Received-Body-CRC: 1732763867 Xref: news.eternal-september.org comp.lang.ada:25249 Date: 2015-03-25T04:46:57-07:00 List-Id: n often heard assertion is "Languages don't matter". Lets see if we can refute it. We cannot use an example of a single team developping some program in language A (eg C/C++) vs another team developping the same pogram in language B (say Ada) because differences could be due to team quality. What we need is a program repeatedly developped both in C and Ada so we can use statistical analysis on it. We are going to use the well knwon=20 example of Professor McCormick who teached Real Time Programming=20 at University of Northern Iowa. In his class groups of students had to program a computer controlled model railroad. =20 So for six years students had to do it in C and none ever succeded in providing a working program despite that in later years their professor provided them 60% of the code. Then professor switched to Ada and despite not getting the hand holding the C students had got, 50% of the groups provided a working solution. In later years after professor provided 20% of the code in a component relanting to the windowing inteface success rate was 75%. Now let's analyse this mathematically.=20 The null hypothesis is Sc =3D Sa. =20 With Sc =3D Succes rate in C and Sa =3D Success rate in Ada Professor McCormick's paper lets some factors in the dark so whenever there is a doubt we will tilt them in favor of the null hypothesis =20 1) We will assumme six groups per year despite the wording in Professor McCormick's text suggesting the number is significantly larger. Since the larger the sample the more discriminant the test this favors the null hypothesis ie difference too small for rejecting the=20 null hypothesis 2) We will keep the number of years to six for both languages. Actually=20 in Professors McCormick's paper the number of Ada years is 7 and he has continued using Ada for fourteen more years. However we will discard these additional Ada years. Again this favors the null hypothesis. 3) We will ignore both the 75% success rate of Ada students in following=20 years and the fact they got significantly less help from the teacher than= =20 the C students.=20 I apply the testing methods for the case where "true" standard deviations a= re are unknown. So C sample Ada Sample=20 Xbar (empirical mean) 0 0.5 Variance 0 ( 36 * 0.5**2) / (36 -1) = =3D0.257 Standard Deviation (Sigma) 0 sqrt(0.257) =3D 0.507 The standard deviation for the difference between two empiraical means is sqrt(Variance1/Size1 + Variance2/Size2)). So in our case it is sqrt( 0/36 + 0.257/36) =3D 0.064 Our samples are large enough we don't have to use the t Student test but=20 can just use the Normal distribution. Abs ( (0.5 - 0) / 0.084 ) =3D 5.95 Probability is < 10**-5. That means the hypothesis of=20 Success rate in C =3D Success rate in Ada is, as expected, rejected. Smash= ed would be a better description. At this point the only thing we can say is "the difference between the=20 results obtained by the Ada teams those of the teams is far too high for "luck". We have to look at the possible causes. What changed? It was the same problem, the same teacher using the same methods. It was t= he same university and it doesn't seem to have suddenly got far higher stat= us and=20 started attracing better, brighter students. If we had the SAT scores of t= he C-era and of the Ada-era students we would be able to confim it but there i= s=20 no lement pointing at the Ada-era students being brighter and better. The= only remainingg factor is the programming language used. So we have an ex= ample in which "Language mattered ". Since we have a counterexample the assertion "Languages don't matter" is=20 proven false.=20 QED. :-)=20 Late thoughts. I had a colleague who kept using telnet despite my warnings about the secur= ity problems and the fact that for the user, that was him, the only difference = is that with ssh you only need to type 3 letters instead of 6. He stupidly= kept saying "I have ever used telnet and I am not going to change". And he did= n't =20 I don't expect any C user will be convinced by my demonstration. What I ex= pect=20 is him moving the goalposts and saying things like "Languages don't matter = on average. Only programmers. Hire better programmers." and ignoring you when= you point that saying "on average" is admitting there are problems where langua= ge matters thus conceading defeat. A Greek philopher told=20 "Against human stupidity the gods themselves can do nothing". How true. = =20 This demonstration was just for fun and for unrusting oooooooold skills. Jean Fran=E7ois Martinez