QT 5.1 and Android

You might have heard, that Trolltech has recently released a new version of their famous QT library with preliminary support for Android and iPhone (iOS) support. This is, actually, pretty exiting news, because it means that, at least in theory, one can have a single mobile application code base for two most popular smart phone platforms on today's markets. And, possibly, for most desktop computers as well, because QT runs pretty well on Windows, Linux and Mac. Throw in support for QNX / BlackBerry 10, which QT also provides, and the prospects become almost irresistible.

Essay writing spam comments

For the last couple of years I repeatedly see submissions of spam comments to my web site, which advertise "essay writing services" (read - cheating at course assignments for money) for students. I receive at least a couple a day, sometimes tens of them. This is despite having enabled CAPTCHA validation of comments submissions. The spammers' software manages to circumvent this protection, albeit not always - most of the undesirable content is stopped. What really puzzles me, however, is the extremely poor wording of these spam messages.

boost::variant and lambda functions in C++11

Released some time ago new C++11 standard introduced lambda functions - long anticipated and exciting feature. On the other hand, boost::variant has been around for awhile and is used successfully in many projects. The recommended and type-safe way of applying type-specific logic to values of variant types is using visitor pattern. However, a visitor is a functor, which until now should have been defined separately, in a class of its own. It would be nice if we could use lambda functions to achieve the same functionality.

Sending Outlook appointments with Python

Python allows you to send calendar appointments (invitations / events) directly from your code. It is quite easy to create a new appointment in the standard iCalendar format (ics). You can do it by hand or use a convenient icalendar open source module. In order to convince Outlook, however, to present the iCalendar events as native calendar appointments, you will need to make some effort. Fortunately, other people have already collected all the necessary pieces.

Google calendar - download all entries with Python

Google provides APIs to access its data using various languages. You can manipulate Google calendars, contacts, documents etc. Most of the time the usage is pretty straightforward, but sometimes it is not clear how to achieve a specific goal. For example, it took me some time to figure out how to download all events for a given calendar. The main reason behind the difficulty is the upper limit Google places on the number of calendar entries returned by a single query. There are API calls, which help you to overcome this constraint. Below is the relevant code for your enjoyment.

Generating text (ASCII) tables with python

Sometimes you might need to generate tables in good old plain text. Doing so by hand might be very tedious and error prone. Better let the computer to do the job! Luckily, off the self components exist to do just that. Specifically, Python can be used to perform this task. Here's a link to the relevant python recipe. Alternatively, there is a ready made module TextTable, which is also quite convenient.

Synchronizing Google contatcts' birthdays with Android

Google Contacts allow setting birthdays, which are then picked up by Google Calendar automatically and displayed as events on the relevant day. This is very convenient for keeping track of your relatives', friends' and other people's birthdays. Having a reminder saves you an embarrassment of forgetting your girlfriend's/boyfriend's/auntie's day of birth and prevents unnecessary bad feelings.

Tradegy in Oslo

We are all devastated by the terrible events in Oslo, Norway, where almost 100 people were killed in two closely linked incidents of terrorism. Browsing the news about these events, I couldn't help but notice facial similarity between the alleged executor of the terrible acts, a certain Anders Behring Breivik, and the notoriously famous manager of Wikileaks, Julian Assange.


Vim line wrapping and word boundary

Vim (vi) is a very powerful and customizable text editor. There are many parameters you can fine-tune to adjust the way your data is displayed. For example, vim can visually wrap lines, which are too long to fit the width of the screen. This is "virtual" wrapping - no new line characters are actually added to the text. By default, vim wraps the text at the last character, which fits in the visible area. However, especially when editing long runs of text, it is much more convenient to see lines wrap at word boundaries. To achieve this simply use the following command: