3 lines of JavaScript that breaks Chrome

Three lines of JavaScript that makes a Chrome tab use 100% CPU until you close it:

var oReq = new XMLHttpRequest();
http://oReq.open ("GET", "https://www.example.org/example.txt ", false);
oReq.send();

Caveat: Tested on macOS 10.13.4, with Chrome 67. And, yes, I’ve reported it.

Update: already fixed, for the next release. So just need to hang out a couple of weeks.

Advertisements

Apple TV – not for me

I bought an Apple TV the other week. I’ll be taking advantage of the 14-day return policy and giving it back.

It’s not that it’s a bad product. I actually liked a lot of its features. But… the interaction model just isn’t great. It’d be fine if it supported a Hand-off like feature from the iPhone or iPad – similar to ChromeCast. AirPlay doesn’t cut it because it needs the AirPlaying device to be available.

The main user of our TV is my wife, and she would be the main user of the Apple TV box if we kept it. But her primary use of it would be Netflix – and it’s just easier for her to drive Netflix from the iPhone client and use ChromeCast than it is to go through the Apple TV.

Maybe AirPlay2 will solve this.

Example Hadoop Job that reads a cache file loaded from S3

I had all sorts of problems getting my head around how cache files work with Hadoop. Finally, I stumbled across the answer – when you add a cache file (see HadoopMain#48), it’s available to read as a local file inside the mapper (MyMapper#36).

When running in Elastic MapReduce, the file URI can be an S3 file, using either s3://bucket/path or s3n://bucket/path – this may or may not work in other Hadoop implementations, but the general approach would work fine.

See the gist at https://gist.github.com/twasink/8813628