October 2005 Archives

When I saw him in Amsterdam, Matt was talking about a secret project he was doing for the BBC. And now he has revealed what it is. He's putting a web front end on the BBC Programme Catalogue. That's a database that contains details of almost a million programmes that the BBC have broadcast over the last few decades. It all sounds really exciting. Matt is ably assisted by Ben (who seems to be following me around on my 2005 tour of old media outlets) and Murray - both chaps who really know their stuff.

First previews should appear within a few weeks. I'm looking forward to it.

Last weekend I saw The Corpse Bride. Yesterday I saw MirrorMask. Two new films from past masters of fantasy. How do they compare?

Actually there's no comparison. MirrorMask is streets ahead.

Whilst I'm a big fan of a lot of Tim Burton's work, I find that some of his gothic fantasy stuff is a bit twee for my tastes. I don't even like Edward Scissorhands that much. The Corpse Bride reminded me a lot of The Nightmare Before Christmas. If you like that then you'll probably enjoy The Corpse Bride. I didn't. There are a few good ideas in The Corpse Bride but it ultimately comes across as a bit childish. I can't imagine adults being that interested in it.

MirrorMask, on the other hand, is a fantastic film (in more than one meaning of the word). Neil Gaiman and Dave McKean have done a great job. The plot is far more interesting than Burton's and the visuals have raised the bar completely. Of course it helps that I was at a special showing and the director and cast were there to answer questions afterwards.

MirrorMask shows us the future of fantasy cinema. Beside it, The Corpse Bride just looks dated.

EuroOSCON Day 3

| No Comments | View blog reactions

Late, but I thought it was worth recording what I did on the final day of EuroOSCON.

As always, we started with the keynotes. Marc Heglund talked about privacy issues and the possibility of an "open data" movement. David Heinemeier Hansson talked about the secrets of Ruby on Rails and MySQL's Kaj Arnö showed us his holiday snaps. Then Luis Casas Luengo gave a very impressive talk on how one area of Portugual is making great use of Open Source Software in education.

The morning's final keynote was Damian Conway speaking about "Maximizing Non-stakeholder Buy-in by Leveraging Depatented Generic Information Transfer Protocols". I don't want to give too much away about this talk, but if you ever get the chance go and see it. You won't regret it.

After the coffee break I went to see Roger Margoulas talking about Open Source Data Warehouses. Roger builds data warehouses for O'Reilly (I had seen some of his tools in another talk on Tuesday) and he had some really interesting things to say on the subject. Nice to see that in one of his examples he used the Template Toolkit to build an SQL query.

Talks were running a bit late, so I had to rush off to Jouke Visser's talk about pVoice. I've known Jouke for many years and pVoice is a great project which uses Open Source Software to help disabled people.

After lunch I decided on another slightly non-techy talk. Stef Magdalinski is always an entertaining speaker so I decided to go and see him talking about "open sourcing everything". He was basically looking at a number of knowledge areas and discussing which ones might be amenable to being distributed using a model like Wikipedia.

Then I went to see Johan Vromans talking about his Template Toolkit add-on called TT2Site. This is a simple way to build it web sites using the Template Toolkit. It's a far simpler approach that the one we talk about in the Badger book. It might be useful if you have a small site to build or maintain.

After another break the conference wound up with Cory Doctorow of the Electronic Freedom Foundation talking about what the European Broadcast Flag plans could mean for the sharing of information. It's a frightening prospect.

So the conference ended. I stood around in the corridor for a while talking to various people before heading back to my hotel. In the evening, the Amsterdam Perl Mongers had organised a special meeting so a number of us went off to that. Much fun had by all.

All in all a great conference. It's been a while since I've been to a OSCON and I'd forgotten how much I enjoyed them. This was a bit of an experiment for O'Reilly and I hope they think it was a success and organise another one next year.

Thanks to Nat, Gina and all of the conference team for organising.

EuroOSCON Day 2

| No Comments | View blog reactions

Very late, but here's a summary of what I did at EuroOSCON on the second day (Wednesday).

The keynotes started with Rael Dornfest talking about how "Annenuation is the new Aggregation". He was followed by Red Hat's Michael Tiemann talking about quality management. We then had Jason Matusow from Microsoft nicely illustrating how, hard as they might try, Microsoft just don't understand Open Source. He did, however, announce that the licensing on their Shared Source program would be greatly simplified into three licenses. There then two keynotes which largely passed me by before Paula LeDieu gave an interesting talk on how the Creative Commons team are trying to see how their philosophies might apply in the world of scientific research.

