Forgot your password?
typodupeerror
Android Oracle News

Judge to Oracle: A High Schooler Could Write rangeCheck 478

Posted by Unknown Lamer
from the larry-ellison-sues-every-cs101-student dept.
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.
This discussion has been archived. No new comments can be posted.

Judge to Oracle: A High Schooler Could Write rangeCheck

Comments Filter:
  • Mistrial! (Score:5, Insightful)

    by Hatta (162192) on Wednesday May 16, 2012 @12:36PM (#40018223) Journal

    Obviously this competent, experienced jurist should have recused himself because of this conflict of interest.

  • by Anonymous Coward on Wednesday May 16, 2012 @12:36PM (#40018225)

    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?

  • by Gr33nJ3ll0 (1367543) on Wednesday May 16, 2012 @12:36PM (#40018241)
    I think I'm beginning to understand why Oracle has chosen to sue, rather than innovate, they're idiots and lazy to boot! :)
  • by Soilworker (795251) on Wednesday May 16, 2012 @12:37PM (#40018257)

    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)

    by ByOhTek (1181381) on Wednesday May 16, 2012 @12:38PM (#40018269) Journal

    5 seconds? I'd say 5-10 minutes. Searching for that algorithm probably would take a lot longer than coding it...

  • by Anonymous Coward on Wednesday May 16, 2012 @12:41PM (#40018309)

    Reading that summary made me feel like I was taking crazy pills. So many mixed tenses. Could someone clean that shit up for readability?

  • by MightyMartian (840721) on Wednesday May 16, 2012 @12:44PM (#40018353) Journal

    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)

    by middlemen (765373) on Wednesday May 16, 2012 @12:44PM (#40018365) Homepage
    What a colossal waste of money !

    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.
  • by MightyMartian (840721) on Wednesday May 16, 2012 @12:46PM (#40018401) Journal

    It's a range check function. They all look largely the same.

  • by bistromath007 (1253428) on Wednesday May 16, 2012 @12:51PM (#40018469)
    No. Not even a little.

    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.
  • by Oracle of Naples (2640867) on Wednesday May 16, 2012 @12:52PM (#40018481)
    You don't need to register copyright. That is only for patents. Since the guy was working for Sun, all his work belongs to Sun/Oracle (unless otherwise stated in contract).
  • by garyebickford (222422) <gar37bic@gmail.DALIcom minus painter> on Wednesday May 16, 2012 @12:53PM (#40018489)

    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.

  • by Anonymous Coward on Wednesday May 16, 2012 @12:53PM (#40018491)

    Not being able to write code doesn't mean you're stupid.

    However, equating them means you're ignorant and arrogant.

  • by betterunixthanunix (980855) on Wednesday May 16, 2012 @01:00PM (#40018577)
    The issue of whether or not an API can be copyrighted has nothing to do with whether or not the judge is a programmer. APIs can be complex, and a lot of design may go into an API (what patterns to expose to programmers, etc.). Some programmers would not even object to APIs being copyrightable; many people use proprietary languages that are implemented by a single vendor, and would not even be affected by such a ruling (unless they also use Java).
  • by Registered Coward v2 (447531) on Wednesday May 16, 2012 @01:08PM (#40018667)

    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)

    by gweihir (88907) on Wednesday May 16, 2012 @01:09PM (#40018687)

    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)

    by gstoddart (321705) on Wednesday May 16, 2012 @01:16PM (#40018783) Homepage

    Knowing facts is a conflict of interest?

    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.

  • by WaywardGeek (1480513) on Wednesday May 16, 2012 @01:16PM (#40018791) Journal

    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.

  • by sl4shd0rk (755837) on Wednesday May 16, 2012 @01:18PM (#40018819)

    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.

  • by Anonymous Coward on Wednesday May 16, 2012 @01:22PM (#40018869)

    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.

  • by dan828 (753380) on Wednesday May 16, 2012 @01:24PM (#40018895)
    Having lived in a lot of places in the world, I can assure you that Americans are no stupider than people anywhere else.
  • by AngryDeuce (2205124) on Wednesday May 16, 2012 @01:37PM (#40019055)

    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)

    by thunderdanp (1481263) on Wednesday May 16, 2012 @01:44PM (#40019157)
    But that isn't the point! Clean rooming code is a perfectly legitimate way to keep yourself from committing copyright infringement. By all appearances Google opted not to do that, and instead opted to copy code. If that is in fact the decision they made, then they infringed whatever copyright protection there was on that code. I'm not clear on which phase of the trial this is in, but if this is the copyright infringement claim, it makes not one bit of difference if a teenager, tween, or toddler could independently write the code. If Google copied it, they infringed.
  • by sribe (304414) on Wednesday May 16, 2012 @01:50PM (#40019217)

    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 ;-)

  • by spacepimp (664856) on Wednesday May 16, 2012 @02:31PM (#40019739) Homepage

    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)

    by 19thNervousBreakdown (768619) <davec-slashdot@@@lepertheory...net> on Wednesday May 16, 2012 @03:00PM (#40020167) Homepage

    If you go into testing not assuming you're doing it wrong, you're doing it wrong.

Real programs don't eat cache.

Working...