An End To API Gaslighting?

The Supreme Court decision in Oracle vs Google ends a decade-long nightmare for open source developers.

Sunlight or gaslight?*

The decision of the US Supreme Court (SCOTUS) to reverse the erroneous conclusion of the US Federal Circuit appeals court (CAFC) that Google’s use of the Java SE API in Android was a copyright infringement comes as a great relief to open source programmers everywhere. Software developers have always assumed that merely including a function prototype in their code does not require copyright permission as it’s just a fact about the implementation.

Re-implementing a whole set of functions using only the original prototype so that a compatible program can be created is thus normal; the first wave of open source completely relied on doing so. The whole global open source community has been working for decades on the assumption that a re-implemented API does not risk a lawsuit. So the Pandora’s box Oracle tried to open was felt as an existential threat.

The decision issued on April 5th is a great outcome, albeit falling short of what might have been achieved had SCOTUS dived fully into the boundaries of copyrightability as Google asked in their petition. It aligns the US with the norm in Europe as well as affirms that the law in the US matches the common-sense expectations of programmers.

The Java Journey

How did we even get here? Sun Microsystems created the Java platform, a combination of a programming language and a comprehensive suite of helper functions split into three “editions” all of which are colloquially referred to just as “Java”. The promise of Java was famously “write once, run anywhere” – an abstraction achieved by using a software-implemented chip that’s ported to every hardware platform, hiding platform differences and delivering a uniform programming environment that’s agnostic to the hardware it runs on.

The core language and libraries, Java SE (“Standard Edition”), were widely adopted due in no small part to Sun’s vigorous application of licensing controls so that implementations were the same everywhere. Java ME — the edition aimed at mobile phones (not “smart phones” – this was before such things existed), was also widely adopted by phone manufacturers. But instead of the uniformity achieved by Java SE, Sun tolerated divergent implementations in return for significant licensing revenue. The result was that Java ME allowed manufacturers to “differentiate” and software in the after-market needed testing and maybe rewriting for every new phone. Write once, test everywhere.

Google saw a market opportunity here, not least after realising Apple were “going big” with the new “Smart Phone” product category with their Apple-only iPhone, and invested heavily to create the Android platform. What distinguishes smart phones from their ancestors is a uniform application layer served by a global app store so all models of phone can run the same apps. By hiding all the hardware differences under a uniform platform, Android allowed the software market on phones to transcend networks and hardware vendors. It created exactly the market Java ME should have created were it not for Sun’s tolerance of phone manufacturer “differentiation”.

Because so many programmers already knew how to use it, Google decided that the right programming language for Android was Java, but that the hot mess of Java ME should be avoided along with Sun. They created a whole new universe of helper functions with different names and architectures while ignoring those created by Sun for Java ME. But in order to use the Java programming language, they had to implement the core language functions of Java, and it just so happens almost all of those are also implemented as libraries of helper functions too. So Google took the function prototypes of those core language capabilities from Java SE and wrote (or otherwise obtained) completely unrelated code to implement them.

To a programmer, doing so seems obvious and unremarkable. Google didn’t copy implementing code from Java SE; they wrote a fresh implementation of the programming language, just as generations of software tool companies had done for every programming language. To Sun, while it was regrettable in revenue terms that Google had decided not to follow the path to Java ME, at least they were using Java as the programming language for Android while driving its adoption and market growth in a whole new, completely different market. Far from litigating, Sun welcomed Android and promised to support it in their open source NetBeans IDE.

Lighting Up

Just three years later, Oracle acquired Sun in early 2010 and took over stewardship of Java. Oracle then immediately sued Google for patent and copyright infringement over their use of Java. Despite seeming promising, the patent infringement case was quickly dismissed, leaving only the weak copyright complaints. That was when the gaslighting started.

The heart of the lawsuit’s copyright strategy was an attempt to persuade courts that the reality software developers understand is not real. In this case, Oracle’s legal team aimed to persuade the court that the term “API” didn’t refer just to an application programming interface in the sense of a set of function prototypes, but to the whole body of code implementing it as well. They then used an artificial distinction for elements within that presumed body of code, “declaring code” and “implementation code”, so that function prototypes sounded like they were part of the whole work and weren’t just placeholders. When practitioners spoke from their experience without defining “API”, this framing meant their factual statements sounded like they supported Oracle’s case.

By seeding these and many other complexities to reframe reality, the court was led down a path of treating function prototypes as if they were part of the implementation code itself. With this sleight of hand, it was then easy to characterise use of function prototypes as if it was appropriation of the code. This created cognitive dissonance in anyone already familiar with programming, resulting in many attempts to clarify with analogies. That seemed to include the district court judge, William Alsup, who I remember asking me at the end of my witness testimony in the court how I understood an API.

