Funny JavaScript

parseInt(0.0000005) // --> 5 JavaScript converts the first parameter to parseInt() to a string with ToString() that looks the same for 0.5 to 0.000005. But 0.0000005 gets represented by "5e-7" (= 5 × 10-7). And there’s the 5.

2022-02-01 14:29:15+01:00 · Last edited: 2022-02-05 00:38:07+01:00

Gibberish Bookmarklet

Most people are able to read and understand text, even if it is all gibberish. The first and last letter need to stay the same as the correct spelling. The letters in between can be ordered any way and it remains readable. See: Most poplee are able to read and userdatnnd txet, even if it is all gibsierbh. The fisrt and lsat letetr need to stay the same as the ccorert sllpieng....

2013-04-01 13:19:00Z

Benchmarks are merciless

JavaScript vs. PythonPHP vs. Python A number 1/4 for A vs. B means that B is 4 times slower than A. The Computer Language Benchmarks Game is more a community benchmark than a programming language benchmark. You get some ballpark figures that confirm what you already know beforehand: C++ is faster than Ruby :-) But it's still depressing to see that a current implementation of JavaScript is faster than Python.

2009-05-28 14:18:00Z · Last edited: 2009-08-27 20:04:12Z

Bookmarklet for HQ Videos on YouTube

YouTube sometimes gives you an HQ button to switch to a version with higher quality. But not all videos have this button. You can add "&fmt=18" to the URL and most of the time the video is better than the default one. Or you can bookmark (or better drag and drop it on the bookmark toolbar) the following bookmarklet: YouTube-HQ This was done quick and dirty and may stop working tomorrow....

2009-04-02 14:25:00Z · Last edited: 2009-08-27 20:04:12Z