I decided to have some fun with the statement by Google's
expert that the
"rangeCheck" function could be programmed by
a high school student in a couple
of hours with some
assistance. Mainly because I thought it was too pessimistic.
This
Groklaw article claims:
Josh Bloch, who
wrote rangeCheck, testified
that “[a]ny competent high school programmer could
write”
that method. RT 815:13-16 (Bloch). Even Oracle’s expert Dr.
Mitchell
conceded that “a good high school programmer” could
write rangeCheck with
guidance. RT 1316:24-25 (Mitchell).
But in this
Groklaw article, Mitchell
says:
Google: Could it have been written by a high
school
student?
Dr. Mitchell: Not really.
Google: Maybe a grad student?
Dr.
Mitchell: If told what to do.
But enough of my opinions. What
are the empirical results?
I just happened to have a high school student
available.
Thomas is 17. He would be a junior if health had not kept
him
out of school this year. He did work for the high school
IT department as a
sophomore, so maybe he isn't
representative. He has been playing around with
various
languages on his own, with minimal direction from me, mostly
references to good Websites or handing over my copies of
programming
classics.
John is 13, a 7th Grader. Thomas has been teaching him how
to
program the last week or so, about two hours of tutoring
total. He has written
a C program to calculate numbers from
a user's inputs. So he had the template
to write an
arbitrary program. I invited him to try it so I could check
out
the lower bounds.
I looked up a comment on the rangecheck structure that I
can't locate again, sorry. I offered them both the same
challenge: Can you
write a program that does this?
My instructions:
Write a
program that takes three numbers as
input: a, b,
& c.
If b > c,
return error message.
If b is negative, return error message.
if c > a,
then return error message.
Thomas wrote a program in 5 minutes.
John took 10 minutes,
with some assistance from his brother. I assume that this
is
mostly because he didn't know any flow control yesterday.
His brother
covered it with him right before I got home.
Both programs compile and
work.
Both of them continued to play around with the program for a
while.
[Must be genetic.]
Thomas's program [formatting destroyed by me and
Geeklog]:
// Thomas ----- 2012
// This is for a programming
challenge
#include
int main()
{
int a, b,
c;
scanf("%d%d%d", &a, &b, &c);
if (b > c)
puts("B
> C");
if (b
puts("B is negative");
if (c > a)
puts("C
> A");
return (0);
}
John's program [formatting
destroyed by me and Geeklog]:
// By: John -----, May 18
// To
complete a challenge programing puzzle
// Done with little help, and very
little experence in
programing
#include
#include
int
Error;
int main(int argc, char *argv[])
{
Error =
4;
if (argc != 4)
{
puts("Incorrect number of
inputs");
return(1);
}
if (atoi(argv[2]) >
atoi(argv[3]))
{
puts(" Error: B > C");
Error =
1;
}
if (atoi(argv[2])
{
puts(" Error: B is
negitive");
Error = 1;
}
if (atoi(argv[3]) >
atoi(argv[1]))
{
puts(" Error: C > A");
Error =
1;
}
if (Error
{
puts(" Failed to complete: Try
Agein");
return(0);
}
puts(" Meets
Requirements");
return(0);
}
So it looks like Dr.
Mitchell is wrong yet again. Not only
does it not take a grad student, it can
be done by a high
school student, and even by a middle school student "If told
what to do." No representation made as to quality of code or
performance.
So there.
--- Userfriendly on WGA server outage:
When you're chained to an oar you don't think you should go down when the galley
sinks ? [ Reply to This | Parent | # ]
|