Header graphic 4 of 8



Other stuff

Other sites

I wish this site were powered by Django

August 06th, 2008

GeoDjango has been merged into Django’s trunk yesterday

Filed under: Django,Python,Technology — jm @ 12:19

This means that GeoDjango will be part of Django 1.0! This is another great addition to this fabulous framework. It changes and extends Django's ORM so that it supports GIS types in multiple databases. Of course, that primarily means support for OpenGIS types in MySQL and PostgreSQL and querying them via Django's ORM.

Now, if they'd finally land aggregation support, I'd be totally happy with Django 1.0!

July 21st, 2008

Django: newforms-admin has been merged into trunk

Filed under: Django,Python,Technology — jm @ 15:37

Brian Rosner posted this update in the Django users group. This means that Django just made a big step forward!

July 02nd, 2008

Updates all around: Ruby, Django, Diablo

Filed under: Django,Games,Security,Technology — jm @ 11:27

I didn't touch my newsreader in a while and promptly I missed quite a bit of interesting things. Here are the most important:


Large file uploads: Revision 7814 finally lands the patch from ticket 2070 and finally allows Django to handle arbitrarily-sized file-uploads.

Ruby's security vulnerabilities

Man, I'm late to that particular party, but some serious vulnerabilities have been found in the main Ruby interpreter. Unfortunately it seems that the official maintainers messed up as well and only 3rd-party patches are available right now, because there's no known stable release code in the codebase that a quick patch release could be based off.

I think the most important lesson that can be learned from this, as Simon Willison points out, is that you need to keep release tags around in your SCM system, but also that you should never blindly trust any part of a system. At least it makes me wonder what surprises lurk in the Java VM or CPython.

Diablo III

Has been announced. Userfriendly pretty much hits the nail on the head.

May 23rd, 2008

JavaScript IDEs

Filed under: Python,Technology,Web — jm @ 22:52

I just watched a presentation about the impressive JavaScript support in Netbeans 6.1.

I have to say that I'm really impressed with it. There's a project (the Ajax Toolkit Framework) in Eclipse incubation that promises to provide pretty much the same capabilities for Eclipse, but it's not there yet. ActiveState's Komodo has some good support, but it's not really free (there's a free version without debugging support).

The only problem left now is that Netbeans' is missing a widely advertised Python plug-in, so I don't know if good Python support is available, but if it is, then it would be enough reason to leave Eclipse+Pydev behind. I'll try JPyDbg and see if I get anywhere.

February 22nd, 2008

PHP sucks… now even more.

Filed under: General,Java,PHP,Python,Technology — jm @ 01:52

I finally made the time to update I'm sorry, but PHP sucks. This part of my site gets by far the most traffic and I found it important to update it to reflect all the changes that have occurred since I originally wrote it in 2006. I also created a new sub-section on programming languages where I'll write down trivia about Java and Python and other programming languages that I use daily, concentrating on weaknesses and bugs that are less-known, but can become highly volatile for a project.

Of course, I don't have nearly as much material on Java and Python like I had on PHP, but you never know, perhaps I'll even receive a few suggestions :-).

February 15th, 2008

The state of Django and Unicode support

Filed under: Django,Python,Technology — jm @ 14:11

I still get a lot of traffic from my post Django 0.95 has unicode problems, too, but a lot has changed since then. So I'll try and give a short overview:

While Django-0.96.1, the current stable version, has no real integrated Unicode support, the Unicode-branch was merged into Trunk on the July, 4th 2008 in changeset 5609. With that patch Django gained full Unicode support and it also is finally possible to use legacy databases. There's an ongoing discussion about allowing UTF-8 characters in usernames on the developer mailing-list in Django's authentication. Also a lot of "general functionality that's necessary for a real website"-patches have become available over the 12 months:

  • FileFields and ImageFields now work as expected in newforms since changeset 5819

  • There's a pretty stable patch for large file uploads available that passes all tests, but has not been committed yet in ticket 2070

The newforms-admin branch that aims to align Django's excellent administration application with the newforms library tracks Trunk pretty closely and Michael Trier has a screencast that shows how to convert an application to newforms-admin, so that might also be a good place to start if you want to use the newforms-admin application.

The GeoDjango branch that integrates Django's ORM with GIS support also seems to have become quite stable and was recently featured on the excellent This Week In Django podcast #8. This Podcast by Michael Trier has replaced the "This week in Django"-posts on the Django weblog. I liked "reading the news" better, but Michael does an excellent job, so tracking this Podcast is important if you're serious about using Django!

So there you have it :-), things have come a long way since 2006. Even more information can be found in the excellent (and freely available) Django book.

February 06th, 2008

Yay, shipping software rocks

Filed under: General,PHP,Python,Technology — jm @ 02:02

I always like that feeling when you're getting something out the door, even if it's just a small update to your own site. So check out the new front page. Having just 5 recent links from del.icio.us which additionally required you to allow JavaScript from a different domain always bugged me. This has finally changed.

You can read about the cute little webservice that powers the new front page here. Like most software I write right now, it's written in Python.

