-
Using Eclipse with OpenJDK 6 on Ubuntu
Update: There seems to be a simpler way to do this. Take a look at the second comment. Java 1.6 (also known as Java 6) is now open-source so I installed it on Ubuntu and tried to run Eclipse with it. Unfortunately it said that no compatible java vm was found while searching /usr/lib/j2sdk1.4-sun/bin/java. So…
-
Profiling PHP with XDebug
Resolving performance problems is hard (even more so when you have to do so with somebody else’s code) and some clear measurements are very welcome. I tried out XDebug some years back when and it didn’t work very well back then, but the latest release seems quite good. Here is how to use its profiler:…
-
Possible problem with Opera and setTimeout / clearTimeout
I’ve not been able to reproduce this with the new 9.27 release, however I’m quite sure that it is an issue in 9.25: When you use setTimeout, you have two options: either passing a function reference or a string which gets eval-ed. In either case setTimeout is supposed to return an integer ID which can…
-
Getting the current interpreter in PHP
Recently a friend of mine asked if there is a way to dynamically find out the path of the PHP executable. The working scenario was: running some scripts (from the command line) which would spawn other scripts and rather than hardcoding the path to the PHP interpreter he wanted to use the same interpreter when…
-
Why isn’t my GIN index being used in Postgres after I install the _int contrib package?
While working with some GIN indexes (to speed up the && and <@ / @> operators) I was very surprised to see that after the installation of the intarray (_int) contrib module the query planner stopped using the index. After some poking around it came to me: The contrib module is defining its own operators…
-
The hard edges of Python
I’ve been playing around with Python (mostly because pefile is written in it) and got very annoyed with the whole white-space as a control structure. In theory it all sounds great: you write beautiful code and it just works. However in practice I find this approach lacking in at least two ways: When moving code…
