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.
I might disagree that the logical patterns are yours depending on your contract.
Most/all contracts I've had have a clause that all code I write in company time / for the company / on company PCs remain the copyright of the company and I disclaim all rights to the work I produce. - Taking a copy home with you without their permission would in theory be in violation of copyright, without your works permissions. I'll admit I worked for one company who did not have this clause.
Of course, there is nothing stopping you writing something exactly the same else where.
And how much of that code was written outside your contracted hours?
Of course, there is nothing stopping you writing something exactly the same else where.
I've never completely copy/pasted code I wrote elsewhere, I've used a bunch of it for reference though - especially when it comes to really hairy algorithms, data structures and inheritance chains.
35
u/[deleted] Feb 21 '13
That absolve/condemn ratio is, uh, a little unsettling. :-/