News for hackers. Stuff that matters.
Re:Things I Learnt from a Senior Software Engineer by philwelch on Sunday August 25, 2019 @06:51PM (#20796151)
I think it's okay to be funny in test cases. For instance, my test data has included the user-agent string, "The Thrilla In Mozilla".
Re:Things I Learnt from a Senior Software Engineer by caymanjim on Monday August 26, 2019 @01:27AM (#20797638)
I think this kind of thing is fine; you're not talking about functional code, just placeholder text. I have no problem with humorous names in strings for simple test cases, where no one would ever search for it, and it has no real meaning. I've done the same sort of thing myself plenty of times.
Re:Things I Learnt from a Senior Software Engineer by dgritsko on Monday August 26, 2019 @12:08PM (#20800965)
I've certainly read apocryphal stories (perhaps on HN, can't remember) about offensive data being used in test cases "as a joke" and due to a variety of reasons having that data end up in production systems (visible to customers). I'm all for a bit of humor, but it's worth thinking about the issues that might be caused were your fake data to wind up on a production site.
Re:Things I Learnt from a Senior Software Engineer by philwelch on Monday August 26, 2019 @12:54PM (#20801450)
I wouldn't use offensive humorous test data, but using obviously fake humorous test data makes it easier to detect and mitigate those kinds of situations. If for some reason I noticed that all of my production data came from an obscure browser that called itself "The Thrilla In Mozilla", that would be a lot more noticeable and easier to correct than if my test user-agent string was just Chrome or whatever.
Re:Things I Learnt from a Senior Software Engineer by jchook on Sunday August 25, 2019 @07:15PM (#20796273)
As long as you don't go into potentially offensive humor
Re:Things I Learnt from a Senior Software Engineer by jmpeax on Monday August 26, 2019 @06:06AM (#20798555)
Isn't there like a law or razor or something named after someone that says all humor will one day be offensive?
Re:Things I Learnt from a Senior Software Engineer by mindcrime on Monday August 26, 2019 @04:02PM (#20803166)
If not, there probably should be.

"Jmpeax's Law" doesn't really roll off the tongue though...

Re:Things I Learnt from a Senior Software Engineer by lonelappde on Sunday August 25, 2019 @07:36PM (#20796386)
Upthread we have someone boasting about naming their business machines after porn stars.
Re:Things I Learnt from a Senior Software Engineer by lacampbell on Sunday August 25, 2019 @10:36PM (#20797049)
Why does that bother you so much?
Re:Things I Learnt from a Senior Software Engineer by jchook on Sunday August 25, 2019 @09:28PM (#20796844)
I had to learn the hard way
Re:Things I Learnt from a Senior Software Engineer by Moru on Monday August 26, 2019 @05:53AM (#20798505)
I worked with home support for an ISP. A few times I was at a customer helping with a router and the mother call her son to get the password for the router. Not always a nice password...
Re:Things I Learnt from a Senior Software Engineer by philwelch on Monday August 26, 2019 @01:02PM (#20801538)
I very much believe in offensive passwords/passphrases (maybe not for wireless routers) specifically because:

(a) You're not supposed to tell anybody what they are.

(b) Offensive passphrases are easier to remember.

Re:Things I Learnt from a Senior Software Engineer by ses1984 on Monday August 26, 2019 @05:04PM (#20803762)
Also easier to crack if an attacker knows that detail.
Re:Things I Learnt from a Senior Software Engineer by philwelch on Tuesday August 27, 2019 @01:08AM (#20806497)
Not that it narrows it down that much.
Re:Things I Learnt from a Senior Software Engineer by ses1984 on Tuesday August 27, 2019 @09:20AM (#20809255)
You could probably throw out 90% or more of dictionary words for your permutations, I'd say that is significant enough to paint a target on your back.
Re:Things I Learnt from a Senior Software Engineer by philwelch on Tuesday August 27, 2019 @08:46PM (#20815859)
If your password is derived from a four word phrase (per the XKCD formula, which isn’t the only one), potentially all of the individual words could be inoffensive in isolation. There’s no obvious way to operationalize the human intuition of offense in a way that restricts the search space if you’re smart about it.
Re:Things I Learnt from a Senior Software Engineer by ses1984 on Tuesday August 27, 2019 @09:31PM (#20816098)
It all depends on if you have anything worth cracking. Sure, if your average hn reader encrypts a password db with a dirty four word phrase, that reader will be fine because no one is willing to rub two pennies together to crack that.

On the other hand if you're protecting secrets actually worth something...

Re:Things I Learnt from a Senior Software Engineer by philwelch on Wednesday August 28, 2019 @06:57PM (#20824926)
Hey, for all you know I might find certain seemingly random 128-character alphanumeric strings very offensive ;)
Re:Things I Learnt from a Senior Software Engineer by ses1984 on Wednesday August 28, 2019 @07:49PM (#20825285)
Seemingly random isn't random.
Re:Things I Learnt from a Senior Software Engineer by GrayTextIsTruth on Sunday August 25, 2019 @09:43PM (#20796881)
why not? best kind of humor
Re:Things I Learnt from a Senior Software Engineer by mikekchar on Sunday August 25, 2019 @11:00PM (#20797142)
I do work for a golf travel company. In my test code I have the fictional golf resort, "Fine UK Up-scale Resort", due to the way we sometimes abbreviate names. I was doing a presentation to management the other day, and which test data decided to pop up on my screen? I laughed, anyway... I don't think some other people were please ;-) Especially as a contractor, making sure management is pleased with you is normally job one...