Colin's Journal

Colin's Journal: A place for thoughts about politics, software, and daily life.

October 19th, 2004

Commission hearings

It was widely expected that the European Parliament’s quizzing of the new Commissioners would be nothing more than an paper work exercise. The controversy surrounding the Italian Commissioner Rocco Buttiglione, who has been assigned the Justice Freedom and Security portfolio by the new Commission head José Manuel Durão Barroso, is proving that assumption to be wrong.

Mr Buttiglione is described by the BBC as a devout Roman Catholic and a close friend of the pope. A Commissioner’s religious beliefs do not normally effect their candidature, but in questioning by the European Parliament Mr Buttiglione’s has expressed some very unwelcome ideas. By describing homosexuality as a “sin” and the aim of marriage as being “to allow women to have children and to have the protection of a male” he has called into question his suitability for the position.

A green frog.In the summary of Mr Buttiglione’s hearing before the Civil Liberties Committee he attempts to draw a distinction between morality and the law. The problem is the European Commission’s role as the sole initiator of new legislation. The views of individual Commissioners have a huge effect on EU law, and so their moral views are important.

The European Parliament is only allowed to veto the whole Commission rather than individual members. Whether MEPs will be willing to go that far in trying to stop Rocco Buttiglione is uncertain, but it is now a real possibility. The best political solution would be for Rocco Buttiglione to stand-down, something he has indicated he is willing to consider.

The more scrutiny Parliament gives the Commission the better. Often Commissioners are put forward based on their political friendships rather than competency. Parliament is, as it was designed to, helping us all by ensuring that Commissioner’s fundamental views are compatible with the laws they are asked to administer.

October 17th, 2004

How many people read this?

It’s been a while since I’ve taken my camera out and done any photography, and that’s part of the reason why I’ve not updated this web journal over the last two weeks. The other reason for lack of updates is that I’ve been refining the software that tries to answer the question asked above: How many people are reading this?

Every time a web server receives a request for a URL from a client (web browser, search engine, RSS Aggregator, etc) it logs the event into a file. By analysing the web server log file it’s possible to approximate how many people loaded a particular web page, which hopefully gives an indication of how many people read it.

Seaweed.  Kejimkujik Sea Adjunct, Nova Scotia.Determining the number of people, versus the number of search engines or other robots, requesting your web page is very difficult. Each log file entry contains the user agent string sent by the client making the request. Most web browsers provide their own distinct user agent string, enabling you to determine whether the request was made by Firefox, IE, Safari or some other web browser. Unfortunately IE’s user agent string includes extensions, e.g. “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)” means IE 6.0 with the .NET framework installed. The range of possible user agents for IE is huge, and so pattern matching is the only practical way to determine whether or not a request came from IE.

