News for hackers. Stuff that matters.
Re:How I cut GTA Online loading times by 70% by nullserver on Sunday February 28, 2021 @06:52PM (#26298269)
Was new guy at a startup. Soon noticed that chuck Norris was in our compiled JavaScript. Turned out Someone had included the entire test suite in production deploy.

Had been like that for nearly a year. A few minutes of work brought out client js file from 12MB to less then 1mb.

Re:How I cut GTA Online loading times by 70% by gordaco on Monday March 01, 2021 @03:07AM (#26300594)
Ha, this is one of the reasons why I also include outlandish and wrong-looking stuff in unit tests. If we see where it doesn't belong, then we know for sure that we are doing something wrong.

Most often I use unicode strings in unexpected alphabets (i.e. from languages that are not supported by our application and that are not used by the mother tongue of any developer from our team). This includes Chinese, Malayalam, Arabic and a few more. There was a time when I wanted to test the "wrong data" cases for some deserialising function, and I was part annoyed and part amusingly surprised to discover that doing Integer.parseInt("٤٣٠٤٦٧٢١") in Java does parse the arabic digits correctly even without specifying any locale.

Re:How I cut GTA Online loading times by 70% by jogjayr on Sunday February 28, 2021 @07:00PM (#26298301)
> Soon noticed that chuck Norris was in our compiled JavaScript

Is that a library? Or the string "Chuck Norris"?

Re:How I cut GTA Online loading times by 70% by nullserver on Monday March 01, 2021 @02:44AM (#26300517)
String. Used as factory test for populating objects in tests.

It certainly caught my attention.

Re:How I cut GTA Online loading times by 70% by kevincox on Sunday February 28, 2021 @07:33PM (#26298499)
I was assuming that someone used the string as a name in the test?
Re:How I cut GTA Online loading times by 70% by hnick on Sunday February 28, 2021 @09:24PM (#26299073)
Yes I think they meant they saw a weird name that stood out (I've seen Donald Duck at work) and they investigated more, finding it was test data.
Re:How I cut GTA Online loading times by 70% by wiz21c on Monday March 01, 2021 @02:13AM (#26300395)
I've seen "Carmen Electra" myself :-) And other funny (more gross) names in the dark corners of huge databases...

I also had a customer discover a playboy center page at the end of a test we sent to them. One of the dev thought it'd be a nice reward. Things went very bad from him right after the phone call...

Re:How I cut GTA Online loading times by 70% by nullserver on Monday March 01, 2021 @02:48AM (#26300533)
Always assume others have the sense of humor of a 99 year old stick of tnt.

Had someone at work mention they needed to drop off a dog at grooming on the way to pick up Chinese.

I had to walk away for a bit, as I couldn’t hold it in, but didn’t know if that sort of humor would fly with that crowd.

Re:How I cut GTA Online loading times by 70% by jeffgreco on Sunday February 28, 2021 @07:13PM (#26298370)
Or the actor/martial artist?
Re:How I cut GTA Online loading times by 70% by finnh on Monday March 01, 2021 @12:01PM (#26304936)
bravo! i'll take the downvotes that this content-free comment will garner, but you just made my morning.
Re:How I cut GTA Online loading times by 70% by rsj_hn on Monday March 01, 2021 @12:09AM (#26299932)