Judge to Oracle: A High Schooler Could Write rangeCheck 478
mikejuk writes with an update on the Oracle vs Google Trial. From the article: "One month into the Oracle v Google trial, Judge William Alsup has revealed that he has, and still does, write code. Will this affect the outcome? I think so! After trying to establish that the nine lines in rangeCheck that were copied saved Google time in getting Android to market the lawyer making the case is interrupted by the judge which indicates he at least does understand how straightforward it would be to program rangeCheck from scratch: 'rangeCheck! All it does is make sure the numbers you're inputting are within a range, and gives them some sort of exceptional treatment. That witness, when he said a high school student could do it — ' And the lawyer reveals he doesn't: 'I'm not an expert on Java — this is my second case on Java, but I'm not an expert, and I probably couldn't program that in six months.' Perhaps every judge should be a coding judge — it must make the law seem a lot simpler..."
From yesterday; the Oracle lawyer was attempting to argue that Google profited by stealing rangeCheck since it allowed them to get to market faster than they would have had they wrote it from scratch. Groklaw, continuing its detailed coverage as always, has the motions filed today.
Mistrial! (Score:5, Insightful)
Obviously this competent, experienced jurist should have recused himself because of this conflict of interest.
Re:A high schooler? (Score:3, Insightful)
Apparently, you are stupid enough to take a Judge's dismissive comment to the plantiffs as an absolutely specific assessment on the population's programming skills. Perhaps you are the moron here?
6 Months for Range Check?!?!?! (Score:5, Insightful)
Re:A high schooler? (Score:5, Insightful)
For those interested: (from http://news.ycombinator.com/item?id=3940683 [ycombinator.com])
From OpenJDK:
private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex +
") > toIndex(" + toIndex+")");
if (fromIndex arrayLen)
throw new ArrayIndexOutOfBoundsException(toIndex);
}
From Google:
private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex +
") > toIndex(" + toIndex+")");
if (fromIndex arrayLen)
throw new ArrayIndexOutOfBoundsException(toIndex);
}
}
Re:5 Seconds (Score:4, Insightful)
5 seconds? I'd say 5-10 minutes. Searching for that algorithm probably would take a lot longer than coding it...
English as a second language summary? (Score:5, Insightful)
Reading that summary made me feel like I was taking crazy pills. So many mixed tenses. Could someone clean that shit up for readability?
Re:A high schooler? (Score:5, Insightful)
Fore chrissakes, anyone who has been writing any degree of code for more than a few years has implemented a range check function, and whatever the language C, C++, Java, C#, BASIC, 80x86 assembler, they all basically look the same. If this is truly what Oracle's case boils down to, then they literally have nothing, and this comes out looking no different than what SCO's claims against Linux ended up being. It's fucking ludicrous. To claim that somehow a nine line range check function gave Google some vast market edge to my mind breaks credibility. I'm guessing this is pointing pretty heavily towards Oracle being handed their balls on a platter over this.
Colossal waste... (Score:3, Insightful)
Oracle and Google waste money on lawyers on such silly functions instead of spending the money on building more useful technology.
We as users are the only losers in this non-sensical fight.
Re:A high schooler? (Score:4, Insightful)
It's a range check function. They all look largely the same.
Re:A high schooler? (Score:5, Insightful)
If the judge's statement is even a half-truth, the code in question checks a number, and passes it somewhere if it's a good number.
That is what all goddamn code does. A dumb American high schooler could accomplish that in about twenty minutes if you refused to let them leave until they did, because if you aren't doing that, you haven't written a program! A seven year old could probably do it faster; they haven't "learned" yet that they're dumb.
The lawyer is a disingenuous jackass who assumed that the judge, like him, would see a piece of code and assume it's an arcane fucking ritual without even trying to parse it. He deserves derision.
Re:A high schooler? (Score:2, Insightful)
Re:A high schooler? (Score:4, Insightful)
Nowadays the recommended method of coding is to use variable names and function names that are self-descriptive. Given that, it seems to me that the code is pretty much the natural way anyone might write it. Google did say that they copied it, but really, how else might one write it? It's definitely the level of a first year programming course. The only interesting bits are (IIRC) the use of a ToIndex that is one more than the length, to eliminate a bit of arithmetic in the loop. So were they inclined to dissemble, Google could have claimed that it's just a coincidence.
Re:A high schooler? (Score:5, Insightful)
Not being able to write code doesn't mean you're stupid.
However, equating them means you're ignorant and arrogant.
Re:A high schooler? (Score:5, Insightful)
Re:A high schooler? (Score:2, Insightful)
I am an American. I could have written this when I was 8 or 9 when I started playing with QBasic and all that shit. Not all Americans are stupid. Just the vast vast majority.
Many of whom would realize there is no such thing as a vast vast (or even vast) majority. A programmer should realize majority is a binary state, either a 1 (it is) or 0 (it is not).
Quite right (Score:5, Insightful)
There is zero inventive value in that function. It is a completely standard approach that everybody writing containers has used hundreds of times.
This Judge seems to get it.
Re:Mistrial! (Score:5, Insightful)
If you're Oracle, and you're claiming that "checking if an integer is within a range is your super top secret IP that Google stole" it is. Their lawyer was outright saying this would be difficult to write.
A judge with a working BS meter is never a good thing for the plaintiff -- I believe you missed the inherent sarcasm.
Re:A high schooler? (Score:5, Insightful)
Oracle's lawyers are being brilliant at what most lawyers do well: make insanely stupid arguments in order to run their clock as long as possible. It's not about justice. It's about that new yacht Oracle's head lawyer is saving up for. Those nine lines of code might be worth only $20, but the lawyers are making a killing.
Been waiting for this to hit /. (Score:4, Insightful)
I've been following the Oracle vs Google trial on other websites. Not sure why /. hasn't been covering it routinely. It's a pretty big deal not just to Google , but there are some issues being judged which may affect the programming community in general, down the road.
Alsup seemed to be a little perturbed with some of Oracle's ploys to captialize on the assumed "programming ignorance" of the jury. I haven't seen the RangeCheck code, but from Alsups statement it sounds like Oracle is trying to make a case from egregiously far-reaching evidence. One which basically means Oracle doesn't, and never had, much of a case to begin with.
Re:A high schooler? (Score:2, Insightful)
You must register copyrights if you wish to sue for punitive damages (eg: damages that are in excess of your loss because the intent of the damages is to send a message to anybody else who infringes on your copyright). If you have not registered your copyright, then you are only allowed to sue for compensatory damages (eg: the damages that have affected you directly).
In this case, Oracle has apparently not registered the copyright yet (there is nothing stopping them from doing so now or in the future and suing again), so they can only sue Google for compensatory damages, which in this case, as the judge pointed out, is over a rangeCheck function that literally every programmer that has ever done any non-negligible work has done. That means that the losses Oracle suffered as a result of Google's alleged infringement (9 obvious lines of an obvious function, to me, is not infringement) are likely zero or not worth suing over (being next to zero).
The only complications are that those 9 lines were written for Sun, and then for Google, by the same person. That is the only infringement theory available, because in the US you have to use clean-room reverse engineering; you cannot just hire somebody to reimplement something they did for your competitor (unless you're Microsoft and you are reimplementing the NTFS filesystem and the WinNT kernel as "brand new" and "original" technology). So, once Oracle registers the copyright, Google will need to hire somebody to clean-room reverse engineer the rangeCheck function, which should consist of the guy who originally wrote it staring at his code on one side of a wall and talking to another engineer (who has never seen the rangeCheck function code) writing code on another computer about the purpose of the function, possible tests and results for the function, and basically describing the function in every way except going through the algorithm explicitly.
So, once Oracle registers for the copyright, Google will do this (it would take, literally, more time to setup the clean room than to actually implement the function appropriately), and the Dalvik code, including the rangeCheck function will be available to anybody and everybody under whatever license Android is under (read: free to use and modify by anybody in the world). In other words, Oracle is damned if they do sue, and damned if they don't sue. They are losing, and will lose, this fight completely, but they will have shot themselves in the foot because now companies are afraid to use Oracle's Java over patent and copyright concerns (because Oracle is an asshole company run by an asshole). It's a good day to be IBM, Google, and Microsoft because your platforms are looking more legally bulletproof by the minute.
Re:A high schooler? (Score:5, Insightful)
Re:then why didn't they write it (Score:5, Insightful)
Because to do it differently would be to make the code worse. Go to your local hardware store, and look at the hammers. Despite many different manufacturers, they all look and function basically the same. The reason why is because mankind worked out the most efficient hammer design a long time ago and there is nothing left to innovate there.
Imagine how retarded competitor's hammers would have to be designed to get around a patent like the one Oracle is asserting here. This is why there is so much folly in patenting something so elementary, like 'slide to unlock', or a range check.
Re:Contest (Score:1, Insightful)
that was far too kind (Score:5, Insightful)
It's well within the grasp of most middle schoolers, and it wouldn't take long to find an elementary school child who could write it ;-)
Re:Oracle is abusing the courts (Score:5, Insightful)
This case is about how Oracle can monetize Java. They spent 6 billion dollars on Sun and what Google is doing without direct compensation to Oracle devalues Java. This is the first step of many by Oracle to force profits from their purchase. Ellison is fairly adept at making money, and doesn't seem concerned about whether or not he is liked. This first case of making the Sun purchase pay for itself is not going in his favor currently.
Re:5 Seconds (Score:4, Insightful)
If you go into testing not assuming you're doing it wrong, you're doing it wrong.