comp.lang.ada
 help / color / mirror / Atom feed
* Languages don't  matter.  A mathematical refutation
@ 2015-03-25 11:46 Jean François Martinez
  2015-03-25 15:19 ` Paul Rubin
                   ` (2 more replies)
  0 siblings, 3 replies; 94+ messages in thread
From: Jean François Martinez @ 2015-03-25 11:46 UTC (permalink / raw)


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 
example of Professor McCormick who teached Real Time Programming 
at University of Northern Iowa.   In his class groups of students had to
program a computer controlled model railroad.  

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. 

The null hypothesis is

Sc = Sa.   
With Sc = Succes rate in C and Sa = 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  

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 
null hypothesis

2) We will keep the number of years to six for both languages.  Actually 
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 
years and the fact they got significantly less help from the teacher than 
the C students. 

I apply the testing methods for the case where "true" standard deviations are
are unknown.

So                             C sample             Ada Sample 

Xbar (empirical mean)            0                          0.5
Variance                         0              ( 36 * 0.5**2) / (36 -1) =0.257
Standard Deviation  (Sigma)      0              sqrt(0.257) = 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) = 0.064

Our samples are large enough we don't have to use the t Student test but 
can just use the Normal distribution.  Abs ( (0.5 - 0) / 0.084 ) = 5.95

Probability is < 10**-5.   That means the hypothesis of 
Success rate in C = Success rate in Ada is, as expected, rejected.  Smashed
would be a better description.

At this point the only thing we can say is "the difference between the 
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 the same university and it doesn't seem to have suddenly got far higher status and 
started attracing better, brighter students.  If we had the SAT scores of the
C-era and of the Ada-era students we would be able to confim it but there is 
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 example in which "Language  mattered ".

Since we have a counterexample the assertion "Languages don't matter" is 
proven false. 

QED.  :-) 


Late thoughts.

I had a colleague who kept using telnet despite my warnings about the security
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 didn't  

I don't expect any C user will be convinced by my demonstration.  What I expect 
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 language matters thus conceading defeat.

A Greek philopher told 
"Against human stupidity the gods themselves can do nothing".    How true.  

This demonstration was just for fun and for unrusting oooooooold skills.

Jean François Martinez


^ permalink raw reply	[flat|nested] 94+ messages in thread

end of thread, other threads:[~2015-04-26 11:38 UTC | newest]

