Of course, no one owns what's in your brain, but that's all you own. Move on.
That said, I still think that there are occasions where referring to past code is entirely ethical.
Say for example I forgot the mod_rewrite flag to do what I need, but I used the same flag for a client in the past and I still have a copy on my server. Instead of Googling around for it, which might take a couple minutes, I could look at the copy from before in a matter of seconds. That is the kind of thing I would do, and I certainly am not violating anyone's IP or copying any code. Would you still say this is unethical?
I'd draw the line at using the result of previous problem-solving that you've done for your employer. For example, in the course of my employment, I wrote a slider widget for my employer's product. I need a slider widget for my startup. Rather than using the code I wrote for my employer, I'm grabbing another open-source slider widget and modifying it as necessary. Same with utility classes - my employer wrote an OrderedDict class in Python, I need an ordered dictionary, rather than using my employer's I grabbed a third-party class off the net.
Believe me, I'm not holier than thou - you should hear me in traffic. But I really think that this is a black and white issue. I don't see any difference between illegal downloading and walking out of Walgreen's with a CD in your pocket. Or putting that extra chicken leg from the buffet into your purse. "They'd just have to throw it away, anyway." I don't care. Right is right and wrong is wrong.
I don't ever want anyone to get the impression I'd employ situational ethics in business (or anywhere else, either). And I do not want to knowingly conduct business with anyone that does. It's simply not worth it, period.
I once had a partner that drew the ethical line where it was most convenient for him. First, he copied software from one account to another. Then, he went through a client's employee's drawers looking for something to "save us a lot of time". Before I realized it, he was making back door deals with clients and vendors because he "didn't think I'd mind; it was money I'd wouldn't have ever seen anyway."
I'm certainly not suggesting that everyone progresses down that path, or that reusing tidbits of code is the same as murder. It's just that when it's time to draw an ethical line in the sand, my position is clear and firm.
Just a few antecdotes to give you an idea of how strongly some business people feel about this issue:
- An acquintance of mine was earning $150 per hour advising a Fortune 1000 company which multi-million dollar enterprise package to buy. As an aside, he brought in a buddy to sell printers to his client and split the profit. He was immediately fired and black-balled. The CEO's reasoning was, "I would have never known if we made the right decision."
- A vendor was presenting their software package to my client. They said, "We already know your industry. In fact, we sold a system to XYZ Company." My client immediately dismissed the vendor. He later said, "That's all I need. For one of his programmers to accidently say what I'm doing to an XYZ employee over coffee."
- My client went bankrupt. Their assets (including all IP) were acquired by a third party in the settlement. Imagine their surprise when they had to compete with my client's ex-employee who set himself up in a software maintenance business at 1/2 industry rates. How did he know who to call on and what software they had? The case is still in litigation, but that guy's name will forever be dirt in this town.
- A contractor at one of my clients accidently left a thumb drive on a desk he was using. It had 70,000 social security numbers on it. What were they to think?
I could go on and on. They are some real slime balls out there. There are also plenty of good people who make stupid decisions to save a little time because "it doesn't make much difference anyway". How are people supposed to know the difference?
And when it comes to technology, many business people are doubly in the dark. Sometimes, TRUST is all they've got. It's so ridiculously easy for many of us to earn a nice living (try digging ditches instead), why would you ever jeapordize that over something so trivial?
I agree with you that drawing the ethical line wherever it is most convenient is bad. In fact, I have discussed or debated ethics online a few times in the past, and I was always in your position, saying that the issue is black and white no matter how convenient it would be otherwise. Perhaps this is why I am so interested in this thread, now that I am on the other end of it.
Anyway, thanks for your insight. Although I am still not convinced that anything I did was unethical, I will think twice before looking at past work again.
Edit: I don't know why someone modded down the parent comment, you did make a valid point.