The Darker Side of Google & Open Source: Taking without Attribution

So, once upon a time (January 2003), I wrote a rather neat little article about an algorithm I invented called a “Bip Buffer”. It’s basically a circular buffer, split into two parts. It makes writing TCP/IP networking code easier and faster, because it allows you to operate on data contiguously as much as possible. This increases throughput.

(And hey, they’re teaching it at Brunel University in the UK – EE2066 - Computer Architecture & Digital Systems has a reference to it in their powerpoints. Yay ego boost!)

I originally invented it while at Intelligent Ion, working on an ultra-fast miniaturized Mass Spectrometer. I needed something that would act as a circular buffer, and I couldn’t find anything available that didn’t write one byte at a time. So a bit of thought later, a few Aha! moments, and hey presto! Something that let me squirt data FAST through our pipes, and that actually was worthy of writing up.

So I wrote a little article and put it up on CodeProject along with full source code. The only requirement for using the code was that you send me an email if you use it, letting me know how it’s being used. Just because I’m curious.

That, by the way, was the only requirement. No, it’s not public domain, but it’s a hell of a light licensing requirement.

Anyway… fast forward to a few years later.

A Few Years Later

By now, I’ve had about 8 emails. Not bad, I thought. Okay, maybe it wasn’t as cool as  I thought, but still, it was worth it. Cool little thing to have in my bag of tricks.

One was from an observatory who were going to use it in their code. They’ve given me a standing offer to come check the place out whenever I’m in town. I love offers like that – I get to meet very cool people along the way, and I’m all about new and exciting experiences.

Fast forward even more years later, to the present day.

Even More Years Later – The Present Day

Just for kicks, I decided to do a search to see where my little chunk o’ code has been used. And that’s where things got interesting.

You see, it’s in the Google Android Source Code now. Don’t believe me? Check this out:;a=blob_plain;f=adb/sysdeps_win32.c

It’s not quite the same code, but it certainly has the same name for the data structure, and uses my algorithm. Here’s a snippet from that page:

* basically, we use two circular buffers, each one corresponding to a given
* direction.
* each buffer is implemented as two regions:
*   region A which is (a_start,a_end)
*   region B which is (0, b_end)  with b_end <= a_start
* an empty buffer has:  a_start = a_end = b_end = 0
* a_start is the pointer where we start reading data
* a_end is the pointer where we start writing data, unless it is BUFFER_SIZE,
* then you start writing at b_end
* the buffer is full when  b_end == a_start && a_end == BUFFER_SIZE
* there is room when b_end < a_start || a_end < BUFER_SIZE
* when reading, a_start is incremented, it a_start meets a_end, then
* we do:  a_start = 0, a_end = b_end, b_end = 0, and keep going on..

And I’ve never had an email from Google so much as telling me they’re using it. This is bad, folks. I had ONE single requirement to use that algorithm & code. Only one. And it was tiny.

On the plus side, however, my algorithm and a variant of my code has now been reused in every Android device out there. Nice kudos.

Or it would be nice kudos if they’d sent me the email. Or even left a link in the code to my original article. To add insult to injury, this is at the top of the source file:

/* Copyright (C) 2007-2008 The Android Open Source Project


** This software is licensed under the terms of the GNU General Public

** License version 2, as published by the Free Software Foundation, and

** may be copied, distributed, and modified under those terms.


** This program is distributed in the hope that it will be useful,

** but WITHOUT ANY WARRANTY; without even the implied warranty of


** GNU General Public License for more details.


Not only do they claim copyright over everything, but they GPL’d it as well. I hate the GPL; I don’t have a problem with the BSD license. But GPL? No, sorry, I gave away my original code for everyone to use – not to virally license it.

Here’s my original copyright, for comparison:

Copyright (c) 2003 Simon Cooke, All Rights Reserved

Licensed royalty-free for commercial and non-commercial
use. All that I ask is that you send me an email
telling me that you're using my code. It'll make me
feel warm and fuzzy inside. emailaddress@here-removed to prevent spam


But boy, that code looks a lot different than mine. I wonder where that came from?

So Where DID It Come From?

Well, Nettee is using the code – but they attribute it to me originally in the docs. So no harm no foul there. (Thanks guys – you rock).

PyroEmu is using it too: – and they attribute the algorithm for me, but claim the code for themselves… personally, I think my version was cleaner. Still at least they attributed it to me.

But Google? Nooooooo.

And yes, I know I’m blowing this up a bit out of proportion. I don’t mind Google using my code – and let me make that very clear yes, google, you can use my code and algorithm. Please don’t take this as any kind of request to remove it. But in this day and age when we can’t all be Donald Knuth any more, it’d be nice to get some credit for my work. Especially because that’s all I asked for it. I didn’t even patent it.

Credit where it’s due, Open Sourceys. Don’t get all giddy about your free culture without giving back to those who make it possible for you.

And stop putting GPL on my code. It’ll give you hives.

About the author

Simon Cooke is an occasional video game developer, ex-freelance journalist, screenwriter, film-maker, musician, and software engineer in Seattle, WA.

The views posted on this blog are his and his alone, and have no relation to anything he's working on, his employer, or anything else and are not an official statement of any kind by them (and barely even one by him most of the time).

Archived Wordpress comments
Luke Trevorrow wrote on Sunday, February 7, 2010:

Si, if you think you have a case, (and I think you do), you should contact Google or the FSF; they would be the first to reprimand anyone stealing GPL'd code.
Your biggest mistake was not putting a license on it. I also dislike GPL for its viral nature, and prefer the Artistic license, and this would have protected you from thieving toe-rags.

Simon Cooke wrote on Sunday, February 7, 2010:

No need really… to be honest it's an algorithm, and I'm a big believer in algorithms being free. However, it would be nice to at least get a little tiny bit of attribution for what I did.

I guess I could go in there and add a reference to the article + an attribution myself, but that's not really the point.

My beef is purely and simply that they should have been nice, and just sent me an email. It's not too much to ask.

Daniel Gan-Levi wrote on Monday, October 18, 2010:

Just a small correction, the Bip Buffer is a part of only the android debugging server, and on windows only. Hope that it doesn't hurt your pride too much; after all it is a great data structure, and probably underused.

facebook comments