Colin's Journal

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

April 27th, 2004

Computer Woes

As I was coming home on Friday evening I had a plan for the weekend. I was going to enjoy the nice weather we’d been forecast, and take lots of photos.

Chilies for sale at a Venetian market.Within half an hour of arriving home my plan was confounded by a dying hard drive. At first I wasn’t sure where the sound was coming from, but the stream of I/O errors to the console confirmed that my hard drive was on its way out.

I decided to take advantage of the new hard drive, which I had to buy, and upgrade from Debian to Fedora. The installation of Fedora went very smoothly, detecting all of my hardware even down the make and model of monitor.

Restoring all of the software services that I run, and recovering my data off the old drive, took most of the weekend. I’m still not finished, but the essentials are working (Subversion, TALAggregator, CUPS, NFS, MySQL, etc).

I’ve since attempted (and so far failed) to upgrade my machine to 100MB ethernet on the internal network, and added a 2nd 120GB to act as backup.

The good side of this upgrade is that my machine now has a new lease of life. Fedora is much faster than Debian, probably due to a combination of kernel tweaks and a newer version of Gnome.

(Photo is of some chilies for sale at a Venetian market.)

April 19th, 2004

Constitution Referendum?

It looks, despite earlier assurances to the contrary, that the UK will be holding a referendum on the adoption of the EU Constitution. I’m a little surprised that the government has chosen to go this way, but I can understand their reasoning.

Boat on Venetian canal against wall of ivy.The hope is that the constitution question will be removed from people’s decision making in the European Parliamentary elections. This reduces the size of the protest vote, meaning better results for Labour, and less chance of the opposition successfully claiming legitimacy with their calls to renegotiate the constitution.

Unlike votes cast in the European elections, votes cast in a referendum will have a definite effect on the adoption of the constitution. In my opinion the middle ground on this issue is very large, with most voters not starkly for or against the constitution. Persuading them to vote in favour should be a manageable task, not just because the arguments in favour are fairly strong, but because those against are very weak.

Those campaigning against ratification of the constitution are going to have a hard sell. The consequences of a No vote is hard to predict, and is mostly out of the hands of UK citizens and politicians.

If two or more countries failed to ratify the constitution then we would probably see the constitutional project put on the back burner for a long time, possibly forever. The current complex interwoven treaties would stay in effect, with select countries continuing deeper cooperation to the exclusion of others.

If the UK was the only country not to ratify the constitution then things would be very difficult. We could try to negotiate minor face saving changes to the constitution, and then ratify it through parliament. If this didn’t happen then we would probably have to leave the EU and participate in the single market through the EEA.

(The weekend had lousy weather, so I’m resorting to older photos like this one from our Christmas in Venice).

April 12th, 2004

SimpleTAL performance.

Top of a stone tower on the beaches.I’m pleased with the performance improvements that are going to be in the next version of SimpleTAL. The performance of the template parsing is unchanged, but the performance of the template expansion is significantly better. Exactly how much better depends on what you are doing, but I’ve seen improvements in the 45-70% range using the simple tests that I have.

The first version of SimpleTAL that I did any benchmarking on was version 1.1. On my “Basic” template test it managed to do 5.38 expansions/sec on my lowly P3-450. Version 2.0 brought a massive improvement, getting 69.32 expansions/sec, with version 3.2 bringing the peak performance to date of 74.88. Following 3.2 performance slipped as new features and code to handle edge cases was added.

Today’s development version achieves 101.59 expansions/sec under Python 2.1, and a little more under 2.3. I think that I’ve now reached the upper limit of what I can easily tune the code to achieve. To go faster would require a significant change in approach (for example compiling to Python byte code).

Another topic: I’ve had to make another correction to my RSS feed, this time caused by a bug in my weblog plugin code. The problem was due to my code using the file extension of the current template (rss.xml), rather than the “day” template (day.html) when generating the links to posts. Thanks to Heather for pointing it out!

April 11th, 2004

LJ Syndication Feed Problem

When I switched my weblog over to a PubTal based plugin I also switched the character set used by my RSS feed. Unfortunately the LiveJournal Syndication system doesn’t support ISO-8859-15, and so it hasn’t been syndicating my site for the last three weeks.

I’ve now switched it back to UTF-8 which should hopefully solve the problem for LJ users, and given universal support for UTF-8 in XML it should also work for anyone else aggregating the feed.

April 9th, 2004

Profiling Python

Profiling Python code is difficult. Python comes with two different profilers, called “Profile” and “hotshot”. The hotshot profiler is written in C and is meant to introduce little overhead into the running of your application. Unfortunately it also produces extremely variable output, with the timings determined for a particular function call differing by as much as 400%. This means you can’t make an optimisation and then check with hotshot to determine whether the effect was good, bad, or indifferent. The older “Profile” profiler has a similar problem, but seems to record smaller variations in the times it records for function execution.

Running these profilers was still useful however, because I’ve managed to improve SimpleTAL performance by ~35%. The single biggest performance gain was also the easiest to implement, and involved removing two debug statements. Much to my surprise Python’s logging library introduces a heavy overhead, even when debug is turned off. SimpleTAL used to make a call to a Logger’s debug function for every TAL path evaluated, and despite the significant amount of work performed during the rest of the path evaluation, this debug call took most of the execution time.

The other changes I’ve made were also fairly small, and have improved things by another 10% or so. To make any further improvements I suspect that large scale changes to the TAL/TALES interaction would have to be made.

April 7th, 2004

Passover

