Jeffrey Gelens

Sketchpad Sketchpad is a free application utilizing <canvas> to allow anyone with a web-connection and a recent copy of Safari, Firefox, Opera, or Chrome the ability to create beautiful drawings.

Tinkerer’s Sunset That led his lawyers to ask the obvious question, “On whose computer did he trespass?” The prosecutor’s answer: “his own.” When I was growing up, “trespassing” was something you could only do to other people’s computers.

Moved Linode VPS to London

This week Linode expanded to London, England. The latency from the Netherlands is about 18ms, pretty fast! Today, I moved my VPS from Newark, NJ, USA to London by 'cloning' it using Linode's great web interface. Copying ~6GB worth of images took 1 hour and 30 minutes. During the transfer the server was down, but the improved latency and download speed for Europe certainly was worth it.

I participated in the Backup Service Beta with my US node. Although I never needed to revert to a backup, it felt safe and it seemed to work very nicely. The beta program is not available yet in the UK, let's hope it will be anytime soon.

Altogether with a very positive result of a VPS performance comparison recently, I certainly can recommend Linode.com as your VPS. If you want to give it a try, please use the following referral code: 9e07717ba17b7283ecc8d000a8b0737b17c64a3f .

Python 2 → 3 Cheatsheet (pdf) For Python 2 developers wishing to start developing using Python 3.

Introducing Miwa

美和

November the 12th, at exactly 09:09, our second child Miwa (美和 - beautiful Japanese style) was born in the hospital. The actual birth took just 30 minutes. Once again I was witness of the enormous strength released during labour. Miwa's weight after birth was 3360 grams and her length 48 centimeters.

Different was that my wife had to leave hospital just a few hours after delivery. In Japan she could stay for 5 days in the women's clinic. Lucky she didn't lose as much blood as with the birth of Towa.

Both are doing perfectly fine!

LHC ready to restart (photos) The European Organization for Nuclear Research (CERN) says it expects to restart the Large Hadron Collider (LHC) by this weekend (November 20, 2009) after more than a year of repairs. Some great photographs of the repairs, and of the LHC and some of its experiments in various stages of construction.

The Play framework Finally a Java framework made by Web developers. Discover a clean alternative to bloated enterprise Java stacks. Play focuses on developer productivity and targets RESTful architectures.

Twisted ConnectionPool Revisited

Last year I posted a fix to re-establish database connections in the pool when connections are lost. This hack worked great for me and a couple of other people around the internet.

The enhanced version by powdahound:

from twisted.enterprise import adbapi
from twisted.python import log
import MySQLdb

class ReconnectingConnectionPool(adbapi.ConnectionPool):
    """Reconnecting adbapi connection pool for MySQL.

    This class improves on the solution posted at
    http://www.gelens.org/2008/09/12/reinitializing-twisted-connectionpool/
    by checking exceptions by error code and only disconnecting the current
    connection instead of all of them.

    Also see:
    http://twistedmatrix.com/pipermail/twisted-python/2009-July/020007.html

    """
    def _runInteraction(self, interaction, *args, **kw):
        try:
            return adbapi.ConnectionPool._runInteraction(self, interaction, *args, **kw)
        except MySQLdb.OperationalError, e:
            if e[0] not in (2006, 2013):
                raise
            log.msg("RCP: got error %s, retrying operation" %(e))
            conn = self.connections.get(self.threadID())
            self.disconnect(conn)
            # try the interaction again
            return adbapi.ConnectionPool._runInteraction(self, interaction, *args, **kw)

HTML5 (redesign)

Hello all, finally some activity again! I redesigned the site using HTML5. Although HTML5 is still a working draft, I will be ready for the next major revision of HTML ;). Most browsers already support the HTML5 elements and more of very cool features. Check this handy site for a comparison between the major browsers.

As usual, Internet Explorer does not support any HTML5 elements. However by defining the new elements as block elements it does render something useful, e.g.:

document.createElement("article");
document.createElement("nav");

With this hack, IE7 & 8 renders the site reasonably. IE6 becomes confused and practically ignores the CSS, so upgrade if you're still using it ;-).

Ruby Enterprise Edition 1.8.6-20090113 released

Ruby Enterprise Edition (REE) is a server-oriented distribution of the official Ruby interpreter, and includes various additional enhancements. REE’s main benefits are the ability to reduce Ruby on Rails applications’ memory usage by 33% on average, the ability to increase applications’ performance and the inclusion of various analysis and debugging features. The lower memory usage and increased performance are possible because REE includes - among other enhancements - a copy-on-write friendly garbage collector, as well as an improved memory allocator.

REE has been out for several months now and is already used by many high-profile websites and organizations, such as New York Times, Shopify and 37signals.

Changes

  • Tcmalloc support for 64-bit operating systems.
  • Ported and incorporated the RubyProf GC patches.
  • Better documentation.
  • Fixed -no-tcmalloc on OS X
  • Fixed more bugs in GNU readline integration on OS X
  • Pass -r to gem install when installing gems
  • Fixed a crash when using REE to install REE
  • Fixed Debian package

Read the article...

I also updated my Arch Linux package.