EuroPython submission deadline is around the corner

April is about to end and with it also the deadline to submit your EuroPython talk. I thought about submitting a proposal, but realized it would be nuts to do so with my current workload.

It would also be nuts not to go and if you are a European (or not) Python developer you owe it to yourself to come.

I go to a few conferences every year and each has its own personality. It is sometimes hard to point at what makes them (feel) different, but they just are. I like many, but only EuroPython, which I regretfully had to miss last year, feels like home.

That’s why I decided to volunteer this year. It’s a way to give a little bit back, like cleaning dishes when you visit mom.

So do submit your talk and come. It won’t be the same without you.

Reblog this post [with Zemanta]

N900 applications I miss

This post is older then 6 months, which means opinions contained were mine and any technical information is most likely obsolete.
Please contact me for text I would also sign, not only acknowledge or if post got broken during one of many server upgrades. I will be most grateful.

I love using N900, but there are applications or features I miss. This post is a reminder to me on what I might do if I find more time. Since list is too long for me to do everything (unless I suddenly win lottery), feel free to pick an idea you like and run with it. Just let me know afterwards where I can see results of your work or participate in development.

Offline Wikipedia. When I am not behind a computer or reading, I like to be outdoors and even though cheap always available Internet was supposed to be here any day now, I regularly find myself information hungry in places with a very slow or no Internet connection. N900 with SD card could pretty much store everything I wanted and building an app that process and display information from Wikipedia dumps doesn’t look like a too difficult task.

Better dictionary for Maemo. QStarDict port is great and it has become one of my favorite applications. However its user interface suffers from being a direct port of a desktop version one and could be improved with one that wastes less space and is orientation aware. Reading dictionary is one of few things I wish I could do in portrait mode.

Web platform for Maemo. Wouldn’t it be great if you could build Maemo applications with web technologies? QtWebKit is a great place to start and I am certain I could expose new functionality through addToJavascriptWindowObject of QWebFrame class. Beside exposing this stuff I would also like to create tools and interfaces for developers and users alike with which they can easily package a web application as a standalone Maemo application or in case of users, turn a website into an application (I know you can add a bookmark to a website but it is not quite the same thing).

Caffeine for N900. I would like to pick “Switch profile to silent for <x time>” and know N900 will turn back normal profile when that time period expires. I always forget to turn ringing back on after I leave cinema.

Monitor unknown calls. I don’t want to pollute my address book with every phone number under the sun, but I would appreciate if I could get a hint if I ever talked or called the number in question. Bonus points for using public phone books to fetch name for given number and parsing number for clues (which country or part of it is call coming from).

This is not a complete list of things I want, but rest are mostly feature requests (except email client which currently really kind of sucks). For example I wish calendar had support for CalDAV or PDF viewer for screen rotate, search and fit to width.

I am aware that Maemo should be called MeeGo now, but a habit of years can’t be changed in few weeks. I searched for above applications and didn’t find them, but if you know of any I missed, then please let me know.

Reblog this post [with Zemanta]

A month with Nokia N900

This post is older then 6 months, which means opinions contained were mine and any technical information is most likely obsolete.
Please contact me for text I would also sign, not only acknowledge or if post got broken during one of many server upgrades. I will be most grateful.

Title says it. A month is enough time to get a better understanding of the device and to get asked repeatedly about my impressions. Many have wrote theirs, so I doubt I will be telling anything really new. Before I go on, a short disclaimer, since my writings on this blog stay around longer than might be sensible.

I wrote this post at the start of February 2010. I believe everything I write about technology to be hopelessly out of date after 6 months, but I expect this article will be obsolete even sooner. So by the time you got around reading this, most of my gripes might not even be true anymore.

Nokia N900 is an uncut diamond. A wonderful thing made by talented designers that has quite a few rough edges, not all of them in device. I wouldn’t recommend it to most people, but to some of you it might become your favorite computer. It goes with me almost anywhere.

If you want a rock solid phone, then this device is not for you. I was unlucky to be in minority of people who experienced constant reboots. By constant I mean few times every hour.  My Nokia also lacked a 2GB partition, which meant I was constantly running out of space in which to install applications. Both of this problems have since been fixed. I still have a problem with GSM connection occasionally completely dying, which I can fix only by manual reboot. I’m personally not bothered since I don’t use it as phone.

On the other hand updates to software are regular, with one major firmware update already, that fixed some of my problems (reboot). Annoyances of today might literally be gone by tomorrow and thus my disclaimer.

I know how much effort goes in good software and don’t want to be too negative, but email really does suck for IMAP users. Not only doesn’t it cache headers, so if you have a slow connection and a big Inbox, get used to waiting. You also can’t set sent mail, drafts or trash folders which makes it useless to me for anything but reading email. Even worse, it creates its own folders (like iPod touch) to make a mess in your account. I am all for simplicity and avoiding needless configuration options, but it could at least get a list of folders and compare Levenshtein’s distance to common names (Sent, Sent mail…).

Gecko (Mozilla) based browser though is great, in my opinion much better than iPod’s and I completely switched my mobile browsing to N900. I am biased since unlike many I never was fond of constant zooming in and out (with pinching). My opinion might have been different if my eye-sight was poorer and I needed to zoom more.

If you are a Linux user or appreciate freedom, then it’s difficult to find a better mobile device. N900 is a Linux machine which happens to also be a phone and you have complete access to everything. There is a store (Ovi) and app manager, but you can install and run anything willing to run without permission from anybody. Terminal is loaded by default together with tools needed to prod into the system and root is one package installation away.