A quick break and I was off to see Leon talk about his new, improved Perl debugger. It looks great, but unfortunately the web-based version doesn't seem to install on my system. I've sent in bug reports. I then went to see Ben Goodger talking about the fantastic successes that the Firefox team have had in getting their product accepted into the mainstream.

After lunch I went to see CL Kao talking about his new version control system - svk. For my projects I still use CVS, but I should probably look at using something a little more up to date. It was particularly nice to see Karl Fogel from the Subversion project applauding so loudly at the end of CL's talk.

I then stepped away from technical talks for a while to see Daneese Cooper talking about Free and Open Source Software in the developing world. Daneese works for Intel and it was interesting to hear her point out that Intel doesn't really need to care what software people run on their chips - but that as a lot of proprietary software that is used in the developing world is pirated then you could see why they might have an interest in advocating the the use of Open Source Software. After a while this talk took a bit of a patronising "taking beads to the natives" tack which made me a bit uncomfortable.

Another coffee break and then I was of to see Jutta Horstmann talking about migrating to Open Source databases. This was a good overview of the Open Source database world, but a lot of the migration techniques were equally applicable for any kind of database migration whether the source and target databases are Open Source or proprietary.

For the last talk of the day I wasn't really sure what I wanted to see. There wasn't anything that paricularly grabbed my attention. So on a whim I went to see Robert Lefkowitz giving a talk called "Shielding and Exposing Innovation". I really glad that I did. Robert is a great speaker and his talk drew many interesting parallels between the open Source movement and Renaissance Italy. I learnt some interesting history too.

I hung around and spoke to a few people and a group of us went off for some food before returning to the conference venue for the Maker Faire (why "Faire" rather than "Fair" or "Fayre") where a number of hardware hackers set up stalls showing their interesting (and often very weird) projects. Bumped into a couple of friends who I didn't know were going to be there, had some interesting talks and, all in all, had a most enjoyable evening.

November is shaping up to be an interesting month in London. Not only is there the London Perl Workshop that I mentioned yesterday, but Dean Wilson has organised a London Web Frameworks Night on November 17th. Three experts will be discussing the major MVC frameworks for Perl (Catalyst), Python (Django) and Ruby (Rails).

And it's at Morgan Stanley too, which is a very cool place to hold a meeting. More details as soon as I get them.

Update: Sign up here.

"Sleepy Village"

| No Comments | View blog reactions

I can 't work out whether or not this is irony.

The article talks about Pete Townshend doing a small unannounced gig in the pub at the end of my road. It says that the show

took place at the Bedford Pub in the sleepy village of Balham near London

Never thought of myself as living in a sleepy village.

London Perl Workshop

| 1 Comment | View blog reactions

Those nice people from the London Perl Mongers have announced the 2005 London Perl Workshop. It'll be on Saturday 26th November at The City University. More details from the web site.

I expect I'll be giving some kind of talk. Hope to see some of you there.

Update: 2005. It's 2005!

mightyv.com

| 2 Comments | 1 TrackBack | View blog reactions