Thread overview: 94+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 11:46 Languages don't matter. A mathematical refutation Jean François Martinez
2015-03-25 15:19 ` Paul Rubin
2015-04-03  0:50   ` robin.vowels
2015-04-03  2:18     ` Jeffrey Carter
2015-04-03 13:37       ` Bob Duff
2015-04-03 14:13         ` Dmitry A. Kazakov
2015-04-03 17:34           ` Paul Rubin
2015-04-03 19:34             ` Dmitry A. Kazakov
2015-04-03 19:58               ` Paul Rubin
2015-04-04  6:59                 ` Dmitry A. Kazakov
2015-04-06 21:12                   ` Paul Rubin
2015-04-07  5:57                     ` Dmitry A. Kazakov
2015-04-08  4:12                       ` Paul Rubin
2015-04-08  6:45                         ` Dmitry A. Kazakov
2015-04-04  0:41             ` Dennis Lee Bieber
2015-04-04  3:05               ` Paul Rubin
2015-04-04 14:46                 ` Dennis Lee Bieber
2015-04-04 15:41                   ` brbarkstrom
2015-04-04 19:20                   ` Paul Rubin
2015-04-04 20:00                     ` Dmitry A. Kazakov
2015-04-04 20:44                       ` Paul Rubin
2015-04-05  8:00                         ` Dmitry A. Kazakov
2015-04-05  9:55                           ` Brian Drummond
2015-04-06 21:27                             ` Randy Brukardt
2015-04-06 17:07                           ` Paul Rubin
2015-04-06 17:41                             ` Dmitry A. Kazakov
2015-04-06 18:35                               ` Paul Rubin
2015-04-06 21:46                                 ` Randy Brukardt
2015-04-06 22:12                                   ` Paul Rubin
2015-04-06 23:40                                     ` Jeffrey Carter
2015-04-07 19:07                                     ` Randy Brukardt
2015-04-08  3:53                                       ` Paul Rubin
2015-04-08 21:16                                         ` Randy Brukardt
2015-04-09  1:36                                           ` Paul Rubin
2015-04-09 23:26                                             ` Randy Brukardt
2015-04-09  2:36                                           ` David Botton
2015-04-09  8:55                                           ` Georg Bauhaus
2015-04-09  9:38                                             ` Dmitry A. Kazakov
2015-04-09 13:14                                               ` G.B.
2015-04-09 14:35                                                 ` Dmitry A. Kazakov
2015-04-09 15:43                                                   ` G.B.
2015-04-09 17:26                                                     ` Dmitry A. Kazakov
2015-04-09 18:40                                                   ` Niklas Holsti
2015-04-09 19:02                                                     ` Dmitry A. Kazakov
2015-04-09 20:38                                                       ` Paul Rubin
2015-04-09 23:35                                             ` Randy Brukardt
2015-04-10 14:16                                               ` G.B.
2015-04-10 20:58                                                 ` Randy Brukardt
2015-04-07  0:36                                 ` Dennis Lee Bieber
2015-04-05 13:57                     ` Dennis Lee Bieber
2015-04-03 16:17         ` J-P. Rosen
2015-04-03 17:33           ` Bob Duff
2015-04-26 11:38             ` David Thompson
2015-04-03 19:00         ` Georg Bauhaus
2015-04-03 19:12         ` Jeffrey Carter
2015-04-03 22:37           ` Bob Duff
2015-04-03 23:38             ` Jeffrey Carter
2015-04-04  0:15               ` Bob Duff
2015-04-04  7:06                 ` Dmitry A. Kazakov
2015-04-04  2:59               ` Paul Rubin
2015-04-04  0:56             ` Dennis Lee Bieber
2015-03-25 17:12 ` Jean François Martinez
2015-03-26 13:43 ` Maciej Sobczak
2015-03-26 15:01   ` Jean François Martinez
2015-03-26 17:45     ` Jeffrey Carter
2015-03-26 15:21   ` Dmitry A. Kazakov
2015-03-27 11:25     ` Jean François Martinez
2015-03-27 17:36       ` Dmitry A. Kazakov
2015-03-30 10:31         ` Jean François Martinez
2015-03-30 11:52           ` Dmitry A. Kazakov
2015-03-30 12:32             ` G.B.
2015-03-30 13:48               ` Dmitry A. Kazakov
2015-03-30 15:47                 ` G.B.
2015-03-30 16:05                   ` Dmitry A. Kazakov
2015-04-02 12:59                     ` brbarkstrom
2015-04-02 13:35                       ` Dmitry A. Kazakov
2015-04-02 14:48                         ` jm.tarrasa
2015-04-02 15:55                           ` brbarkstrom
2015-04-02 16:21                             ` Jean François Martinez
2015-04-02 16:48                             ` Dmitry A. Kazakov
2015-04-02 16:41                           ` Dmitry A. Kazakov
2015-04-04 10:02                             ` jm.tarrasa
2015-04-04 11:16                               ` Dmitry A. Kazakov
2015-04-02 15:58                         ` Jean François Martinez
2015-04-02 16:39                           ` Dmitry A. Kazakov
2015-04-03  9:46                             ` Jean François Martinez
2015-04-03 14:00                               ` Dmitry A. Kazakov
2015-04-03 17:12                                 ` Jean François Martinez
2015-04-02 17:17                         ` G.B.
2015-04-02 19:09                           ` Dmitry A. Kazakov
2015-04-02 18:24                       ` Niklas Holsti
2015-04-02 18:43                       ` Jeffrey Carter
2015-03-30 11:36         ` Jean François Martinez
2015-03-30 10:48       ` jm.tarrasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox