Skip to main content

Posts

Showing posts from December, 2013

Please Stop the jsPerf.com Abuse!

According to many of the tests on jsperf.com , jQuery is slow. Really slow. The jQuery team gets bug reports from web citizens who've discovered these egregious flaws via jsperf and want them fixed. Now, jsperf.com can be a great tool when used knowledgeably, but its results can also be misinterpreted and abused. For example: Why doesn't jQuery use DOM classList for methods like .addClass()? There are at least three good reasons. It doesn't make any practical performance difference given its frequency of use. It complicates code paths, since classList isn't supported everywhere. It makes jQuery bigger, which makes it load slower for everyone, every time. But this jsperf shows classList is much faster! How can you say that? Well it's possible that test is running afoul of microbenchmark issues , and not measuring what it is supposed to measure due to the increased sophistication of today's JavaScript compilers. This is a big problem with a lot of t...

Amazon: You Know Better

For the past few days, Amazon has followed me around the Internet with this one advertisement for a rolling suitcase. That's because the wheel bearings on my old rolling suitcase are just about shot, they're all screechy and wobbly. It's been a good suitcase and traveled over the world, but it's just worn out. So I went over and bought a nice suitcase from Amazon, using my Prime membership. But I didn't get that suitcase, I got a different one. Amazon knows perfectly well which suitcase I got, it was delivered today, and it's nicer than this one in my opinion. Yet Amazon continues to show me an ad for that suitcase as if to say, "Are you sure you made the right decision?" I imagine that the infrastructure that Amazon uses to determine what product to show is pretty awesome technically. Yet Amazon is doing significantly worse than if it just showed a random product from some category other than rolling suitcases, and they should know that. My ...