Good search engines (such as Google which uses “Googlebot/2.1 (+http://www.google.com/bot.html)”) provide a user-agent that looks nothing like IE’s user-agent, and so is very easy to tell apart. Other’s such as the “Grifabot” deliberately use user-agents that are easy to confuse with IE, such as “Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; Girafabot; girafabot at girafa dot com; http://www.girafa.com)”.

Even if the user-agent does match a known web browser this doesn’t necessarily mean that it really was that web browser that sent the request – a user can change their browser’s user agent to be anything they like. The only saving grace here is that the vast majority of users don’t bother as there isn’t really any point to changing it.

Having decided which requests are legitimately from a web browser rather than a robot the next challenge is to determine what counts as a unique page visit. If I reload the web page within 5 minutes, it will generate two requests for the page and two entries in the log file. I probably want to count such reloads as a single page visit, up to a cut off point (say 2 hours).

Detecting whether the same client has re-requested the page is fairly easy because the IP address is included in the information logged by the web server, and is unlikely to change between requests. Writing software that counts unique requests in a scalable manner is a challenge, because each request within the last 2 hours for every URL has to be remembered.

Photo: Seaweed on the beach at Kejimkujik Sea Adjunct, Nova Scotia.

October 5th, 2004

Turkey

Many of the EU15 member states are struggling to come to terms with the possible accession of Turkey. Even supporters of Turkish membership, such as France, seem intent on making it difficult.

The European Commission’s new stance that negotiations with candidate countries will be suspended if those countries fail to meet membership criteria is to be welcomed. The 100% success rate of countries negotiating membership during the recent expansion could easily be interpreted as meaning that there is little chance of rejection. By explaining the consequences of failing to meet membership criteria the commission increases the impetus for countries to reform. Hopefully this new approach will be applied as equally to Turkey as it is to Romania, Bulgaria and Croatia.

Rusty Trawler. Lunenburg, Nova Scotia.The new enlargement commissioner, Olli Rehn, is reported as wanting to introduce a permanent mechanism to limit the free flow of workers from Turkey to other EU states. This is a badly thought out proposal that has been rightly shot down by Turkey. A permanent mechanism to limit movement between Turkey and the rest of the EU would distort the single market and devalue membership of the EU significantly.

Being an EU citizen grants you the right to move freely between member states. If countries gained the right to limit immigration from other member states it would damage the single market. Currently British citizens can be sure that their rights will be respected when buying a house or starting a business in France. If member states can arbitrarily restrict immigration then that certainty is removed, and people are far less likely to make investments abroad.

(The picture is of a rusty trawler docked at Lunenburg)

September 25th, 2004

Site maintenance

Some of yesterday had to be spent doing website and system maintenance. The first change to my website is that double spaces after a full-stop are now preserved using non-breaking space characters. Currently this only applies to those pages that I created in a text editor, but I hope to implement this for OpenOffice pages in the future.

Peggy's Cove, Nova Scotia.A small number of people have recently started using my images in their websites and using my webserver to serve them. While I can’t do much to stop people copying the images, I can at least use Apache’s mod-rewrite to block my webserver from being used to host them. There are two downsides to this: direct links to my images from other sites will no longer work, and image search sites such as Yahoo and Google will not display my images correctly in their search results page. To link to one of my images from a website the link must now go to the HTML page that contains the image rather than the image directly.

On my home computer I’ve added a white-list of users that are allowed to SSH in. This means that I can give guests weak, easy to remember, passwords on my computer without it being vulnerable to a dictionary attack on the network. For the technically curious this was done by using the PAM listfile module in /etc/pam.d/sshd.

September 24th, 2004

Loopholes

The BBC is usually reasonably accurate when it comes to reporting on immigration issues in the UK. Their current piece on “Beating the sham wedding cheats” however starts with a significant inaccuracy:

Fungi growing in the woods.

The number of bogus weddings has increased dramatically in recent years according to Home Office records.

The scam exploits a legal loophole meaning that foreigners can stay in the UK if they marry an EU citizen working in the country.

My understanding of a legal loophole is that the effect of the law concerned is unintentional. The freedom to bring your spouse into the EU country where you work is a fundamental one agreed at the EU level, not something accidentally granted through legislative incompetence.

Sham marriages are a problem whether the participant is a UK national or from another EU country. Restricting the ability of EU nationals to bring their families into the country would hurt a significant number of people, and make little dent in the problem.

I wonder whether the BBC piece is even original work, rather than being taken off a wire, as almost identical wording can be found in the corresponding Guardian article.

Photo: Fungi growing in Mount Pleasant Park, Nova Scotia.

September 21st, 2004

Harbord Fall Fair

Drummer at the Halifax Busker Festival.On Sunday we stopped by the tail end of the Harbord Fall Fair. We knew about the fair from Shana’s monthly music night, the organisers of which perform in, and run, the fair.

I’ve taken pictures of musicians before, and I’m slowly getting better at it. I had previously met some of the people involved, and so I was comfortable with taking their pictures. Even with a 70-200mm lens I need to be close to my subject, and so it is important that we are comfortable with each other.

I only arrived at the fair towards the end of the day, and during the final act the light failed completely. As a result, I don’t have a good sampling of the whole festival, but I did take enough pictures to justify putting together a public album “Harbord Village Fall Fair”.

The photograph here was taken at the Halifax busker festival.

September 14th, 2004

Firefox Preview Release

The 1.0 Preview Release of Firefox is now available. I recommend that anyone using Internet Explorer download Firefox and give it a try. You can use IE and Firefox side by side, and easily remove Firefox if you don’t like it.

Cannon at Halifax citadel.Only when I use IE at work do I notice the significant improvements to web browsing that Firefox includes. The first thing I miss is tabbed browsing (the ability to have multiple pages displayed in tabs in one window), something I use all the time in Firefox. The lack of pop-up blocking in IE is another major pain.

Another Firefox convenience is the dedicated web search box. This allows in-browser searching across a variety of sites. I find myself using the Google, Amazon and Dictionary.com searches the most, but keep a few others in the drop-down selection.

Type ahead find is a great way to navigate online manuals – press the single-quote key (‘) and type in the name of the link that you are looking for. Similarly finding non-link text is as easy as tapping forward-slash (/) followed by the text you are looking for.

Live Bookmarks provide RSS aggregation in the browser, which is a great idea. Unfortunately Firefox doesn’t yet flag new links, so you have to remember which was the last article that you read in a particular feed (something I’ve filed a enhancement bug
for).

The check that Firefox performs to look for new releases is less useful on Linux (where most distributions already do this for all applications), but should be very useful for Windows users. As well as delivering timely security patches this should also encourage rapid rollout of new features. This significantly increases the odds of an improved HTML being available to web developers sooner rather than later.

(Photo taken at the Halifax Citadel)

September 13th, 2004

Halifax harbour

Most towns that have an ocean, sea, lake or river in the vicinity provide some means for a tourist to float on water. Row boats are a lot of fun, while tour boats and ferries are restrictive but can give you a different perspective on a place.

Sunset over Halifax harbour.In Halifax there are a plethora of different boating opportunities ranging from deep sea fishing to the humble Dartmouth ferry. The tour that we went on, arranged by the conference that Shana was attending, was a simple trip around the harbour.

Sunsets seen from water are often more interesting than when seen on land, and on our trip we where rewarded with an interesting sky. The container port’s large cranes added an industrial silhouette, which unfortunately loses something in the small format that I have to use on the web.

September 7th, 2004

Another week

Recently I’ve not given myself enough time for journal updates, managing at best only weekly posts. I hope that this will change shortly, but sometimes, like now, I can think of nothing interesting to say that the world doesn’t already know. In lieu of real news, insight or opinion this post will consist of nothing more than odds and ends.

Snowbirds in formation.Over the long weekend the annual air show was held here in Toronto. Usually we get a reasonable view of the show from our deck, but the visibility was pretty poor this year until the end of the final show on Monday. When the Snowbirds had finished their various tricks they flew right past our deck, allowing me to take one of the best pictures of that afternoon.

Over the last week I’ve been hacking together a small image database application to capture information about scans of images. The requirements are specialised enough that using an existing image database wouldn’t work too well, so I’m putting something together using SQLObject, MySQL (yuck), ModPython, and SimpleTAL.

SQLObject is working out very well, and SimpleTAL is at this point pretty much bug free. ModPython on the other hand is a great idea, but is currently full of bugs. Defects found so far include: Old versions of modules being used (despite the PythonAutoReload directive), name-space problems when two modules with the same name are in different directories, and the Session implementation always timing out (use session.__accessed = time.time() after session.load() as a work around).

While ModPython will suffice for my uses I would avoid it for critical development at this point (version 3.1.3).

August 29th, 2004

Fedora hardware support

This post is about computers, so if that bores you click on the pretty picture instead of reading on!

Halifax harbour.When adding new hardware to a machine running Linux it will either work straight away, or it will be a challenge to your patience. For example if you add a new Ethernet card to your machine there’s a very good chance that on rebooting it will be found and will work with no extra software being required.

When hardware isn’t fully supported however things become complex and trying. Take for example the Epson Perfection 2480 scanner that we purchased yesterday. I had already researched Linux support, and found that neither the official Epson software for Linux (iScan), nor SANE support it. Just this week, however, on the development mailing list for SANE there was a thread about this scanner, and a couple of patches that enabled support for it.

To get the Epson Perfection 2480 scanner working I had to:

  1. Download the latest development source code for SANE from CVS.
  2. Apply the patches described in these two posts.
  3. Build the modified source, and install.
  4. Find the scanner firmware (Esfw41.bin) from the Epson CD. To do this I had to install cabextract, and then unarchive the file ESCAN/ModUsd.cab from the CD.
  5. Edit the /usr/local/etc/sane.d/snapscan.conf file to set the location of the firmware file.
  6. Add the line “usb 0x04b8 0x0121” to the /usr/local/etc/sane.d/snapscan.conf file.
  7. Install the SANE hotplug scripts from the tools directory.
  8. Create a new group called “scanner”, and add myself to this group.
  9. Download the latest XSANE front-end, build from source and install.
  10. Logout and log back in again so that adding myself to the scanner group would take effect.

After all this the scanner now works.

Copyright 2015 Colin Stewart

Email: colin at owlfish.com