Archive for May, 2006

Python meeting The Hague 2006-06-14

May 30, 2006

Please feel invited to join the next Python Users NL meeting in the Hague on wednesday the 14th of June.

2006-06-14 19.30 – 22.00
Ondernemerscafé, Hooikade 56, Den Haag

Subjects, so far:

  • Dynamic SVG using Python (SVG, JavaScript, CSS)
  • Generating PDF from Zope (DocBook XML, ZPT, XSLT, FO)

I happen to be the organiser, so if you’re proud of something Python-related, let me know and I’ll give you an audience.


EU Parliament: Brussels only please

May 27, 2006

Save the EU € 200 million. Help stopping the monthly move of all MEPs from Brussels to Strasbourg and back:

More on EU observer

Richard Stallman

May 23, 2006

Richard Stallman in an interview on LinuxInsider

The idea of the free software movement is that software users are morally entitled to four essential freedoms, essential for living as part of a free society where people can cooperate when they wish:

  1. Freedom to run the program, as you wish.
  2. Freedom to study the source code, and change it to do what you wish.
  3. Freedom to make copies and distribute them to others, when you wish.
  4. Freedom to distribute modified versions, when you wish.

Instead of giving priority to freedom and community, the open source philosophy agrees with Microsoft that what matters is making software powerful, reliable and convenient.

People who hold those views have a right to their opinion. I disagree with their opinion, so I vociferously object when people label me or GNU/Linux with the slogan open source.

Anyone committing aggression with software patents deserves bad things to happen

Python class pooling

May 17, 2006

I liked JW’s class pooling example at Below a rewrite without the global ClassPool and ‘static’ Also EAFP in action:

class PooledClass(object):
 'Pools instances by id'
 _pool = {}

 def __new__(cls, id):
  """Creator """
   return cls._pool[id]
  except KeyError:
   obj = object.__new__(cls)
   cls._pool[id] = obj
   return obj

 def __init__(self, id):
  'Constructor ' = id

2006-10-09: Changed ‘self’ to ‘cls’ in __new__

High Gene Fork Ode

May 17, 2006

“Refactoring is personal hygiene for code”

Kevlin Henney

Gevonden via NLUUG

A programming language is…

May 16, 2006

“A programming language is low level when its programs require attention to the irrelevant.”

— Alan Perlis

Found at

OmniGraffle equivalent anyone?

May 14, 2006

apple switch ellen feissCan someone point me to a Linux or Win equivalent of OmniGraffle?

Somehow there just doesn’t seem to be a diagramming application that is clean, nifty, small and easy to use. Yes, I’ve tried SmartDraw but it doesn’t suit my needs. I downloaded a Visio trial (over 100MB!?), but have not evaluated it yet.

Or is it time to switch to OS X?

Google Trends: Web Dev

May 13, 2006

google trends ruby rails
google trends turbogears
google trends plone
google trends php
google trends zope
Source: Google Trends

It could mean people know Zope well enough, not to look it up every day. It could also mean Zope is losing ground.

Also interesting: Linux, Ubuntu (up) and RedHat (down)

Programming Contest Trouble

May 13, 2006

Last weekend, I worked all night programming a random player for a programming contest. Things like this always turn out to be harder than expected. Elegant code, nice class dependencies, doctests, Python 2.4.

Results: errors. It turns out the contest sandbox runs Python 2.2. I’m not complaining, host Fred is limited by his hosting provider. Hey, this is the real world. Some companies do use almost 4 year old versions1.

Ok, maybe I shouldn’t have used

for move in moves[::-1]:
    yield move

But did you know built-in function sum(seq, start=0) was introduced in Py 2.3.5?

return sum(scores)
NameError: global name 'sum' is not defined

You live, you learn.

Check my position, second last. But tonight, my random player will get lucky. I just submitted my 4th version, this time tested with Py 2.2. Good night!

1) Red Hat Enterprise servers, for example.

JavaScript Revisited

May 12, 2006

It must be over 5 years ago that I decided not to use JavaScript anymore. The language was browser dependent and seemed to be mostly used by developers to surprise website visitors with pop-ups.

Things have changed. And I didn’t notice. Until about a year ago, when websites were launched that showed functionality I thought impossible for XHTML applications1.

Ajax is the buzzword. And at least half of Ajax is JavaScript.

Wrapper libraries are available, providing browser independency. JS has grown to an extensive programming language, that can run in a browser. I find myself reading books (Pragmatic Ajax, Ajax Hacks) and adopting JS kits (Mochikit, Prototype, And I like it.

Useful resources:
JavaScript at Sun 2
MochiKit JS library
Prototype JS framework JS visual effects

1) without degrading to Flash đŸ˜‰
2) Wikipedia states “JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.”