andre's blog

New Google Inbox - first impressions

Yesterday I received an invitation to Google Inbox - a new mail service from Google on top of the famous GMail. I wanted to use it because it provided reminders and allowed you to snooze emails in the inbox until later. I find these features extremely useful. However, the current versions of both Android client and the web interface are not without issues. Here are some of them I have noticed so far:

Topic: 

Black on white in Chrome

Using Stylish extension, you can have the following style on a web site, which colour palette is too bizarre for your eyesight:


/* Black on white */
html, body, * {
background: #FFF !important; color: #000 !important; background-image: none !important;
}

This is just a basic example, you might want to refine it to suit your needs. Possible options: change the appearance of visited links by changing the style of a:visited; remove images by setting display:none on img elements etc.

Android and .NET - what does the future hold?

Recently Microsoft made a major move and decided to make .NET platform open source as well as compatible with Linux. I personally has always thought, that .NET is much better platform in the long run than Java. Unfortunately, until recently it lacked support on other platforms aside from Windows. However, after the announcement, things will change. I wonder, if among other developments, someone will be kind enough to port the Compact.NET to Android.

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.