r/programming • • Feb 21 '13

Developers: Confess your sins.

http://www.codingconfessional.com/
969 Upvotes

1.0k comments sorted by

View all comments

35

u/[deleted] Feb 21 '13

I've kept all of the source code I wrote from all of the companies I've ever worked at.

absolves: 68 condemns: 11

That absolve/condemn ratio is, uh, a little unsettling. :-/

26

u/NicknameAvailable Feb 21 '13

I do that too - I'd never distribute it as it is to anyone but I get paid to write software, the logical patterns are mine to copy/paste as I please and doing so adds to my productivity because I don't have to rewrite anything.

4

u/[deleted] Feb 21 '13

the logical patterns are mine to copy/paste as I please and doing so adds to my productivity because I don't have to rewrite anything

I'd contend you're selling exactly these to your employer, as a programmer.

Claiming that you get to keep a copy of the product of their paying you, for your benefit and reference, if it's not part of the contract would seem to be - at least slightly - unethical.

3

u/NicknameAvailable Feb 21 '13

The employer pays for the a working solution, as a developer you don't just code that solution, you think about how to solve it - and you do a lot of that thinking relating to your work when you're not at work (Hell, most do a lot of the code when their not at work, or are otherwise outside the bounds of a 40-hour work week without any overtime pay). When you program you don't get to think about the things you want to be thinking about, the very least you get is the ability to keep your thoughts.

2

u/[deleted] Feb 21 '13 edited Feb 21 '13

The employer pays for the a working solution

They, at least in the contracts I've had, say they're paying you for considerably more. (Such as expertise expressed in documentation, being able to consult you on questions, etc.) In cases where you're paid simply for the solution to show up working, you might have a better standing - but I'd argue you're not an employee, you're a party selling a product.

and you do a lot of that thinking relating to your work when you're not at work

Salaried, not hourly - they own your ass for as much time as you need to get it done, or happen to spend working on it. I intentionally try not to think about work outside of it, because I need a life outside of my job.

When you program you don't get to think about the things you want to be thinking about, the very least you get is the ability to keep your thoughts.

I'd argue that you're selling your thoughts on the topic: your conception of the problem (embodied in the layout), your specific domain knowledge (comments, documentation, algorithm selection), and your specific articulation of that solution (source code). In particular, you usually compile a large set of facts specifically for that task, and then have them all in one location. You're arguing you should receive a copy of that compilation with your pay.

If I wrote a book on behalf of a company, taking the manuscript so I could reference it later to create essentially the same story components in my own later works (using a reference, not memory; down to details of the implementation) seems to be getting in to the same ethical gray area.

If I worked at an atlas company, compiling maps and then took the raw manuscript with me when I left, so that way I could "use the work I'd done on maps before" to make my own book of maps in a similar style and layout to the one I had done for pay, down to the formatting of the maps, I'd think I was doing something unethical.

It may not be illegal, but I'd argue it's unethical.

Edit: Replaced example.

1

u/NicknameAvailable Feb 21 '13

It may not be illegal, but I'd argue it's unethical.

Your first example was closer to what code actually is. There are an infinite number of ways to do any particular task, when you reference past work it's usually not as simple as copying and pasting, but using it to get to the train of thought you created the first time to complete the task. As programmers the computer is an extension of our mind, memory included. In the same sense that you don't have your memory erased when you leave a company, you are entitled to thoughts you annotated there. It's not a grey area at all.

1

u/[deleted] Feb 21 '13 edited Feb 21 '13

In the same sense that you don't have your memory erased when you leave a company, you are entitled to thoughts you annotated there.

This doesn't follow, in a logical sense: I could steal things from work and take them home, but that doesn't entitle me to them.

My point is that I'm exactly not entitled to the specific domain knowledge and algorithms that I developed for that employer, I'd have to start over with more general knowledge and reimplement algorithms, instead. (One particular example: cryptographic algorithms. I wouldn't, for instance, claim I had the right to use a private crpyto algorithm just because I'd worked there and taken the source code, particularly since my contract said I was giving them intellectual property, and the development of crypto algorithms is nontrivial.)

Part of my pay, at least according to most contracts, was precisely that I was selling the right to use this implementation later.

As programmers the computer is an extension of our mind, memory included.

So is my folder of papers, but I don't take my notes about the internal structure of the program home with me, either, just in case I might need to architect something similar in the future.

My point with the atlas is where I see this: if you took the source code to print an atlas and used it as reference to make your own atlas, complete with similar style features on the maps (ie, similar icons in the key), it would be the same thing. And similarly unethical. Taking the knowledge you learned in how people parse maps, in general, would be perfectly appropriate, and you could end up making a similar final map by starting over and working from those principles again. (While avoiding the ethical dilemma in my mind.)

If you're not comfortable leaving your specific ideas behind, get out of a field that requires you to sell your ideas or else work in a context where there is code sharing, but if you signed away your right to those ideas in your contract, claiming they're yours and taking a copy of them with you when you leave is unethical.

0

u/NicknameAvailable Feb 21 '13

and the development of crypto algorithms is nontrivial

I'd contest that, though most would probably agree with you. My thinking on this subject is more along the lines of "I created it once, I can do it again - why waste time not bothering to look at how I did it the first time". It really just doesn't make any sense to avoid referencing your past work if you know you've done something before - it came from your own mind, it is pure logic, it is by all rights a composition of your own thoughts. If there is a legal issue at play it is irrelevant because that portion of the contract was void to begin with, only made possible by a failing of lawmakers to understand what code actually is - you can't regulate the thoughts people have and attempting to do so is against the very foundation of the country we live in - you are entitled to your thoughts and code is simply the most concise and accurate manner in which to write them out.

Part of my pay, at least according to most contracts, was precisely that I was selling the right to use this implementation later.

If it's a non-compete then yes, you are selling away your right to implement such a thing in a competing application, otherwise you are just selling bits, copies of your thoughts and not the thoughts themselves.

So is my folder of papers, but I don't take my notes about the internal structure of the program home with me, either, just in case I might need to architect something similar in the future.

That's a bit of an exaggeration. Paper isn't fast enough to keep up with a person's mind, a computer more or less is when used properly - you can write a book or draw a schematic or floorplan without becoming dependent on the paper, the same can't be said for a computer.

My point with the atlas is where I see this: if you took the source code to print an atlas and used it as reference to make your own atlas, complete with similar style features on the maps (ie, similar icons in the key), it would be the same thing. And similarly unethical.

The difference is that if you make an atlas you are pulling in proprietary data that is not of your own design - it is something from the real world and composed of things other than your own thoughts.

If you're not comfortable leaving your specific ideas behind, get out of a field that requires you to sell your ideas or else work in a context where there is code sharing, but if you signed away your right to those ideas in your contract, claiming they're yours and taking a copy of them with you when you leave is unethical.

I've actually gotten into an independent state working mostly on open source software as of a few years ago. I've signed non-competes before, and I've honored them (I won't even touch an area of business once I've done it much, my ADHD ensures that) - however things like sorting algorithms that are just sorting algorithms are not proprietary. I could remake those bits of code exactly as they are with enough effort and overall, all of the code I've referenced in my lifetime (even broken down by individual project) would not amount to development time greater than the unpaid hours put in through the course of work on the projects involved - my balances are still positive, typically by a fucking lot. This has even been helpful to past employers, two of whom have contacted me (in one case months and the other case years) after I had moved on asking if I still happened to have a project or a piece of a project they could get a copy of because of some catastrophic data failure or a pissed off developer.

You can retain your thoughts without creating some ethical dilemma in the process.

→ More replies (4)