Why I don't like class-based generic views

06.10.2011

Django

… because I have to replace this: def category(request, slug, language): translation.activate(language or 'ru') category = get_object_or_404(models.Category, slug=slug) return object_list(request, template_name = 'marcus/category.html', queryset = models.Article.public.language(language).filter(categories=category), paginate_by = settings.MARCUS_PAGINATE_BY, extra_context = { 'category': models.Translation(category, language), 'language': language, }, ) with this: class Category(generic.ListView): template_name = 'marcus/category.html' paginate_by = settings.MARCUS_PAGINATE_BY def ...

Core devs on the future of Django

03.10.2011

Django

During recent DjangoCon I caught some of the core developers and asked them to share their views on the future of Django. The idea is hardly original — every leader of something is constantly being pestered about THE FUTURE. But I had a personal interest too. After being away from ...

ijson on PyPy, Episode 2: Warm-up

05.09.2011

Python

Today I've come upon a very interesting development in the story of optimizing pure Python version of ijson. The thing as I left them yesterday were like this: Original yajl wrapper0.47 sec CPython0.84 sec PyPy1.30 sec These are the times of parsing a JSON array of 10000 objects. The parser ...

ijson on PyPy

04.09.2011

Python

I happen to follow Alex Gaynor on Twitter and his ravings on speed and general awesomeness of PyPy have inspired me to a small experiment. I have this iterative JSON parser — ijson — which is a ctypes-based wrapper around C library yajl by Lloyd Hilaiel. I don't know of ...

Difference between OpenID and OAuth

14.07.2011

Web, OAuth, OpenID

Surprisingly there's much confusion between "OpenID" and "OAuth". People tend to use them as interchangeable terms or consider OAuth as a kind of a new and improved version of OpenID. In fact they are quite different things. I decided to write down my explanation to have a place to link ...

Nook

17.06.2011

Misc

After long time considering if I need an e-book at all I finally bought a new Nook. My current life style allows me more time to read and after having recently read "Anathem" I realized that reading and keeping paper bricks in the age of advanced contemporary e-books is just ...

Completely unfair comparison of Javascript syntax highlighters

22.05.2011

My software

During the time before latest release of highlight.js 6.0 I decided — for the first time in more than 4 years — to actually look at other highlighting libraries. Sure I knew of their existence before but nonetheless never felt compelled to do any serious comparison because highlight.js is a ...

highlight.js 6.0 beta

24.04.2011

My software

Trying to fight procrastination I've got myself busy with a long delayed task — refactoring language definition in highlight.js to a new syntax. This turned out so well that I've also managed to resolve other tasks that were planned for version 6.0. So without further ado I'm hereby introducing a ...

Google profile OpenID breakage

13.03.2011

OpenID

Apparently I still care about OpenID. So it's going to sound bitter. Sorry for that. What happened is some time ago Google has redesigned its profile pages and along with the redesign changed their URLs from http://www.google.com/profiles/username to http://profiles.google.com/username. As good network citizens they also set up a permanent HTTP ...

Attitude towards competitors

03.03.2011

Misc, Ubuntu

Christian Giordano, designer at Canonical: We just noticed MacOSX Lion is likely to give it a try on merging the traditional scrollbars with the overlaid ones. From the few screenshots we saw, it looks like a quite different solution. What else can we say, good luck to them and may ...

Django as a micro-framework

07.01.2011

Django

There is a common knowledge that Django is not suitable for writing small ad-hoc projects that don't need anything special apart from displaying some HTML. Boot-strapping a Django project is considered a work substantial enough to not bother with it just for a couple of functions. It was always "obvious" ...

highlight.js opens up

02.01.2011

My software

Though the code of highlight.js was always open the library was never a real project. There wasn't a place for development discussions, no documentation wiki and no bug tracker. Instead I was just accepting new languages and patches and answered occasional question by mail. Nonetheless the highlighter has somehow managed ...