Red berries hidden by leaves.Part of my distant past includes having to take religious studies up to, and including, GCSE level. This compulsion may be explained by the school being sponsored by the church, or it may just have been someone’s whimsy. Regardless of the reason, I had to study religion, composed of two parts: Judaism and Ethics.

In many respects I can probably claim to have failed the Ethics part, because there wasn’t any structure to it. Judaism, while being completely irrelevant to me, did at least include lots of things to remember. Having passed the GCSE exam I promptly forgot almost all that I had learnt on Judaism, apart from a few random facts and half-correct ideas.

Last night I had a chance to revive some of this knowledge by attending a wonderful passover meal hosted by a friend. The ceremony part was remarkable for its flexibility and lack of prescribed ritual. There was a very strong structure in place, but the actions performed and words spoken within that structure were extremely open. The written guide we were following originated from California, and in places it showed. It also strongly resembled a work in progress; in need of editing and in some parts completion.

The food and wine involved throughout the ceremony was excellent, although extremely filling. As ceremonies go it certainly has much to recommend it over the usual Christian ones that I’ve been exposed to (discounting Christmas and Easter meals – which in my mind are so far removed from religion that they don’t count).

April 5th, 2004

New website design

I’ve finally had time to redesign my website. The content hasn’t changed, just the styling of the pages. Getting the CSS to work correctly took far longer than I had hoped, but it is mostly there now. If anyone knows why there are a couple of pixels of white space underneath the side image in Mozilla (on pages with little content), and some more above it in IE (on most pages), I would gladly like to know.

I don’t know how long this design will last. I had something else in mind, but as I started prototyping I found myself working towards this more minimalist design instead. If anyone has any problems in their preferred browser please let me know. Testing done so far includes:

  • Mozilla FireFox 0.8 – occasional strange gap at bottom of side image.
  • Galeon – same as Mozilla.
  • IE 6.0 – strange gap at top of side image.
  • Safari – same as Mozilla.
  • Lynx – works perfectly.

April 3rd, 2004

Bits and Bobs

Swan on Lake Ontario.Last weekend we were travelling to Arkansas, so I needed to purchase a book to keep me entertained on the flights. I chose an author new to me, Alastair Reynolds, and a book called Chasm City.

The book is far-future science fiction incorporating many tried and tested space travel ideas. The writing was generally good, but the relationships between the characters often felt false. Characters interacted in peculiar ways; conversations lacked emotion and actions seemed driven only by plot requirements. Even at 616 pages the book felt rushed, as though the plot fit but the story didn’t.

At some point I’ll try his earlier book, Revelation Space, which is selected as being the superior of the two in the Amazon reviews.

The news that the US will be fingerprinting and photographing all visa-waiver country citizens from September is marginally better than the previous plan, making us obtain a US visa, but it still disappointing. The introduction of biometric passports next year will make this a moot issue anyway.

The UK passport service is currently saying that they will place digitised photos into the new-style passports, but leave space for one other biometric identifier. Depending on what this second identifier is, and the most logical is a fingerprint, then all countries that you enter and leave will be able to record this information anyway.

Treating people as criminals isn’t just a policy for people crossing international borders; the UK is also planning to introduce biometric identify cards for the entire population. State interference in everyday lives seems to be the direction we are heading in.

March 29th, 2004

A long over due update.

Daffodil in a field.I’ve let nearly two weeks slip by since last updating my weblog. The event most worthy of note during that period occurred over the past weekend, and that was our trip down to Arkansas. The trip itself was a bit of a nightmare on the outbound leg, a combination of bad luck with the weather and the typical bad customer service of American Airlines.

Discounting the travel as a necessary evil, the trip overall was a great deal of fun. I met the part of Shana’s extended family that I had until now missed out on meeting, and was reacquainted with those that I had met before. The weather in Arkansas was a very welcome break from Toronto, with highs somewhere between 70 and 80 Fahrenheit (21-26 C).

I, of course, took my camera with me. The poor Toronto weather has kept photography to a minimum recently, so I was looking forward to this opportunity to take some shots. Unfortunately the combination of rusty skills and time pressure meant that I came back with fewer good pictures than I had hoped for. If I had been alone I could have taken many more, but then the trip wasn’t intended to be a photography outing. This shot of a daffodil was one of the ones that did come out, despite the flowers being well past their best.

Prior to the trip to Arkansas, I had spent a good few days trying to unite the software which creates my website (PubTal) with my weblog program. I’ve done this in the form of a plugin for PubTal, which I’ll probably include in the next version I release. I can now write weblog posts in a text editor, or even OpenOffice.

March 18th, 2004

A nifty sounding service

The low cost of bandwidth, coupled with a competitive North American telephone market, has lead to some interesting business models becoming viable.

Farm house in the snow.Take for instance this rather nifty sounding service UK 2 ME. The website allows you to enter a U.S or Canadian phone number, and it will in turn allocate you a national-rate non-geographic UK number (i.e. one in the 0870 range).

There is no charge for the service. Callers pay the normal UK national rate, and are connected through to your North American number, several thousand miles away. I haven’t tried the service yet, so I don’t know what the call quality is like. If it turns out to be good then it’ll be a very useful service, especially for travellers.

The service provider makes money because the cost of the bandwidth and the NA termination, are lower than the interconnect fee that it will receive for calls to the UK number. How long that’ll be true for I don’t know, but in the meantime it is a easy to offer service with virtually no overhead. There’s no customer service required, no billing to be done, just some automated provisioning to the network.

Copyright 2015 Colin Stewart

Email: colin at owlfish.com