5 ms·
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".
by philwelch 7y ago
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".
- jchook 7y agoAs long as you don't go into potentially offensive humor
- lonelappde 7y agoUpthread we have someone boasting about naming their business machines after porn stars.
- jchook 7y agoI had to learn the hard way
- Moru 7y agoI 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...
- philwelch 7y agoI 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.
- ses1984 7y agoAlso easier to crack if an attacker knows that detail.
- philwelch 7y agoNot that it narrows it down that much.
- ses1984 7y agoYou 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.
- philwelch 7y agoIf 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.
- ses1984 7y agoIt 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...
- lacampbell 7y agoWhy does that bother you so much?
- GrayTextIsTruth 7y agowhy not? best kind of humor
- mikekchar 7y agoI 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...
- jmpeax 7y agoIsn't there like a law or razor or something named after someone that says all humor will one day be offensive?
- mindcrime 7y agoIf not, there probably should be. "Jmpeax's Law" doesn't really roll off the tongue though...
- caymanjim 7y agoI 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.
- dgritsko 7y agoI'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.
- philwelch 7y agoI 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.