News for hackers. Stuff that matters.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @03:41AM (#41738834)
The strings used for debugging at Google were supposed to include “DO NOT SUBMIT” which, a bot to check for this was added after a debug strings made it to production (It was before my time but I believe it was after the legendary WD incident- “western digital” was remapped to “woodly doodly” in test code that accidentally shipped for those curious)
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by riffraff on Friday October 04, 2024 @04:22AM (#41739091)
Was the debug string that made it to production embarrassing?

I remember a swearword appearing in a very big national company login form once, and I'd have felt sorry for the dev if it wasn't so hilarious.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by PetahNZ on Friday October 04, 2024 @04:56AM (#41739302)
Yea, I have seen a very inappropriate debug statement being left in the led to the dev being promptly fired.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by arethuza on Friday October 04, 2024 @08:06AM (#41740543)
I was leading a startup development team in the late 90's and one of our developers told me that some very inappropriate test data had been sent to IBM to be included in a product demo and burned onto tens of thousands of discs that they would distribute.

Eventually it turned out that it was the single word "sheep" - which taken out of the relevant alt.* context was pretty harmless.

Talk about a moment when I thought my career had crashed and burned...

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by MonkeyClub on Friday October 04, 2024 @11:05AM (#41742176)
> Eventually it turned out that it was the single word "sheep" - which taken out of the relevant alt.* context was pretty harmless.

Please, do contextualize it?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by HaZeust on Friday October 04, 2024 @10:46AM (#41741982)
Likewise; they tried to pin it on me, and I had to go to the Git commit history to show it was another employee. My administrative leave was promptly revoked.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @06:22PM (#41746073)
“Western Digital” was replaced with “Woodly Doodly” on the srp. Not really thag embarassing but I am sure WD didn’t appreciate it
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by raverbashing on Friday October 04, 2024 @06:12AM (#41739851)
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)
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mackman on Friday October 04, 2024 @06:45AM (#41740043)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by bartread on Friday October 04, 2024 @08:02AM (#41740520)
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:

https://gist.github.com/gregoryyoung/871736

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.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by tverbeure on Friday October 04, 2024 @01:23PM (#41743525)
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.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by grujicd on Saturday October 05, 2024 @07:58AM (#41749284)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by LorenPechtel on Sunday October 06, 2024 @12:07AM (#41754671)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by eastbound on Friday October 04, 2024 @02:13PM (#41744053)
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)”.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by m3047 on Friday October 04, 2024 @01:29PM (#41743575)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by eastbound on Friday October 04, 2024 @02:15PM (#41744069)
I believe you can get someone’s entire list of passwords this way.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by nicce on Friday October 04, 2024 @07:59AM (#41740491)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @10:43AM (#41741949)
The nice thing about DO NOT SUBMIT is that it worked in comments, text protos and other configuration files, and every language.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by Suzuran on Friday October 04, 2024 @08:57AM (#41740919)
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.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by MonkeyClub on Friday October 04, 2024 @11:09AM (#41742225)
> Holding down a few keys while clicking on a specific small set of pixels

Did you draw inspiration for it from Bullock's The Net (1995) by any chance?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by Suzuran on Friday October 04, 2024 @01:55PM (#41743860)
I don't think so; I don't remember ever seeing it
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by jpm_sd on Friday October 04, 2024 @04:07PM (#41745098)
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.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by dannyobrien on Friday October 04, 2024 @07:05PM (#41746338)
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.

[1] https://en.wikipedia.org/wiki/An_Open_Letter_to_Hobbyists

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by LorenPechtel on Sunday October 06, 2024 @12:05AM (#41754662)
Yeah, back in the DOS days I would normally embed something that would respond to specific nonsense.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by smitelli on Friday October 04, 2024 @08:07AM (#41740550)
> "DO NOT SUBMIT"

Kinda verbose, ain't it? Just speaking from my own personal experience, usually when I resort to print-debugging I'm already pretty punchy and more likely to use a quick "ASDFASD" or similar.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by bipson on Friday October 04, 2024 @09:09AM (#41741007)
Yes, but you can check for "DO NOT SUBMIT" with automation.

You can't automate checking for random strings, right?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by neutronicus on Friday October 04, 2024 @09:28AM (#41741172)
Perhaps an abbreviation would be the best of both worlds, and debug strings should be prefixed with "DNS"

You won't need to submit that particular string working at Google, right?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by tetha on Friday October 04, 2024 @11:55AM (#41742693)
We could also have an acronym for the more severe "DO NOT SUBMIT - SECURITY EXPECTATIONS COMPROMISE".
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by pixl97 on Friday October 04, 2024 @01:48PM (#41743767)
DNS-SEC...

Confused sysadmins wondering if this is SOX code...

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by Tyr42 on Friday October 04, 2024 @09:38AM (#41741258)
The automation which can check for do not submit itself is hard to submit. Or at least updates to it are hard to submit.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by Dylan16807 on Friday October 04, 2024 @01:28PM (#41743569)
forbidden_string = "DO NOT " + "SUBMIT"

Seems easy enough?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by organsnyder on Friday October 04, 2024 @02:05PM (#41743970)
Just disable that particular linting rule (or however it's implemented) in that repo.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by pjerem on Friday October 04, 2024 @12:55PM (#41743277)
Well in the LLM era, you could. I’m not sure you should :)
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by trelane on Friday October 04, 2024 @01:36PM (#41743657)
> You can't automate checking for random strings, right?

No, but you can make the string configurable.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by anyonecancode on Friday October 04, 2024 @01:56PM (#41743877)
Related in terms of being easy to search for, I use the abbreviation "TK" as a placeholder for text or incomplete code. Took this from the publishing industry (my partner worked in magazines) -- it's a combination that does not appear in regular English and so is easy to both see and to use search tools for.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by ASUfool on Friday October 04, 2024 @04:50PM (#41745454)
I hope you never built a rooTKit.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by anthk on Friday October 04, 2024 @06:44PM (#41746201)
TK is a semi-well known widget toolkit/GUI toolkit which came from TCL and today it's the default toolkit for Python. Nothing fancy, just basic menues/buttons and widgets, but they get the job done in a hurry.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by EvanAnderson on Friday October 04, 2024 @09:48AM (#41741360)
> > "DO NOT SUBMIT"

> Kinda verbose, ain't it?

I always used the word "doberman" for this purpose. I've never written code for a project that legitimately included the name of a dog variety. A simple grep for "doberman" in the production release CI pipeline catches it. If one ever did slip thru I figured it wouldn't be too offensive to anybody.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by durumu on Friday October 04, 2024 @10:00AM (#41741494)
I've used NOCOMMIT. Less verbose, equally clear.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by domoritz on Friday October 04, 2024 @10:44AM (#41741960)
I'd be scared to spell it with one M or two Ts.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by HaZeust on Friday October 04, 2024 @10:45AM (#41741965)
Not if a layperson comes across it and you miss an omission.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by hotspot_one on Friday October 04, 2024 @10:40AM (#41741921)
depends. If you are paranoid and afraid of dogs, ...
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by corobo on Friday October 04, 2024 @10:13AM (#41741645)
I use xyzzy

- Nothing happens

- Easy to find string in code, output, wherever

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by medstrom on Friday October 04, 2024 @12:06PM (#41742786)
And in GNU info manuals. https://www.gnu.org/software/emacs/manual/html_node/elisp/Se... Just so happened to be reading that in the next tab.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by rlpb on Friday October 04, 2024 @10:54AM (#41742063)
XXX is already highlighted by most editors by default (or at least mine) and seems suitable. Any comment to be committed to a shared branch should probably contain more specifics and not contain that, if you wanted to institute a policy.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by twic on Friday October 04, 2024 @11:07AM (#41742198)
I use the strings "XXX" and "999" for this (the latter because you sometimes need a dummy value in a numeric context), and have a global git hook which stops me committing a changeset which includes them.

I occasionally need to override the hook, for example when using mktemp -t, or when some floating-point data actually contains a run of 9s. But mostly, it is quite specific at catching stuff that shouldn't be checked in.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by metrognome on Friday October 04, 2024 @11:32AM (#41742475)
It's about writing code that your peers can read. "DO NOT SUBMIT" is clear as day. "ASDFASD" probably does not mean "this is a debugging string" to most people.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @11:44AM (#41742590)
Not really? it’s close to the minimum string you’d be okay with never actually wanting to commit. Never had a problem with it in logs, but it could be in a comment next to the log if you did. Easy enough to add a shortcut for if you really have a problem typing it out, but at my typing speed my brain has always been the bottleneck, not the number of characters.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by names_are_hard on Friday October 04, 2024 @12:10PM (#41742837)
I worked on a codebase that had a special logging function with a name like NoPushLog that was just a direct wrapper of the base log function. A githook checked that this string was not in pushed code.

This solves many of the concerns raised in this thread about readability, automation, avoiding typos in the magic string.

The tricky thing you have to solve is how to push the code that defines the custom logging function, but there are solutions.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @12:41PM (#41743147)
It doesn’t allow you to put that in comments, config files or other languages though like a plain text string.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by sneak on Friday October 04, 2024 @02:22PM (#41744131)
Why wouldn’t it? Sounds like the git hook is probably just grep…
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @06:20PM (#41746062)
Then why have a function?
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by saagarjha on Friday October 04, 2024 @10:19PM (#41747246)
Because it distinguishes the normal logging function from the ones that are for local debugging.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by ajb on Saturday October 05, 2024 @04:15AM (#41748434)
Because of you made a typo, you're more likely to notice than in a comment or string, because it will fail, even at build time if you're using a compiled language
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Saturday October 05, 2024 @10:54AM (#41750306)
Right, but the whole point of DO NOT SUBMIT is that it doesn’t need to be in the compilation step. It can be in data files, comments, etc. You can change your syntax highlighting theme to spot the typos x (I added them with a keyboard shortcut anyways)
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by sneak on Saturday October 05, 2024 @10:35PM (#41754315)
You need to compile the code with all the debugging logging in it so it can run and print out all the “got here 3”s and so forth.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by default-kramer on Friday October 04, 2024 @12:14PM (#41742870)
I use "NOMERGE" plus the habit of grepping for it before I merge a branch.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by secondcoming on Friday October 04, 2024 @02:04PM (#41743958)
"GOT_HERE_1"
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by refulgentis on Friday October 04, 2024 @06:57PM (#41746279)
They pay you enough that you'll respect the need to be professional and write "DO NOT SUBMIT" over "ASDFASD" or similar.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by veunes on Friday October 04, 2024 @08:40AM (#41740788)
It's amazing how many processes evolve because of incidents like these.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by indrora on Friday October 04, 2024 @01:57PM (#41743883)
When I worked as a technical writer earlier in my career, we had a debug/prod check: If you used a series of words it would fail you in prod (refused to build). These were usually codenames of projects and such.

One afternoon, I added the phrase "[Ww]ombo\s[Cc]ombo" (it supported regular expressions) and an expansion set (&prodbomb; evaluated to &wca; &wcb; to create "womb combo") but only in prod. In debug builds, it would produce "Wombat Combat"in bright red text.

This was a useful way to mark pages as "Don't build this in prod yet" - a habit some teams had of just yolo'ing their development branches right into production instead of doing a rebase to main. More than one build was saved by it within a few months.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by thephyber on Friday October 04, 2024 @06:11PM (#41745999)
All of the comments seem to talk about automation for detecting sloppy logging.

Is nobody reviewing code before merging it upstream?

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by mattnewton on Friday October 04, 2024 @06:19PM (#41746052)
Belt and suspenders.

Every line was reviewed but that doesn’t mean it would be caught every time. And if it’s automatable to catch things like this it should be.

Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by thephyber on Thursday October 10, 2024 @05:17PM (#41803679)
Right, but I’m pointing out that everybody is using a belt and nobody suspenders.
Re:Why does man print "gimme gimme gimme" at 00:30? (2017) by CPLX on Friday October 04, 2024 @09:25PM (#41747021)
> "DO NOT SUBMIT"

That's pretty good advice if you find yourself dealing with a large tech company.