Aside from that I refactored a few small bits of the theme

  • The magnifying glass in the header has a darker background to make it more prominent

  • The included copy of Yahoo! UI is now 2.4.1

  • I whipped up a plug-in to modify WordPress' included "Archive" widget so that it's more accessible when it's in select-box form (it lives in a form now and has a "Go"-button)

  • Subsequently I switched off the long monthly archive list in the weblog's sidebar. I wanted to do this to make room for future enhancements.

The beautiful part of it is that I had a good excuse to do all this because I needed to acquaint myself with different autocomplete widgets. Now back to doing real work...

October 02nd, 2007

simplejson 1.7.x, ActiveState Python and the Visual Studio 2003 compiler

Filed under: Python,Technology — jm @ 20:37

If you’re trying to install a Python library like simplejson that uses code written in C or C++, you might run into this error message:

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing “-c mingw32” to setup.py.

There seem to be 2.5 possible fixes. 2 of them fix the issue directly, the .5 is a work-around for simplejson:

  1. Install Visual Studio 2003 or at least the non-optimizing C++-compiler that Microsoft delivers with the free .NET SDK. Finding the right version might be an issue though. This fix doesn’t work for me, as I have Visual Studio 2005 installed here already.

  2. Use a Win32 port of the GCC C++ compiler. Details on how to compile simplejson 1.7 with the MingW32-GCC C-compiler.

  3. Disable the C-extensions altogether by using this work-around:

    python setup.py –-without-speedups bdist_[whatever]

I simply chose the work-around. I don’t know if there are similar command-line switches for other libraries, but for my current project the performance of json-parsing code is not an issue.

Tab-completion with ActiveState Python 2.5 in the interactive shell on Windows

Filed under: Python,Technology — jm @ 19:52

The default documentation tells you that this will only work on Unix, because the readline library is not available on Windows, or at least not included in ActiveState’s Python distribution.

In fact, there’s a ctypes based version of the readline library developed here: PyReadline on SciPy. You can use this easily to enable tab-completion on a Windows system:

ActivePython (ActiveState Software Inc.)
1. >>> import readline, rlcompleter
2. >>> readline.parse_and_bind('tab: complete')

IronPython (for people not knowing already: IronPython is Python for the .NET CLR/DLR) has tab-completion built-in in the shell, ipy.exe. You enable it like this:

c:\>ipy.exe -X:TabCompletion -X:ColorfulConsole

I’m currently upgrading this weblog (read: I’ve been at it for 3 months now ;-) ), but I needed to write this down. I hope this helps someone else out there…

Update (10/16/2007): I’ve moved this weblog to a new server… it only took me three months :-). Time sure flies around here.

March 25th, 2007

Django, Java and framework functionality

Filed under: Django,Java,Python,Technology — jm @ 08:06

Update: This post addresses the differences between Django and Tapestry 4.1 and it’s a bit outdated. I wrote another, higher-level, post on that topic that you might want to read.

It seems that every web framework has the desperate need for displaying tabular data, but only few solve it as well as Tapestry does with contrib:Table. Even if you’re stuck with plain JSP there’s the excellent Displaytag library. Django has no such thing at the moment.

Not only that, the more I work with Django the more it reminds me of early Servlet-based development environments. urls.py resembles <url-pattern>s, Middleware can be compared to javax.servlet.Filters. Now, of course, Django is much more fun to develop with, because of its Admin-application, the newforms library, it’s pythonic and it supports rapid-turnaround development. So there’s no XML-juggling involved and you don’t repeat yourself and generally the design revolves around easy to guess interfaces. But really, I’m missing some of the features that are available in a Java software stack.

Currently, if I’m working with Java that means I have:

Feature Library
Component-oriented development Tapestry 4.1
Dependency Injection and module discovery Apache Hivemind and of course Spring
Full Ajax support Tapestry 4.1
Declarative, fine-grained security Acegi, combined with Tapestry-Acegi (modified for form-based authentication)
Database access JPA / Hibernate
RSS/Atom support Rome
Full PDF support iText
Real full-text search Lucene

Of all these, Python has only a few equivalents. Rome, for example, is modeled after Mark Pilgrim’s excellent Universal feed parser and Django’s ORM solution works for most cases (I happen to think that EJB3 did a few things right), but there’s no equivalent to iText in terms of functionality and feature support and Acegi/Spring-security is simply the most-advanced authentication/authorization-library there is.

So if Sun would finally stop diluting the standard library and instead get their act together on fast and painless class-reloading, it would be a blast to work with (feature-wise, not language-wise, which might be fixable by using JVM-based scripting languages like Groovy or JRuby). But as long as I have to wait 30 seconds per round-trip for Tomcat to restart, I’d rather shoot myself than attempt to develop a CRUD web-application with Java again. If only someone wrote something like Django’s Admin application for Tapestry and JPA…

For now, it might at least be possible to integrate some of the libraries mentioned above with Python, by using gcj along the lines of PyLucene.

So I guess if I find time, which I don’t have, it’s pretty clear what has to be done. Someone needs to develop an Admin-application for Tapestry based on contrib:Table, BeanForm, JPA and annotations and then someone needs to develop a contrib:Table-lookalike and a fine-grained authentication and authorization middleware for Django based on decorators for views, but with the possibility of an external configuration file (dare I say it: possibly XML-based).

Next Page »