Can I infringe on copyright “from memory”?
My previous post brought up another interesting line of thought I've been mulling over lately. Magazine X publishes a photo spread of a pretty girl in a themed setting. (That the girl was mostly naked isn't important, but this is an actual case concerning a couple of "men's magazines," back in the '90's, IIRC.) Magazine Y sees that spread, thinks it's pretty nifty, and has their crew find their own pretty girl, build their own similarly themed set, and publish their own photo spread that looks much like the original, down to the poses and camera angles. The court ruled in favor of Magazine X... Magazine Y had intentionally infringed on their copyright by "reproducing" their artistic work, even though there was no mechanical "copying" involved.
Hm. Okay, so five years ago, I was working for Company B and I wrote a lot of utility code in the five years I was there. So I moved to Company E, and I quite wisely took none of the code I wrote for Company B with me because that would have been illegal. (Note: This is a fictionalized account of my career.) But here in Company E, I find that I need a script that backs up a server. I wrote one for Company B, but I can't legally reuse that code at Company E (if I had a copy of it), because the copyright for that code belongs to my former employer. So I decide to write that code from scratch. Yet... based on my personal coding style, form following function, and having actually written a solution for this exact problem once before, the code I write for E is very, very similar to that which I wrote for B.
Setting aside the unlikely event that anybody would realize that I did this, is that copyright infringement? In light of the photo infringement above, it seems to me that this is basically the same thing. I recalled the copyrighted work that someone else owns and attempted to reproduce it, claiming ownership of the reproduction for my new employer.
I think this happens on a practical basis regularly in computing, but we don't really think about it. Yet I think, technically, it's a violation of copyright. Imagine a world in which a software developer not only had to deal with "non-compete clauses", but had to deal with not being able to reproduce any code he has written in the past for another employer. That would certainly "break" the development world. Previously, I mentioned that I feel like a lot of my utilities and code snippets are the embodiment of my programming knowledge... this is the converse (inverse?) situation. When I write that backup script, I'm not copying a previous work, I'm embodying my knowledge in physical form. Is there really a difference between my writing a shell-script menu loop from memory and copying that menu loop from a library snippet? I don't think so... except the latter is faster and less error-prone, therefore more pleasant for me as well as cost-effective.
I consider programming to be capable of "artistic expression". A good programmer recognizes and delights in elegant code and elegant solutions. But I'm not convinced that all code should be subject to copyright in the way that fiction, non-fiction, music, etc should be. At a basic level, we have a "useful article" issue... the pattern for a basic kitchen chair is not subject to copyright, because a chair is a functional article, a "useful object", and copyright does not allow for protection of function, only expression.
There is only one way to write a Bash for-loop. The variable name can change, the data looped over can change, and the steps between the top and bottom of the loop can change... but the basic structure of how a for-loop works is fixed. Nobody can claim copyright over it. At what point does your "useful article" for-loop quit being "common" and become a protected "expression"? This starts to feel more like patent territory than copyright... at what point is a program innovative enough that it's not unintentionally reproducing hundreds of other programs written in the same situations? When is it not just a "dump" of programming knowledge but an actual novel creation?
Who owns my code?
As a *NIX systems administrator, I write a lot of utility code. Backup scripts, configuration scripts, that kind of thing. I run my own personal Linux servers and workstations at home, and because I work and play in very similar computing environments, much of what I do at work applies to what I do at home and vice versa. I learn how to configure my mail server to handle multiple domains at home and apply that knowledge at work. I learn how to set up DNS at work and apply that knowledge at home. (In fact, I have so many different domains at "home," my home setup is often more complicated than work... sometimes I think there's an imbalance between things learned on the job and things learned on my own time, and it leans in work's favor.)
But in the course of doing all of this, I inevitably write code in one place that I have a use for in the other. Case in point, I have a bunch of remote backup scripts I wrote to backup my server and all my workstations to local disk, keeping N days worth of changes, etc. I worked out the whole scheme on my own time, have tested it extensively on my own systems and have been using it for over a year. When I needed to back up my new work laptop in the same way (because it's the only machine I have at work now and it's never on the "work" network when the backups run), the obvious solution was to just copy over the software I'd already written, tested, debugged and proven. It's a much more robust solution than the quick-and-dirty backup another admin wrote to back up our webserver. (That one isn't backing up the MySQL database properly. I need to convert it over to my script.)
So ownership here is easy... I wrote it on my own time, it's mine. I can slap my copyright on it and license it for my company's use out of the goodness of my heart. (My annoyance at reinventing a wheel I already invented saves the company money. I could justifiably rewrite that code from scratch on company time, as there's no obligation to give the company the fruits of my personal labors for free.)
But what about the other way around? What if I wrote that backup software on company time? Traditionally, that's work-for-hire and is owned by the company. Being that our company lacks any specific agreements to the contrary, that's is the legal situation where I work (unwritten, informal agreements don't really count in copyright court). Yet, to the seasoned developer's mind, it doesn't make sense to look at the work I've done and have to recreate it from scratch in order to use it from home. Culturally... do developers pay attention to copyright law and the employer's ownership of their code for little utilities? My experience is that they don't.
I think this also works out in the employer's favor... an experienced developer doesn't just take with them code they wrote on the job when they leave, they bring with them all of their favorite little utilities that they've written on past jobs, that they wrote in school, that they wrote on their hobby projects. And often, when they move on, they leave copies behind. The tech support guys use a script I initially wrote over ten years ago when I worked for an ISP. It doesn't look much like the original script, but it has ten years of improvements on it. I wrote it because I needed it, but I've used it at every company I've worked for and passed the current copy on to others in my department. When I move into a new job, I bring with me a whole library of tools that make my job easier, and often make others' jobs easier.
The irony is that if we strictly followed copyright law, treating work-for-hire code as something I can't take with me, and treating any code I wrote on my own time my property and unusable at the company (without paying me a licensing fee), I think the computing world would be in a world of hurt. I'd feel crippled every time I moved to a new employer. (Much like I felt at Company B, when they told me Emacs was not approved software and I'd have to use the "original" vi.) Taking the time to recreate some of my basic tools would be a stupid waste of time... my previous employer would not benefit from it, and I would suffer for it, and I would be less valuable to my new employer.
I see writing these utilities as a lot like learning a new programming language or learning how to manage Sendmail... the employer can't stop me from taking that knowledge to my next employer. And part of that "knowledge," in my mind, is embedded in the code I've written. Quite literally... I have a whole folder full of snippets that I reuse, or use to remind myself how to do something. To me, those are "mine" in the sense that my knowledge of Perl and Unix are "mine".
Learning Flash ain’t so hard
So while I'm learning ActionScript 3 and trying to write games with the Flixel game library, I'm reading the Flixel forums. And it's educational... the number of "kids" who have jumped into Flash programming as their self-introduction to software development is high. What's funny about it is how obvious it is that some of them haven't learned the fundamentals.
"The random number generator keeps giving me a floating point number and I need integers from 1 to 20. It took me a long time to come up with this solution, so I thought I'd share it here."
It was more or less the right solution (though I don't know why they abandoned Flixel's random() function to call on Math.random() when they both do the same thing), but it struck me... dealing with random numbers is a beginner's problem, and I dealt with it long before I was doing graphics programming, or even had libraries outside the core language to work with.
And this is where it occurs to me that I have it easy learning ActionScript. I already know the fundamentals. I can't imagine how intimidating the vast Flash library must be to someone who doesn't take for granted the knowledge of how to generate a random number from an integer range.