Live data from Hacker News

Things to commit just before leaving your job

gist.github.com

61–70 of 165 posts

Re: Things to commit just before leaving your job

#61
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…

I don't think anyone is seriously advocating people do these to company assets. This is just stuff that would be funny in a hypothetical scenario rather than a suggestion.

Re: Things to commit just before leaving your job

#63

Earlier quoted context omitted.

> Omitting volatile can lead to nasty concurrency bugs (e.g. if the optimizer optimizes spin locks away). In the worst case, such bugs are extremely hard to reproduce (and thus debug) but lead to deadlocks and/or crashes in case they do occur. In C and C++, volatile is not intended and must not be used for synchronisation primitives, it is not a memory fence (so it does not force cache coherency and does not prevent…

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

Re: Things to commit just before leaving your job

#67

Oh I so desperately need a PHP equivalent right now.

PHP actually allows much less mischief here than C or, say, Python does. It doesn't let you redefine or delete functions, classes or constants, unlike C where macros can be abused for this, and Python where you can delete anything.

But you could hide all errors if you want to screw with people:

  error_reporting(0);
  set_ini('display_errors', '0');
  set_error_handler(function () { return TRUE; }, E_ALL | E_STRICT);
  set_exeception_handler(function ($ex) { });

Re: Things to commit just before leaving your job

#68

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.

Re: Things to commit just before leaving your job

#69

It is always a funny joke to say "commit this when you leave a job". But I always wondered if there are people that actually do this. Although it could be funny and give a sense of revenge for some wrong (perceived or real) that the person leaving might have suffered, I don't think this would be a good idea. Contracts usually include liability for gross negligence or wilful misconduct. Does anybody have a record of t…

The problem with doing this, besides being incredibly unprofessional, is that it won't really affect the company much - besides reducing productivity for a little while - however it will annoy the hell out of your previous colleagues. Unless you're leaving because you fell out with your colleagues, I doubt it would have the desired effect.

Or it will teach the company to use some kind of VCS.

Re: Things to commit just before leaving your job

#70
post #37

Something I wrote to amuse the junior front end developers here: document.write('Error: Script not found.'); var node = document.currentScript; if (node.parentNode) { node.parentNode.removeChild(node); } Pop that in a JS file called something like jQuery.min.js and add it to an HTML page with the usual . It'll run when the page loads, add the line of text to the page, and then it'll remove it's own tag so there's no…

'View source' shows the HTML source, not the DOM, in both Firefox and Chrome. Maybe you're thinking of the developer console, or the Firefox 'View selection source' feature?
Post reply on HN