Лучшие фото фотосайта на рабочем столе, дубль 3

Продолжаем соревнование с фотосайтом по разработке программы для установки в Gnome фото дня с фотосайта в качестве обоев рабочего стола.

#!/bin/bash
cd /var/photosight && \
FN=`wget -q http://www.photosight.ru/applications/photo1.js -O - \
  | iconv -f cp1251 -t utf-8 \
  | sed 's/.*\(http.*jpeg\).*/\1/' \
  | sed 's/top_of_day/large/'  \
  |xargs echo`
ID=`echo $FN |sed 's/.*\/\([0-9]\+\)_large.jpeg/\1/'`
wget -q -N  $FN -O $ID.jpg && \
gconftool-2 -t str --set /desktop/gnome/background/picture_filename /var/photosight/$ID.jpg && \
gconftool-2 -t str --set /desktop/gnome/background/picture_options "centered"
cd ~-

HP 6910p usability review

After a few months of using the HP 6910p notebook, I am ready to share my thoughts on it.

This is the first new notebook I bought for myself. For many years, I favoured custom-built desktop PCs and bought only a few second-hand notebooks for family members. One reason of my despise for new notebooks was the inevitable Microsoft tax. This time, I went against my own principles, because this Vista-equipped notebook was selling for half of its market price. So, I am now an owner of an unused Windows license, and you bet I am not proud of it.

Back to the notebook, this is a 14.1" wide-screen machine, which I believe to be the ideal notebook size. The width is just enough to fit a full-sized keyboard, but it is still quite portable and weights just 2 kg.

The case is well-build and feels very solid, although it occasionnally cracks under the right hand while typing. The notebook has four big rubber legs under the case that are supposed to stabilize it, but they elevate the case over the table so much that it resonates with each keystroke when sitting on a wooden table, so I always put a mousepad or a thin magazine under it.

I have a matte 1280x800 screen, it is ok for programming but the brightness and colours are much worse than those of a 14.1" Dell Vostro 1400 which costs one third of the price of an HP 6910p.

The maximum battery life I could get is 3 hours, which is really a shame for a traveler's notebook. Moreover, HP provides only one battery type for this notebook, so there is no way to improve the battery life by buying a bigger battery.

Tags: 

Programmers learning from philosophers

In a paper entitled "Classes vs. Prototypes: Some Philosophical and Historical Observations" and published in 1996, Antero Taivalsaari draws parallels between the evolution of the philisophy and of the Object-Oriented paradigm in programming.

Indeed, the classification of the world was in the center of interests of philosophers since Plato and Aristote. Taivalsaari argues that the traditional class-based OOP builds upon the principles that have first been described by Plato, while there are more sophisticated approaches to categorization, e.g. the so-called prototype theory, started by Wittgenstein, that lays in the foundations of the prototype-based OOP, like what we find the the modern implementations of the JavaScript language.

VAT number validation for EU-based companies

The best insights at the inner workings of the today's economy can be achieved through the study of how The Bureaucracy performs simple tasks.

The VAT validation is something that every company of a reasonable size would want to have. However, this feature is not a must-have, but a nice-to-have, and none will buy accounting software just for it. All in all, there is a broad but shallow demand for this feature.

Tags: 

A programme for a touristic trip around Belgium

The idea is simple. First, watch a quality movie about a place and the next day, go there to see it with your own eyes. The point is to find quality movies that get to the feelings and pass the atmosphere of the place.

Here are a few suggestions:

Start by watching In Bruges. It is a dark comedy telling the story of two Irish hitmen enjoying the beauties of Bruges. Upon arriving in town, walk over the Grote Markt and climb The Belfry. I may assure you that it will feel very different after watching the film.

Watch the story on the birth of the so-called "social catolicism" in an industrial city of Aalst at the turn of XIX in Daens.

Finish by the Girl with a Pearl Earring which depicts the life in a medieval dutch town through the imaginary story of one of the best known painting of Johannes Vermeer. Delft has kept its medieval centre largely intact, and you can still discover beautiful landscapes from the film in Delft's surroundings.


For completeness

Antwerp

Any way the wind blows.

Namur

A camera is following-up a killer as he moves around Wallonia to get his job done in Man bites dog.

Leuven

College freshmen drama Ad Fundum happens in the setting of the medieval city of Leuven.

Belgian coast

The sexual life of Belgians shown in Camping Cosmos and filmed in a camping on the belgian beach.

The other big obstacle to Ruby's adoption is ActiveRecord

I have been using Ruby for a few months now, doing development of small projects of up to 1000 lines. But I still bite into the naming clashes with ActiveRecord regularily. They appear at random places and it takes a lot of experience to figure out what is happening. Here's an example with the type attribute clash. Of the two code snippets below, the first one does not work (thing.type equals nil, after execution), and the second one works.

thing = Thing.new(:type=> Type.new)
thing = Thing.new
thing.type = Type.new

Another example is having an attribute named transaction.

thing.transaction

Calling .save on a model with such an attribute will produce no output in the logs and leaves the developer in frustration about what happens.

Tags: 

Pages