I dislike fixed space of iPod. N900 is only slightly better. You can expand it with SD cards, but you have to open battery cover. It looks so fragile that I don’t intend to actually do this unless absolutely necessary. Speaking of storage, as a programmer I can understand why applications can use only 2GB of it, but as user it simply looks daft.

Pair of contact and conversations applications is absolutely brilliant. Instant messaging, Skype and SMS are superbly integrated and they also feed contact application with information about your buddies found on those networks.  Install Hermes and you can update it with data from Twitter and Facebook.

Screen has higher resolution than iPod’s, but physically same (small) size, which means I’ll keep reading PDFs on my 770. Since it’s resistive instead of capacitive, it needs more pressure than iPod’s, but works better at -12 degrees centigrade (this picture was taken with my gloves on).

Maemo has a very active and generally supportive community, but some members can also be needlessly unfriendly. Just because you know where everything is and have seen certain faux pas 100 times before, it doesn’t mean either is true for a new N900 owner with a problem.

N900 RUNS PYTHON, which was my main reason for preferring it over an Android phone. Documentation is a bit all over the place, not always current and I still haven’t found information about how to control built in cameras, but I am an optimist that this will be sorted out soon and that documentation will improve as well.

I compared N900 with diamond, but maybe a better comparison would be a sports car. If you want a polished, sedated experience then N900 is certainly not for you (yet). But if you are a tinkerer who doesn’t mind rough edges in exchange for freedom to make it do almost anything, then you should give it a spin.

There is so much more that could be said, but big picture wouldn’t change much. I haven’t talked much about UI since I simply couldn’t do it justice in few sentences. On the whole it works fine and multitasking is really great even though I think iPhone/iPad’s switch-to-where-you-were model is in my experience rarely a problem and wouldn’t be surprised if it was here to stay.

If there is anything about it you would like to know, then please ask and I’ll try to respond to it promptly.

Reblog this post [with Zemanta]

Leaving App Engine – for now

This post is older then 6 months, which means opinions contained were mine and any technical information is most likely obsolete.
Please contact me for text I would also sign, not only acknowledge or if post got broken during one of many server upgrades. I will be most grateful.

Jonathan wrote his thoughts about App Engine. They are well worth a read if you are thinking about using it, but haven’t so far. I used App Engine sporadically for a couple of months on a project of mine, but I finally gave up and ended porting my code to pure Django, which admittedly wasn’t too hard to do at this point in time.

Some of my reasons match Jonathan’s. There were too many rough edges to feel really productive and too much time was wasted on trying to find out if problem lies in poor documentation, incomplete implementation or stupid programmer. I probably will never get answers to questions like how can a simple Django view that doesn’t do anything beside rendering a static template, consume above expected amount of CPU and risk triggering quota blockage, but right now I really don’t care anymore.

Integrating Google accounts is indeed easy, but it is also very shallow to the point of being practically useless.  You basically can only rely on fact that reference to a particular user won’t change. Anything else you may think you know (like an email address), can’t be relied upon. You can’t create an account and you can’t even control login form of your service. In essence you don’t have your own users, you can just offer a service to Google’s.

For me this was one of two major reasons for my decision. Every person who would need an account to use what I am building would need to agree to Google’s TOS agreement which defines many things, among others the highest level of privacy I can offer.

The other reason was that current limitations of App Engine really lead you to rely heavily on provided APIs, which may be similar to stuff out there (like Django), but aren’t anywhere close to being a drop-in replacement. This can be — depending on application you’re writing — a heavy investement in a platform you don’t control a bit.

Put more profanely, you are a Google’s bitch.

Having said all this, I do think App Engine is a very valuable service. If you want to write a mini-app, a web tool like Simon does, then App Engine is brilliant. You can do this easily with little deployment and zero administration hassle. In fact I can’t think of any other service better suited to this task.

I’m sure this is not the only scenario in which App Engine makes sense and there are others I haven’t named or thought of. Issues, like accounts, can with some effort be solved now. But App Engine also isn’t (yet) what some of us were hoping for and it’s prudent to really think through what you want, what you need and what App Engine actually offers.

Reblog this post [with Zemanta]

Generating Python Exceptions Classes

This post is older then 6 months, which means opinions contained were mine and any technical information is most likely obsolete.
Please contact me for text I would also sign, not only acknowledge or if post got broken during one of many server upgrades. I will be most grateful.

It’s been a while since I used Python for anything larger than scripts few tens lines long, so it feels really great to do it again. I did discover however that I became a bit rusty. Not so much in not being able to achieve what I want as not being sure that I do it in a sensible and pythonic way.

I’ve been working on a private project where I came to a following problem. API calls can trigger various responses, somewhat like HTTP, containing status codes together with a short description. Every faulty response should trigger its own exception, which led me to my first implementation:


class Unauthorized(Exception):
    status = 101
    value = "Unauthorized."

I didn’t like it even though it looks and behaves like it should. What I wanted was a better overlook of possible responses in a way where I have to make any possible changes easily and only at one place.

My second attempt was auto-generating exception classes using type. Since class definition took only a line instead of three, it certainly achieved better transparency, but I still had to make changes at two places.

Final step was to auto-generate classes in a loop. To do this I attached them to module namespace using globals() dictionary. Actually I used __builtin__ one at first, but it obviously didn’t work that great.

So this is what I have now. It works and achieves my goals. I only need to change dictionary to add a new response or change existing one and it could hardly be more readable.

But is it pythonic enough? If not, what would be, apart from traditional way described in first step?

Zemanta Pixie
Next Page »