Pro tip: never add a "funny comment" especially an error message that's "never supposed to happen" unless you're happy with that message showing up in a board meeting, in front of your boss or worse (and it being traced back to you)
I did this once with the deliberate intention that be traceable. Holding down a few keys while clicking on a specific small set of pixels in an application we were developing for a customer would produce a specific message that was attributable to me personally. I did this sort of thing in most things I worked on back then, partially as a "calling card" and partially as a means of being able to prove my involvement in a given product if the need ever arose. This saved our bacon when a sales rep sent an "evaluation" copy of the nearly completed product to the customer, without authorization, that consisted of our entire source tree. (This was the 1990s and we were running MS-DOS, no file security)
Suddenly the customer tells us they have "repurposed" an "internally developed program" and they cancel our contract. The sales rep was upset that he would not be getting a commission on the sale and mentioned that he had "even sent them a demo", which led to the discovery of what had happened. My boss and I went to the customer's site to "finalize the paperwork", and when we were shown the application (which had extremely minor UI changes) I checked if the hidden click spot still worked, and it did! The customer was horrified. My boss was outraged.
We ended up getting paid the full contract amount plus a large bonus in exchange for agreeing not to sue. The sales rep decided to leave voluntarily rather than be fired.
There's a fine tradition of this, especially at early Microsoft. It's documented here: https://www.pagetable.com/?p=43 , and includes hidden messages that Gates allegedly added himself to prove that code the company licensed could still be traced back to him. (I hit the Ric Weiland one mentioned on my first computer, the Ohio Superboard II - https://www.pagetable.com/?p=43#:~:text=the%201977/1978-,Ohi... ).
This was all in the era of Gates' Open Letter to Hobbyists[1], when "Micro-Soft" was licensing their code to companies, perhaps because direct sales to hobbyists didn't work out.
I like the way you phrased this. Maybe someday academics will refer to Bullock's net the same way we talk about Occam's razor, or Maxwell's demon, today.
Listen. If it’s never supposed to happen then you definitely want a customer to tell you if it happens. Best way to make sure that happens is to insult their mum. It’s just good engineering discipline.
In my younger and more foolish years I worked for a company called Redgate and, whilst there, I had to do some licensing jiggery pokery that stopped people using our tools if the licensing code had been tampered with or removed.
I didn't want to make it too easy for people trying to crack our tools so, if such a problem were detected, the error message spat out to the console bore no relation to what had gone wrong.
By "bore no relation" I mean the error message would be one of a number of lines of dialogue from a scene in a House episode where House is trying to figure out who Wilson's girlfriend is... which led to this:
Yes, Greg Young (the event sourcing guy) ran into an error that said "Because I wanna ask you about your girlfriend. I must know who she is, or you would've told me her name," because he'd moved Smartassembly minus the licensing DLLs. Of course, he didn't realise what he'd done "wrong" so he tweeted it to his considerable following and it went viral.
Because I'm exactly the sort of walking cliche you'd expect I was blissfully unaware of the unfolding drama, being away on sabbatical snowboarding at the time. I hadn't taken my laptop with me, I'd disabled data roaming on my phone to avoid a whopper of a bill after a couple of months away, and had only a gen 1 iPad to access email and internet. So of course I came back in the evening to discover that it had all kicked off, with this ludicrous chain of emails where people were trying to figure out what was going on, until somebody had the sense to go and look in our source control system (which at the time was still svn for most things), and figure out that it was my fault.
People saw the funny side and it wasn't that big a deal but the reason I bring this up is that the last line of dialogue in that scene is, "Your mama," delivered by Wilson to House, and it was also the error message for the final failure scenario I was looking for. I'm glad that one didn't get printed.
Back in the nineties, 3D Studio used to be pirated by every kid in their dorm and more. The software had license checks all over the place apparently, but crackers tried to remove all of them.
However, if they missed one, it would move a random vertex by some random amount which is obviously very visible when rendering a 3D scene.
When people complained about this on forums (usenet mostly), they outed themselves for using pirated software.
You should be 100% sure that such code never ever gets executed by legitimate user. As seen above, it doesn't have to be a bug in licensing code, it could be something external.
Yup. Long ago, join an online Command and Conquer game. Boom, everything blows up. Piracy watchdog that reacted to my repairing Windows and not realizing I needed to reinstall the game after that.
System.exit(0); in Java is probably the most evil thing invented, when the license check fails (preferably launch a thread and do it without stacktrace, after a random time).
To this day I still think Google’s motto only referred to “Do no System.exit(0)”.
Sadly I mostly agree with this. File it with "the first time people get the password right tell them they failed, making them enter it a second time" and other janky but highly effective stuff.
I write alot of #![no_std] code in Rust and forgetting debug messages is luckily impossible because compiler won’t compile in the end if you forget something.