Live data from Hacker News

Things to commit just before leaving your job

gist.github.com

141–150 of 165 posts

Re: Things to commit just before leaving your job

#141
post #73
post #49

I would suggest before you leave your job, you say "it was nice working with you" to the people you liked working with, and absolutely nothing to those who you did not enjoy working with. The tech world is big in some ways, but also equally small in others. A select few might find this funny, but others will not appreciate their day (or longer) spent debugging your practical joke...and on the chance you actually get…

And if you do a code change, make sure it is really funny, is easy to fix and discover and is invisible to customers. Like, inject a hilarious joke into the log files or something.

A coworker at a previous job altered the company's internal web application so that when one specific user was logged in, about 1/20 of the time it would load a hidden iframe that played Rebecca Black's Friday. This stayed in place for a long time because the user couldn't figure out what was going on and was too embarrassed to ask anyone else about it. Instead, they turned off the computer's sound and started listening to music on their phone.

Re: Things to commit just before leaving your job

#142

Earlier quoted context omitted.

Why wouldn't you search for 'Script not found' in the source code..?

The point wasn't to leave people puzzling over it for hours. It was a bit of fun. But ... It'd be quite trivial to hide the string. var msg = ['E','r','r','o','r',':','S','c','r','i','p','t',' ','n','o','t',' ','f','o','u','n','d']; document.write(msg.join(''));

I gave a talk at BlackHat many years ago about JS malware, and proposed obfuscating malicious JS like this:

- Treat JS code like 7-bit ASCII

- For each character, convert the bits into white space. 1= space, 0 = tab

- A = "1000001" = space tab tab tab tab tab space

- concat it all together, \n shows you are done

So you can represent JS code as just whitespace. Which means this is malicious code:

//st4rt

//3nd

var html = document.body.innerHTML; var start = html.indexOf("//st" + "4rt"); var end = html.indexOf("3" + "nd"); var code = html.substring(start+12, end); eval(hydrate(code));

Re: Things to commit just before leaving your job

#143
post #73
post #49

I would suggest before you leave your job, you say "it was nice working with you" to the people you liked working with, and absolutely nothing to those who you did not enjoy working with. The tech world is big in some ways, but also equally small in others. A select few might find this funny, but others will not appreciate their day (or longer) spent debugging your practical joke...and on the chance you actually get…

And if you do a code change, make sure it is really funny, is easy to fix and discover and is invisible to customers. Like, inject a hilarious joke into the log files or something.

A coworker of mine, definitely not me, left an html comment in a template for a page on a fairly big website that read similar to "Help I'm trapped in a website factory". So anyone perusing the generated html might read that. Similar to the xkcd pi joke: https://xkcd.com/10/

Re: Things to commit just before leaving your job

#144

Earlier quoted context omitted.

Is that illegal though? Sure, if you can PROVE it is done on purpose then maybe, but assuming you cannot then is it? Because if it is then any misconfigured version control or any employee that doesn't do what is expected of them is also breaking the law.

Is it worth the risk to find out? Court ain't cheap, even if you win. As an employee of a company that provides you a paycheck, you "owe" them your best effort. If you don't want to try, quit - but don't sabotage. That is juvenile and perhaps illegal and certainly unethical.

> you "owe" them your best effort

Yeah, and the company "owes" you as high a salary as they can possibly afford...

Re: Things to commit just before leaving your job

#145
post #121
post #40

Earlier quoted context omitted.

He must be using push --force in that case.. which seems like a bad practise.

What they're doing is something like branching off a very old version of master, making changes to file A then trying to merge into the latest version of master, which already has a load of changes to file A. They then resolve the conflict by picking "ours", thus ignoring all changes on origin/master in favour of their own old version of master. This doesn't require a --force.

Oh, that seems even worse!

Re: Things to commit just before leaving your job

#146

The horror story that I heard was a disgruntled engineer silently replaced the source codes (C++ based) in the project with compiled binary object files and he kept the source codes on his local computer, not checking those in. He did this over an extended period of time to make sure this crept into the backup tapes as well. No one found out because each engineer owned a code module of their own. Then he resigned. Wh…

That's a good way to get your ass sued, or worse. Most employment agreements specifically state the company owns the code, which you have now stolen.

Re: Things to commit just before leaving your job

#147
post #63

Earlier quoted context omitted.

While you are absolutely correct, you will find no shortage of experienced employees at large companies that will disagree. In fact, they will insist that the only purpose of volatile is a primitive for synchronization. I actually had a conversation where a developer insisted that by declaring a variable volatile all operations on it were atomic. Of course at this same company a developer insisted that if you use the…

If those developers target Visual Studio exclusively, they are actually correct: https://msdn.microsoft.com/en-us/library/12a04hfd.aspx

That is pretty entertaining. It is also a good reason to never use microsoft development tools.

Re: Things to commit just before leaving your job

#148

The horror story that I heard was a disgruntled engineer silently replaced the source codes (C++ based) in the project with compiled binary object files and he kept the source codes on his local computer, not checking those in. He did this over an extended period of time to make sure this crept into the backup tapes as well. No one found out because each engineer owned a code module of their own. Then he resigned. Wh…

this is why we have code. reviews. haha. Yeah...I'd file a criminal lawsuit on his ass though.

"Criminal lawsuit"

These two things don't go together in most jurisdictions.

Re: Things to commit just before leaving your job

#149
post #130

Earlier quoted context omitted.

English isn't my first language, and I don't live in America so it's not like this matters to me, but now I'm curious. How is editing a source file you're meant to be editing "transmitting" anything?

The key is "without authorization". You're allowed to fix things and add features, but deliberate sabotage is arguably unauthorized. You might win in court, but as others said elsewhere, court is Too Expensive even if you win. That, and I wouldn't be surprised if they didn't go after you for industrial espionage or something.

Except that you're entirely authorized to access the computer system.

Purpose or intent isn't defined in that particular law.

Do you have authorized access? Well, as an employee you do.

This isn't a criminal matter, it's a civil one, and no company is going to sue a saboteur unless they need an example made; they stand to gain nothing.

A company doesn't get to retroactively redefine what "authorized access" is as it suits them.

Re: Things to commit just before leaving your job

#150

The horror story that I heard was a disgruntled engineer silently replaced the source codes (C++ based) in the project with compiled binary object files and he kept the source codes on his local computer, not checking those in. He did this over an extended period of time to make sure this crept into the backup tapes as well. No one found out because each engineer owned a code module of their own. Then he resigned. Wh…

this is why we have code. reviews. haha. Yeah...I'd file a criminal lawsuit on his ass though.

In the US, only the "State" can file a criminal lawsuit. Imagine trying to explain this crime to a county prosecutor!
Post reply on HN