While Alsup saw through it, by building on this constructed complexity Oracle managed to persuade the CAFC (essentially a patent appeals court) to overturn the thoughtful judgements of Alsup’s district court. Like the dissenting option to SCOTUS from Justice Thomas and the outrage of IP maximalists after the case, CAFC’s finding was simplistic in its handling of the reality understood by developers and heavy on bad assumptions about software, based partly on being patent specialists and partly on not understanding about function prototypes.

Every conversation about the case with Oracle’s staff and legal team had the feeling of cognitive dissonance that’s characteristic of being gaslighted. They sought to make every practitioner challenging their position feel they were inexperienced, naive and lacked understanding of the technology. This went on for years. The feeling of despondency that accompanied the final CAFC holding, once again overturning the district court’s reality-based judgement, was overwhelming.

Extinguished by SCOTUS

So the decision of the Supreme Court on April 5th was like finally being released and affirmed. Wisely, the court avoided the byzantine complexities that had enabled the gaslighting in the first place. SCOTUS asserted that since a reversal on the fair use matter would render any outcome of the copyrightability issue moot, they would only expend effort on the fair use matter. They then held that — regardless of the extent to which an API is copyrightable — if a party “reimplemented a user interface taking only what was needed to allow users to put their accrued talents to work in a new and transformative program, [the party’s] copying of the … API was a fair use of that material as a matter of law.” 

Justice Breyer, who had been a leading copyright scholar prior to his judicial career, has written for the court a wise, strong, precedent-setting outcome that reflects the reality programmers expect, which is that the use of an external function declaration alone doesn’t give others a control point. That expectation has been almost universal for the whole history of programming and SCOTUS has correctly upheld the consensus of the public in the face of self-serving gaslighting. As if to confirm the practical effect of the finding, Justice Thomas has voiced the outrage of the copyright maximalist community using the conceptual framework of the gaslighters in his dissent. It seems even the dissenters agree the court’s decision is strong.

While there is obviously a risk of future cases exploring the limits of what constitutes a user interface in API terms (and of course nothing in this article should be understood as legal advice}, it seems that in the majority of cases concerning open source developers, the reality they expect will also be the reality in law.


Many thanks to the friends who checked this over for me, especially Richard Fontana and Rich Sands. All the errors remain mine.

*(It’s sunlight)

One Last Push To Save The API

A group of computer experts – including me – asked a US court to think again about fair use of APIs this month.

Tomás Saraceno artworks at SF MOMA: Stillness in Motion—Cloud Cities

It was an unlucky fact that Oracle’s case against Google over Android started with patents. Their initial case fell apart almost immediately, with almost all the patent claims invalidated. The implausable backstop copyright case Oracle made against Android’s use of language-essential definitions in the Java APIs (and thus against the freedom of developers everywhere) carried on though. The initial patent case meant that the appeal when Oracle soundly lost ended up at the Court of Appeals for the Federal Circuit (CAFC) — the specialist patent appeals court in the USA — and not at a court competent to dispense copyright justice.  Continue reading

What Is An API? The Clue Is In The Name

Wild Webmink

At the end of my testimony in the recent Oracle v Google trial in San Francisco, Judge Alsup asked me to explain what an API is. My answer aimed to simplify the answer for a general listener while remaining recognizable to most programmers. Here’s what I said.

The Java source code of OpenJDK usefully follows a layout convention. Up front of each file is a copyright and license statement. After that come a sequence of definitions of the various standard functions that complete the Java programming language. Together, a set of related definitions comprise a class library.

Each of those definitions comprise three parts. There is a function declaration, which defines the name of the function and the order and data types of the parameters used by the function. After that is a comment block with a summary of the specification for the function, tagged to allow it to be…

View original post 319 more words

EFF Rallies Industry Leaders

Last May Judge Alsup ruled that APIs are not copyrightable. Oracle was left flat on its face, even handing over $1m to Google at the conclusion of the case they had claimed would end with their own pockets being well lined. Feeling somewhat put out by this result, Oracle decided to appeal the decision on the Federal Circuit.

The case has been well covered. Almost everybody with a working understanding of the case is in agreement with the ruling. If APIs were copyrightable the software industry would be transformed in a very negative way, stifling innovation.

A number of amicus briefs have been submitted to the proceedings to make these views known, including one from the EFF, to which Meshed Insights’ Simon Phipps is a signatory. The message of the brief is clear; Oracle should not be pursuing this. Alsup’s ruling accurately reflects both industry and legal perspectives on the case.