A couple of my friends have won the first BBC Backstage competition with their web site mightyv.com (that's a pun on "mighty tv" and "my tv"). It's a great site and you should all take a look at it (assuming that the server can cope with the strain of all the publicity it's currently getting).

Well done Leon and Leo. And it's written in Perl too (or, as the Backstage announcement says, "PERL").

Although I like it a lot, mightyv still doesn't solve my biggest problem with watching TV currently. I have a number of programs that I watch regularly. Many of these programs are shown at various times during the week. Different seasons of the same series might be shown on different channels in the same week. Also it's becoming common for an episode to be shown on something like E4 and then be repeated on Channel 4 the following week. All this means that it can be difficult to keep track of which episodes I need to be watching. Mightyv will show me that, for example, Lost is being shown four times over the next seven days, but it doesn't know that I've already seen the Channel 4 episode as I watched it on E4 last week - so it still shows it to me.

What I want is a tv scheduling system that does two things. Firstly it needs to understand the concept of seasons and episodes so that it can tell me that the episode of Six Feet Under being shown this coming Sunday is season 5 episode 12. That would make it easier for me to know whether or not I need to watch it. Personally I find that it can sometimes be difficult working out what I've seen from the vague episode descriptions that you get from an EPG. I expect that the problem here is that the data that drive mightyv doesn't contain that level of detail. Secondly, I'd like to be able to tell the system which episodes I've seen, so that it could give higher priority to the episodes that I haven't already seen. It would be really good to get an email saying "that old episode of X-Files from season 5 that you never got round to seeing is on FX tonight at 22:00".

Oh, and third (on my list of two!) it would be great to be able to search for programmes that aren't in the current schedules. For example I'd like to see all of Dark Skies or American Gothic again at some point. But I can't add them to my mightyv schedule until they are scheduled by one of the channels. Which means that I have to remember to search for them every week or so in case they've been added to the schedule whilst I wasn't looking.

Or, alternatively, I could just go an look for them on BitTorrent.

Or, I could just turn of my television set and go and do something less boring instead...

The revived Doctor Who won three awards at last night's National TV Awards ceremony. The programme won "most popular drama" and Christopher Eccleston and Billie Piper won "most popular actor" and "most popular actress" respectively. I first found out about this by reading The Sun's version of the story over someone's shoulder on the tube this morning. It's interesting to note that The Sun has changed the names of the awards - substituting "best" for "most popular" in each case. It's surely obvious to anyone that "best" and "most popular" mean completely different things. But perhaps it's understandable that The Sun makes this mistake. It is, after all, the UK's" most popular" paper :)

But congratulations to everyone involved in the production of Doctor Who. Us long-term fans have been astonished by how popular the series has become. I suspect that deep within the BBC there is someone who is wondering why they didn't do this ten years ago.

I wonder if it's time for a repeat of "Our Friends in the North". And maybe a couple of new episodes that bring the story up to date - covering Labour's return to power. Think of the publicity possibilities - "James Bond and Doctor Who, Together at Last!"

Maybe not...

Flatterer

| 4 Comments | View blog reactions

From an interview with Gregory Wilson where he talks about his recent book Data Crunching.

I was also inspired by David Cross's excellent book "Data Munging with Perl", which taught me most of what I know about how to actually use the language. If he'd written a cross-language version of that book, I probably wouldn't have bothered writing mine.

I'm listening to the keynotes on the final day of EuroOSCON and David Heinemeier Hansson is talking about the secrets of Ruby on Rails. He talks about how they promote "convention over configuration" and how that means that you don't have to describe the same object attribute multiple times. This is a great idea, but one of the key parts of Rails (ActiveRecord, the part that talks to your database) forces developers to break this rule. When defining objects in ActiveRecord you need to describe all of the relationships that the object has with other objects (tables) in the database. This is repeating information that should be stored in the database. All databases (well, all databases that you should consider for serious development) allow you to define these relationships in the database metadata. Why doesn't ActiveRecord pull back this information from there? I suspect that it might be because most Rails users will be using MySQL as their database. And MySQL doesn't exactly make it easy to extract this data.

I've written about this before. This post is really just here as a pointer so that new readers can find my previous articles.

EuroOSCON Day 1

| 2 Comments | View blog reactions

Ok, so it was probably day 2 if you were here for the tutorials, but it was my first day here, so I'm calling it day 1.

Just a few brief notes so that I remember what I did yesterday, I'll fill in more details later.

The morning started with the keynote speeches. Nat began by comparing Open Source Software with The Iliad (or was it The Odyssey?) Then Tim O'Reilly talked a little about the "O'Reilly Radar" and Simon Phipps talked about some of the Open Source initiatives going on within Sun. They were followed by Jeff Waugh talking about recent improvements in Gnome and Chet Kapoor talking about... er... something (sorry, I can't really remember that talk). The day's keynotes were rounded off by Alan Cox talking about computer security.

After a quick break I wandered off to the Perl track to see Abigail talking about the problems with Perl's object system and introducing the new module Lexical::Attributes which is supposed to fix that. This was followed by the Perl Lightning Talks which were the usual interesting selection of short talks. I talked briefly about the results of the Perl Mongers census. People laughed at the jokes. Which was nice.

After lunch I saw Phil Torrone of Make Magazine talking about the new hardware hacking ethic which Make encapsulates and Aaron Crane talking about how the Register serves millions of pages each day using a combination of server side includes and mod_rewrite rules. After another break I missed the Perl 6 session to go and see Tim O'Reilly and Rogert Margoulas talking about the incredible amount of book sales data that they monitor. Finally I went to see a talk that was temptingly entitled "Enterprise Email is Broken" but it turrned out to be a sales pitch for Zimbra - which was interesting but as I'd already seen the videos on their web site I ducked out.

There was then an O'Reilly author signing session where it was good to catch up with some of the other authors that I know and the day finished with a Perl Advocacy BOF which I chaired.

More details later....

Update: The slides to my Perl Mongers Census talk are now online. More details will follow before too long.

EasyJet (part 2)

| No Comments | View blog reactions

EasyJet had one last surprise for me. My plane from Stansted was delayed by over an hour. I was supposed to arrive in Amsterdam at about 17:00 local time. I finally landed at about 22:45 and eventually got to my hotel just before midnight.

Which wouldn't have really been a problem, but there were some interesting things taking place last night and i missed them all.

From the barbed references in a couple of the keynotes this morning I wasn't the only person to have this problem.

EasyJet

| 3 Comments | View blog reactions

Remind me to never book another EasyJet fight. Ever.

I had booked a flight that left Gatwick at 14:35 getting me to Amsterdam at 17:50 (local time). It's now 18:00 (London time) and instead of being in the bar at at the conference hotel, I'm typing this in the departure lounge at Stansted airport whilst waiting for a flight which doesn't leave for an hour and a half. I'll eventually land in Amsterdam jut before 22:00 (local time).

What happened? Well, my plane was cancelled. But I only found that out after an hour queuing to check in at Gatwick. Apparently the fog this morning delayed a number of EasyJet flights and the company decided that the best way to recover from that was to cancel most of their remaining flights out of Gatwick today. I'm not entirely sure that makes sense to me.

So there were no more flights to Amsterdam today. They could offer me a flight in the morning. Or a flight from Stansted. There was also a flight from Luton, but by the time I found out about it, I didn't have time to get there. So I had to make my way back into London then out again. But, of course, that didn't kill the five hours that I was delayed by. So I've spent the last couple of hours hanging around in Stansted.

Never ever fly Easyjet.

Newspapers and Film

| 2 Comments | View blog reactions

My natural newpaper-buying instincts have been thrown into complete confusion by the British paper's recent spate of giving away free DVDs.

I first noticed this a couple of weeks ago when theguardian came with a free copy of The Madness of King George. That wasn't a problem. I don't always buy Saturday's Guardian, but the free DVD ensured that I bought it that week.

Then last Saturday the Guardian had a free copy of East is East. but The Times trumped it with a free copy of Cabaret. Fortunately, we already have both of these films on DVD so no hard choices needed to be made. No papers were bought.

But yesterday things got more complicated. The Guardian didn't have a free DVD. But the Times had The Last Emperor. And the Independent also joined in with a free copy of Wings of Desire. There was no alternative. I had to buy both. Which meant that I didn't buy the Guardian this weekend. I should point out that the Telegraph had a free copy of Whistle Down The Wind, but even that wasn't enough to overcome a lifetime's aversion to buying the Telegraph.

Obviously the papers are doing this so I'll buy copies of papers that I don't usually buy. Which I've done. But they must also be hoping that having spend the £1.20 on what is effectively a very cheap DVD, I'll also take a look at the paper and perhaps decide I like it more than my usual one. I haven't done that though. The papers are still both laying unopened on the kitchen table. I've just removed the DVDs.

I'll be watching closely to see what other good films I can pick up cheaply over the next few weeks. Looks like my Saturday newspaper buying will be driven purely by what films are being given away.

More and more web sites are publishing RSS feeds of their useful data. But if you're going to publish RSS feeds then it's important to get it right. The Transport for London site is a good example of how not to do it.

Whilst trying to get the latest news on the current Northern Line unpleasantness, I ended up on this page on the TfL site. "Oh look," I thought, "an RSS feed. I'll add that to my Bloglines subscriptions." But it wasn't as easy as it should have been to track down the actual address of the feed.

My first guess was that the link labelled "RSS news feed" would link to the feed. But that turned out to be a link to a page that explained what RSS is. My next guess was that the orange "XML" icon was a link to the feed (that is, after all, the way they usually work). But no, that was just a graphic with no link at all. That, in itself, is a major break with standard practice. Then I looked for the "autodiscovery" headers that can be added to a web page to point to related RSS feeds. They were missing too.

At that point I was stumped. I'd exhausted all possibilities. Realising I had probably missed something, I retraced my steps. Remember the first link that I looked at? The one that contained an explaination of what RSS is? Well on further investigation it also contained links to not one but two actual RSS feeds. Finally I was able to add the feed I wanted to my feed reader.

Now I consider myself pretty clued-up on how this stuff works. But it took me a good couple of minutes to track the feeds down. The majority of users would probably not have my tenacity. TfL might be wondering why they aren't getting many subscriptions to their RSS feeds. I think it's obvious why.

I don't think it's hard to follow current best practices when implementing features like this. I wonder why so many companies get it so wrong. As long as sites have non-standard ways to access these features, users will just get confused and not use the features.

Computer Weekly has an article about LAMP systems. It's nice that they're defining it as a "hot skill" about five years after everyone else was talking about it.

Or, on the other hand, it's easy to think that everyone knows about LAMP just because I everyone I know has been working in this area for years. But maybe Computer Weekly is a more accurate reflection of what the UK IT industry is thinking about and maybe most companies still haven't heard about LAMP.

EuroOSCON

| No Comments | View blog reactions

Interesting post from Nat Torkington about what he's thinking on the eve of the first European OSCON. It's been a few years since I went to one of the US OSCONs and I'm really interested to see how the European version works out.

I'll be arriving in Amsterdam on Monday and will, of course, be blogging the conference here.

I must have missed this news when it was announced a couple of days ago.

Archeologists have discovered evidence of noodles that were eaten in China 4000 years ago. Which obviously means that Pastafarianism has been around at least two thousand years longer than christianity.

Christians, give up your false gods and start worshipping the Flying Spaghetti Monster. You know it makes sense[1].

[1] Well, at least as much sense as any other religion :)

Empty Tube Carriages

| 3 Comments | View blog reactions

Every Londoner has done it at some point. A packed tube pulls into the station, but the carriage that stops in front of you is surprisingly empty. But it's early in the morning and you're only half awake so instead of being suspicious you just get on.

And just as the doors close, your nose alerts you to the problem. An extremely unpleasant smell is coming from the rather dirty person slouched motionless across three of the seats in the carriage. There's nothing you can do until the train stops at the next carriage. You just stand there as far away from the source as possible. But you can't help looking back as morbid curiosity makes you wonder if he has died.

That was me on the Central Line this morning[1]. The end of a particularly nasty journey to work.

[1] By which I don't mean I was the smelly dead person. I hope that's obvious.

Tiny Videos

| 4 Comments | View blog reactions

Why do people want to watch videos on their iPods? Maybe I should rephrase that. Do people really want to watch videos on their iPods? Or is that just what Steve Jobs wants people to want?

I had the same question when I saw that you could buy films and TV programs to watch on the Sony PSP. I just can't understand that people would want to watch films on a screen that small. I have enough trouble watching video on a plane's in-flight entertainment system. Anything smaller than that (and both the iPod and the PSP have screens smaller than that) would be a complete waste of time.

But when I asked this question to some people who were raving about watching films on a PSP I was told that they really needed to watch films while they were travelling on the train. I don't really understand that. Don't these people read books?

Hacking URLs

| 3 Comments | View blog reactions

How do you surf the web? Chances are that you're like most people and you just click on links to move from page to page. Seems that most people don't use the location bar in their browser. That's the text box near the top of your browser window that contains the URL (or, in plain English, the address) of the current web page. Even less people realise that they can edit that address and thereby go to different pages. For example, if I follow a link to http://example.com/some/interesting/page and I then want to see more of the site I'll often just edit the URL to remove "some/interesting/page" and end up at http://example.com/ which is hopefully the site's main page.

For me, and most of my geekier friends, that's a common part of our day. We'll often poke around on sites like that. It's not "hacking" (at least not in the nasty meaning of the word used by most mainstream media) it's just curiousity.

But it looks like this has just become a potentially dangerous activity. On New Years Eve, Daniel Cuthbert was using the DEC web site to make a donation to the tsunami appeal. Something went wrong with his transaction and he became suspicious and began to think that the site might be a phishing site[1]. As a bit of a geek, he poked around on the site a bit to find out what was going on. After a couple of probes he gave up and thought no more of it.

But his probes had set off an intruder detection system and his actions were reported to the police. They were able to track him down using the details of his credit card and he was prosecuted under the Computer Misuse Act.

Here's where it gets really surreal. Even though the judge accepted that there was no malicious intent in anything that Cuthbert had done, he said that he had no choice but to follow the letter of the law and to find Cuthbert guilty. He was fined £400 and ordered to pay £600 in costs. Full details of the case are here and there is comment from various security experts here.

I find this whole story incredible. There is now a precedent that says that any time you visit a web site in a way not foreseen by the site's owners, you are liable to be prosecuted. And that might cost you £1,000. As someone who regularly "hacks" URLs, I now need to be a lot more careful about the sites that I visit. Any site could potentially be monitoring accesses and looking for unusual ones. Does this mean that every time I get a 404 error, I could get fined?

It also has potential impact on me as a site owner. All web sites come under attack. Every day my web servers get probed to see if they are running software that has security holes. I just shrug and ignore it. Should I report all of these to the police? Should I report all 404 errors to the police? Can the police handle the thousands of new reports they've just opened themselves up to each day? Haven't they got more important things to do?

It just goes to show that laws which effect the ways that people use technology should really be written by people who understand that technology.

[1] A web site that pretends to be something it isn't in order to get confidential information from visitors.

Update: More detail here and the original posting about the story (from January) is here.

Neologism

| 1 Comment | 1 TrackBack | View blog reactions

Is Lloyd the first person use the word "pingosphere"? I've never seen it before. Oh wait, Google has one previous usage.

Does anyone else just think of penguins when they read it?

BBC Licence Fee

| 5 Comments | View blog reactions

The UK press is predictably angry about the BBC's request for an increase in the licence fee. When you're reading stories about this you should bear in mind that papers like the Sun are slightly biased as they are owned one of the BBC's broadcasting rivals.

Many of them seem to be reporting this as a done deal instead of the more accurate picture, which is this is the amount that the BBC are asking for. There are any number of government committees to go through before the rise is approved.

And it really annoys me that people complain about spending about a tenner a month on the BBC (potentially rising to fifteen pounds in eight years time if these reports are accurate) when they'll happily spend two or three times that each month on cable or satellite channels - where they have to suffer being advertised to as well.

I'm aware that I'm in danger of sounding like the man from the old Not The Nine O'Clock News sketch ("I would gladly sell my wife to finance the BBC") but I do think that they provide a top class service and that even at these new levels, the licence fee is incredibly good value.

(I should, of course, point out that the BBC are my current clients, but this hasn't altered my opinion of them)

Crystal Palace

| No Comments | View blog reactions

Dinosaur at Crystal Palace Yesterday the crisps crew spent a very pleasant couple of hours wandering around Crystal Palace. The photo shows one of the Victorian dinosaur models which were, for me at least, the highlight of the afternoon.

More photos follow soon.

Following on from my previous post let's take a closer look at the kinds of metadata that you might put into a database and how an Object-Relational Mapping layer (like Class::DBI, ActiveRecord or Hibernate) might make use of it. We'll start with the most obvious stuff and work our way down to less common features.

List of Tables
Any database system will be able to give you a list of the tables contained in a given database. This means that given a database connection, an ORM will know which classes it needs to model.

List of Columns in a Table
Given the name of a table, the database will be able to give you a list of the columns contained in that table. The ORM can use this data to know the names of the attributes that it needs to create for each class.

Data Types of Columns
Usually, the same database query that gives you a list of the column names for a table will also tell you the data types for those columns. The ORM can use that information to carry out basic validation on the values given to the corresponding attributes.

Relationships
A database isn't much use unless there are relationships between the tables. These relationships are modelled as primary keys and foreign keys. The ORM can query this information and use it to infer relationships between the classes that it is creating. Some databases also use these relationships to enforce the integrity of the data and will return an error if you try to transform the data in a way that breaks that integrity (for example, if you try to add a record for an order that references a customer which doesn't already exist). The ORM should look for these errors and handle them appropriately.

Constraints
Many databases allow you to define constraints on the data that is stored in a column. For example a column containing a percentage might be constrained to only accept numb ers between 0 and 100. Or a date column might only accept dates after a given date. Or a string column might only accept a certain set of strings. This basically further constrains the datatypes that we saw above and the ORM should be able to use them in the same way.

Triggers
A trigger is a piece of procedural code that is run whenever a certain event occurs in the database. Most commonly they are run when a row of data in a table is inserted, updated or deleted. The trigger is given the data values before and after the update and can use these values to run further validation on the update or even to run further updates. In some cases the trigger can prevent the update from taking place. This code shouldn't effect what the ORM does, but it needs to be aware of the potential return values and handle them appropriately, for example, realising when an update hasn't taken place.

Stored Procedures
A stored procedure is a piece of procedural code which can be run at any time by any user connected to the database. Again, this should be largely outside of the jurisdiction of the ORM as stored procedures are usually not associated with a particular table (i.e. class) but it would be good if it provided a simple way to call stored procedures and retrieve any results.

Now, I don't believe that any ORM has all of these features yet, but I think it's a reasonable set of targets to aim at. you should be able to point your ORM at a database and a complete set of classes back. Having to define the relationships between the tables using a text file or in hand-crafted class definitions (as you do with ActiveRecord) is just a waste of time. We should expect powerful tools. And if we don't get them, then we should help to improve the ones we have.

Which means, I suppose, that I should be helping to ensure that Class::DBI has all of those features.

The White House has denied that George Bush invaded Iraq because god told him to. These allegations will be broadcast in the forthcoming BBC programme Israel and the Arabs: Elusive Peace.

Is just me, or is anyone else slightly bothered that we're living in a world where a story claiming that the "leader of the western world" takes instructions from magic sky pixies can be taken seriously?

On Databases

| 1 Comment | 4 TrackBacks | View blog reactions

Last week David Heinemeier Hansson wrote a rather controversial piece about the use of stored procedures, triggers and relational constraints in databases. Later in the week Alex Bunardzic backed him up. What they both seem to be saying is that because we now have powerful tools to represent our data models in code[1] then there is no longer any requirement for the database to use any of these features which model parts of an application's business logic. The argument seems to be that they want to model all of the business logic in the application code and that splitting it between the code and the database only complicates matters unnecessarily.

I just can't agree with this point of view. If there are business rules which describe the valid states of your data then those rules belong in the database. The most obvious reason for this is that there will always be other applications that want to access the data in your database. These systems might not be built using the same tools as your original application and that makes it unlikely that they will be able to use your carefully constructed ActiveRecord code. Which means that someone else will need to reimplement the same business rules using their own favourite technology. And everytime the same logic gets reimplemented, there's a chance that discrepancies will creep in. This is the Don't Repeat Yourself principle in action.

The original articles recognise this problem and they think they have an answer. They talk about the difference between application databases and integration databases. They say that their rules only apply to "application databases", which are database that only support a single application, as opposed to "integration databases" which are there to share data between multiple applications.

I think that this distinction is nonsense. In the real world, these "application databases" simply don't exist. Or, rather, there are so of them that it's not worth considering them separately. Oh sure, most databases start out supporting a single application. But once you start getting an interesing amount of data in it, there will be other applications that want to use it. And then they'll want to start adding their data to your database. And before you know it your "single application" database is the company data warehouse.

Yes I'm exaggerating. But it happens. I've been building databases for almost twenty years and I don't think I've every seen one that didn't eventually become an "integration database". And for a multi-application database you need to put as much as possible of the business logic into the database.

If the Ruby on Rails people are seeing a lot of single application databases then good luck to them. But I think it puts a serious question mark over their experiences with databases in the real world.

[1] They are tailking about the Ruby on Rails database access layer, ActiveRecord, but their points are just as applicable to things like Perl's Class::DBI or Java's HIberate.

Unsynchronicity

| No Comments | View blog reactions

Seems I'm doomed to just miss seeing anyone connected to Buffy when they come to London. Last year I wrote about how I failed to see Alyson Hannigan arriving at the theatre for a performance of When Harry Met Sally. Yesterday I went into the HMV shop on Oxford St to find that Joss Whedon was there to do a signing. But it has all finished about half an hour before I arrived.

Ov er the last couple of weeks I've been reading Susanna Clarke's Jonathan Strange and Mr Norrell. It's a good book, but far too big. Every day as I was trying to read it on a rush hour tube I couldn't help wondering why it needed to be over a thousand pages long. It's divided into three sections, why couldn't it have been published as three books.

And, of course, just after I finish reading it I find that there is a three volume edition as well. That looks far more manageable. I wish I'd known about it three weeks ago.

Be Prepared

| 1 Comment | View blog reactions

Today was the day I gave my talk on Enterprise Perl at the LinuxWorldExpo conference. As always when speaking at these conferences I was well prepared. I had my talk on my laptop and a copy on a USB memory key. Also, as my laptop is looking a bit long in the tooth and isn't as fast as it could, I started up OpenOffice, opened the file and suspended the laptop before I left home. The plan was that I'd just need to switch on my laptop when I got to the conference and everything would immediately spring into action.

Well that was the plan.

As I was sitting in the audience of the previous talk I tried to start up my laptop, only to find that in the hour and a half since I had suspended it the (fully charged) batteries had run down and I had no power. So when the previous speaker finished his talk I had to leap up and plug my laptop in as quicklyas possible as I knew it would take a few minutes to boot up and start OpenOffice.

Then the second problem became apparent. For some reason the projector didn't recognise the video output coming from my laptop. I've connected this laptop to projectors all over the world and this is the first time it wasn't recognised immediately. This is, of course, why I always take a copy of my talk on a USB key. I was able to borrow the previous speaker's laptop and give my talk.

The talk itself seemed to go well. I may have misjudged the audience slightly. I gave a rather high-level management overview of why Perl is good for Enterprise systems, but I think that at least some of the audience were looking for something a bit more technical. A few people were kind enough to speak to me afterwards and tell me that they found it useful.

So apologies for the late start to anyone who was there. I hope you still found it useful. I enjoyed myself and I hope I get invited back next year.

es041005.jpg It's time for the Evening Standard's annual "outrage at the transport fare increases" issue. This year's issue must have been particularly difficult to write as for most people the fares will have actually gone down.

Let's explain this simply so that even Standard journalists can understand. Transport for London want everyone to use their Oyster Card system. This makes life easier for everyone. In order to do this they have increased prices for cash fares whilst reducing the equivalent Oyster Card fares. There's really no reason for anyone to pay the increased cash fares. It's all perfectly sensible. But nevertheless the Standard have to have their annual rant, so they ran the front page you see here.

I would, of course, link to the full story on their web site but it doesn't seem to be there. This is becoming a common trick by the Standard and the other papers published by Associated Newspapers. They put a big ranty story on the front page of the paper, but don't run the same story on their web page where they know that they will be linked to and discussed. I'd really like to hear someone from Associated Newspapers explain that policy.

Update: Unsurprisingly (because it's also owned by Associated Newspapers) the Metro has more of the same nonsense this morning. But they also include a quote from Transport 2000 who say:

If people are going to be encouraged out of their cars, we need to see cheap fares, not this hike. The lowest paid members of society are likely to suffer most.

There was more of the same when the BBC London news did a series of vox pops interviews last night. A lot of people seem to think that you need to pay a lot of money up front in order to use an Oyster Card. But that's not true. Using Pre Pay you can just put as much on the card as you need. When you need it. I'm interested to hear why people think that poorer people can't use Oyster Cards. Sounds to me like there's just some user education needed.

Oh, and here's the press release from TfL. So now you've got all the facts from the horse's mouth and you don't need to read the Standard any more.

Update: More people completely failing to understand what is happening on the BBC London site and two voices of sanity from 2lmc and currybet.

Beyond Java

| 1 Comment | View blog reactions

Is Java dead? Or dying?

O'Reilly have just published a book called Beyond Java and the blurb includes this:

If you are agree with the book's premise--that Java's reign is coming to an end--then this book will help you start to build your skills accordingly

I don't follow the Java community at all, so I'm quite surprised to see things like this being said. What has happened? Are people finally realising what a horrible language Java is?

Software Upgrade

| No Comments | View blog reactions

Last night I upgraded this site so it's now running on Movable Type version 3.2. Everything seemed to go fine, but if you see anything weird on the site over the next couple of weeks please let me know.

Glasses

| 2 Comments | View blog reactions

It seems that 2005 will go down in history as the year that my body officially gave up the ghost.

Not only was there all the sarcoidosis stuff, but this morning I had an eye test as was told that I should start to use glasses for reading and computer work. This didn't come as a complete surprise as the optician has been muttering about the possibility on my last couple of checkups[1] but it's still a little depressing.

[1] And if I'm completely honest with myself I have been noticing it getting a little harder to focus on close-up work.

About this Archive

This page is an archive of entries from October 2005 listed from newest to oldest.

September 2005 is the previous archive.

November 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Archives

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

Recent Comments

  • erez.wordpress.com: I wouldn't tell, as long as you won't tell them read more
  • James Mastros: It's interesting that you bring this up now, but don't read more
  • Aristotle Pagaltzis: Thankfully, this at least doesn’t directly affect the children of read more
  • skugg: It could have been your cover letter. Did you fall read more
  • John: ebay have done it again. They have changed the system read more
  • erez.wordpress.com: Being skeptic isn't "questioning everything scientists say," but "questioning arguments read more
  • https://me.yahoo.com/tuxservers#96247: I'd go with Planet Skeptic - apart from anything else, read more
  • https://me.yahoo.com/a/fxkAuR4r0.3.JVJqDK.J.DHVMsvW: Maybe they're enraged that Google even proposed the first EULA; read more
  • Dave Cross: login.launchpad.net/+id/cMCFxsB (cool name!), I never said that installing the Theora read more
  • https://login.launchpad.net/+id/cMCFxsB: What a bunch of FUD. Installing Theora codecs is absolutely read more