Archives for May 2006

How quick bright things come to confusion

I accidentally got whisked off-stage at WikiPedia and into the murky world of what it takes to run the show. First there were the arguments among the cast and then the backers got together and sacked the director. Showbusiness is a rough old game.

31/05/2006 15:37 by Matt Mower | Permalink | comments:
More about:

Mother of...

Recently, in a slip of the tongue, Mary Margaret Graham, deputy director for national intelligence collection under Negroponte, offered (for only the third time since the founding of the CIA) a public estimate of the overall annual U.S. intelligence budget – $44 billion just to cover the iconic 15. Undoubtedly, that's a low-ball figure, but as a crude measure of IC growth, consider that it's almost $18 billion higher than the 1998 IC budget – that being the last time such an estimate came our way. |Via Tom Engelhardt|

Ye gods! $44 billion/yr is the low-ball estimate for all this secrecy and black operations? Has it all been worth it?

31/05/2006 09:10 by Matt Mower | Permalink | comments:
More about:

My disgust for our leaders intensifies

GWB: America will fight the terrorists on every battlefront, and we will not rest until this threat to our country has been removed. (Applause.)

Washington Post: It was the home of 76-year-old Abdul Hamid Hassan Ali. . . . [He] had used a wheelchair since diabetes forced a leg amputation years ago. . . . In the house with Ali and his 66-year-old wife, Khamisa Tuma Ali, were three of the middle-aged male members of their family, at least one daughter-in-law and four children – 4-year-old Abdullah, 8-year-old Iman, 5-year-old Abdul Rahman and 2-month-old Asia. Marines entered shooting, witnesses recalled. Most of the shots – in Ali's house and two others – were fired at such close range that they went through the bodies of the family members and plowed into walls or the floor, physicians at Haditha's hospital said. A daughter-in-law, identified as Hibbah, escaped with Asia, survivors and neighbors said. Iman and Abdul Rahman were shot but survived. Four-year-old Abdullah, Ali and the rest died. Ali took nine rounds in the chest and abdomen, leaving his intestines spilling out of the exit wounds in his back, according to his death certificate.

GWB: [O]ur enemies are dismissive of free peoples, claiming the men and women who live in liberty are weak and lack the resolve to defend our way of life. . . . [O]ur enemies believe that the innocent can be murdered to serve a political vision.

Washington Post: In Haditha, families of those killed keep an ear cocked to a foreign station, Radio Monte Carlo, waiting for any news of a trial of the Marines. "They are waiting for the sentence – although they are convinced that the sentence will be like one for someone who killed a dog in the United States," said Waleed Mohammed, a lawyer preparing a file for Iraqi courts and the United Nations, if the U.S. trial disappoints. "Because Iraqis have become like dogs in the eyes of Americans."

Via Robert Higgs

The rhetoric of US and UK politicians in relation to this phony war they have created just disgusts me now. I feel tainted by my association with them.

31/05/2006 08:50 by Matt Mower | Permalink | comments:
More about:

Links for 30/05/2006

30/05/2006 15:30 by Matt Mower | Permalink | comments:

RubyInside

Peter Cooper has created a stylish new aggregator blog RubyInside where he is highlighting interesting stuff going on with Ruby. I read quite a few Rubyist blogs but can't keep up with them all and appreciate a commentary from someone like Peter about what's worth knowing.

30/05/2006 09:58 by Matt Mower | Permalink | comments:
More about:

Almost brilliant you say?

I was using Amar Sagoo's beautiful utility Tofu to read a reasonably long Word document today and, since I didn't want to hunch over the keyboard while reading, decided I would try the speech control feature.

It's actually pretty good. I changed the default configuration slightly so that it is triggered by the word computer (actually I tried many variations including the momentarily delicious slave) rather than pressing the escape key.

I was then able to read, sitting back comfortably, with Tofu expanded to show three fat columns on my 20" display and move along by saying computer move right whenever necessary.

This is fantastic, it's almost brilliant. Why isn't it actually brilliant though? The first reason is the speech recognition and the second is the lack of PDF support.

MacOSX built-in speech recognition is pretty good but it's just not good enough. In training I found that I couldn't get it to reliably detect two of the phrases. show me what to say was recongized about 15% of the time and open a document about 30%. This despite trying 3 different microphones (the built-in mic, my Telex USB headset, and the iSight mic), 3 different positions, all the recording levels, and a range of voices Rory Bremner would be hard pushed to beat.

This meant that, in practice, it failed to recongize the command move right just often enough to be irritating although move left was fine. By contrast I could hardly get move page left and, especially, move page right to work at all.

However the promise of this kind of speech driven technology really excites me. I got a real buzz out of being able to control the computer this way and was surprised that it didn't seem to spike my CPU. I really hope that the speech recognition is improved in MacOSX 10.5.

The second problem with Tofu was the lack of PDF support. I say was because Amar Sagoo is working on Tofu v2 which uses the PDF-Kit functionality provided in Tiger to get a text stream from PDF's. However, as Sagoo mentions, it's not all plainsailing:

One limitation, however, is that it can't distinguish between line wraps (which occur at the end of each line) and real paragraph breaks. This is because PDF files don't really store continuous text, but rather the position of each character on the page.

He's working around this and it will be interesting to see how good it can get. I dream of being able to sit back and relax while reading e-books using Tofu and voice control.

29/05/2006 19:59 by Matt Mower | Permalink | comments:

This is out of the park

I've just learned that the upcoming 2006 edition of Out of the Park baseball will be available on the Mac! Woo Hoo! This is fantastic news!!

OOTP is the best baseball simulation game ever and 2006 sounds like it's another big leap forward. Can't wait to buy this and waste many hours as manager of my beloved Giants!

29/05/2006 17:18 by Matt Mower | Permalink | comments:
More about:

715

Finally got my gameday audio subscription working again. Man the MLB.COM site is dreadful. I can't imagine how they could make it more complicated and user-unfriendly if they tried. But I was motivated this time by the chance to listen to Barry hit HR #715 and it was worth it (even if I wished he had hit it the night before to get a grand slam).

So anyway it also means I got to listen to a bunch of American advertising and it struck me that some of these ad's actually have small print. One, and I can't remember which it was so memorable, had about 8 seconds of a female voice talking so fast that I could make out possibly 2 words in 5.

Now I assume that these caveats are only in these adverts because it is forced by law. But doesn't it subvert the terms of this law when the caveats are so fast that you can't possibly hear and understand them?

Oh and my favourite worst adverts: the Dodge Caliber (are they kidding about the cup holders?) and Randy Winn for Wells Fargo. Risible stuff. Oh and Dodge have awful adverts as

29/05/2006 17:09 by Matt Mower | Permalink | comments:

Biking it

Since I moved I haven't been to the gym (or, rather, I haven't joined a new gym) and I'm driving to and from the office which is about a 6 minute drive. Jeez what a waste.

It occurred to me yesterday that I should get a bike and at least cycle to/from the office each day. I haven't ridden a bike in... umm... 20 years. It's a good idea, but it's still a little daunting. Can anyone recommend a good cycling blog so I can figure this one out? ;-)

29/05/2006 16:00 by Matt Mower | Permalink | comments:
More about:

From one dabbler to another... wow!

I just watched the demo of Dabble DB from Avi Bryant's Smallthought Systems Inc and it's pretty impressive. It's the kind of application that I imagine could make database applications a reality for a whole new class of user that wouldn't otherwise think it was possible.

If, as I imagine it is, Dabble DB is implemented using Avi's SeaSide framework then I think it merits a good look. I've downloaded Squeak (the SmallTalk IDE Avi recommends) a couple of times but never gotten beyond dabbling. Unfortunately I don't have time to do more than think about this right now, but I'd love to find time to have a better look.

For $10/mth for 1 user & 3 applications I think Dabble DB is definitely worth taking a look at.

29/05/2006 15:46 by Matt Mower | Permalink | comments:

SeeingTheLight

I've just discovered Matt Neuberg's NotLight application. It's a proper application interface to MacOSX Spotlight search and vastly less irritating than the built in MacOSX interface.

For example Neuberg has replaced the type-as-you-go search which always frustrates me with a query interface that gives control over options like name vs. content search, whether the search is word-based, case-insensitive, and diacritic-insensitive, as well as the ability to combine previous searches and search within specific folders.

It's a must-have utility for anyone using Spotlight regularly.

29/05/2006 09:55 by Matt Mower | Permalink | comments:
More about:

Website as a graph?

Well I've no idea if it has any use but this Website as a Graph think surely makes Curiouser and Curiouser look pretty:

CandC as a graph

From the website:

HTML consists of so-called tags, like the A tag for links, IMG tag for images and so on. Since tags are nested in other tags, they are arranged in a hierarchical manner, and that hierarchy can be represented as a graph.

Blue is the colour of links and orange the colour of text and quotes so this kind of density of blue and orange is probably quite representative of a blog. The cluster is probably the blogroll.

Found at Erik J. Barzeski's blog.

28/05/2006 23:48 by Matt Mower | Permalink | comments:

An English MEP, an Italian MEP, and a French MEP walk into a bar

From Tao of Mac I hear that some wag of a Euro MP has suggested wait a second, I need to catch my breath from laughing so hard to fund the EU by... no, really, I'll be alright in a second... by taxing every SMS and Email sent. What a marvellous sense of humour. Bravo!

Pardon me? Not a joke? You're not serious...

27/05/2006 23:22 by Matt Mower | Permalink | comments:

Bad label type blues

For a few days now I've been having an irritating problem with the Mac. It manifests itself in pages not loading properly in the browser. For example I'll be happily browsing eBay and then, all of a sudden, when I follow a link the page won't load with a message like:

Safari can't open the page “http://cgi.ebay.co.uk/blah"
because it can’t find the server “cgi.ebay.co.uk”.

Can't find cgi.ebay.co.uk? What's up with that? A few retries will get the same response and then, mysteriously, a few seconds to a few minutes later everything will be fine, until the next time.

Then again I seem to see the problem quite a lot when using GMail. During one episode I tried using nslookup to confirm the problem and it revealed something quote odd:

> mail.google.com
;; Got bad packet: bad label type
49 bytes
33 62 80 80 00 01 00 01 00 00 00 00 48 0e cd 13 
6c 06 67 6f 6f 67 6c 65 03 63 6f 6d 00 00 01 00 
01 00 01 00 01 00 00 00 00 00 04 11 fe 00 5b c0 
10

I've never seen a bad label type error before. Is this a DNS error? Or something to do with my ADSL modem perhaps (an old WebRamp 600i) which is acting as local DNS proxy?

As you can see, a few seconds (to a few minutes) later all is well again:

> mail.google.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
mail.google.com canonical name = googlemail.l.google.com.
Name:   googlemail.l.google.com
Address: 72.14.205.83
Name:   googlemail.l.google.com
Address: 72.14.205.19

I seem to see this error only on popular sites like Google/GMail, Amazon, and eBay. But it may be that the problem is intermittent and, since I use those sites a lot, I just haven't noticed it for another site yet.

It's got me baffled and you'll notice that a Google search (when it works) for that bad label type error message doesn't seem to turn up anything relevant. This of course means that probably noboy reading this will have any clue what the problem is...

But if anyone can offer me some advice on this I'd appreciate it. It's not a devastating problem but it is becoming consistently irritating now.

I wonder if it may be related to an occasional problem I've had with lookupd since about 10.4.4 where, every now and again, it will spike up to ~100% CPU utilization and then sit there. Sometimes logging out fixing it, sometimes it doesn't.

I'd really like to get these two ironed out.

27/05/2006 22:10 by Matt Mower | Permalink | comments:
More about:

The trail unblazed

I was just noodling around through a list of open source Mac applications when I came across TrailBlazer which turned out to be a full browser that has an excellent set of features for understanding your browsing history and searching pages you've visited.

There are many ways to reach this page

It's like a souped up version of the BrowseBack utillity. I ended up not liking BrowseBack very much because of the system load I seemed to incur for having it and because the UI really didn't suit me.

TrailBlazer's "path through the forest" visual metaphor works very nicely. What a pity it was a separate browser (although in 2004 maybe that made more sense) and that it seems to have gone the way of the dinosaur.

27/05/2006 15:46 by Matt Mower | Permalink | comments:
More about:

Links for 26/05/2006

26/05/2006 11:23 by Matt Mower | Permalink | comments:

Scary but cool

The SmackBookPro is the hot new way to switch desktops. It's really very cool to watch even if I'm not sure I'd do it myself. I grew up with hard disks where the heads would crash if you look at them funny. Consequently I still treat my PowerBook like it's made of glass.

Maybe I'm just living in the past ;-)

25/05/2006 18:12 by Matt Mower | Permalink | comments:
More about:

Links for 25/05/2006

25/05/2006 13:40 by Matt Mower | Permalink | comments:

Vista should've been codenamed White Elephant

I just leafed through Chris Pirillo's Vista Beta 2 feedback and had to chuckle. I don't know what OS X 'Tiger' or 'Panther' looked like 8 months before release, maybe they were in a similar kind of mess, but I doubt Apple had to contend with dialog boxes from the Windows 3.1 days!

The Vista release saga (now with extra delay!) is increasingly farcical to behold, especially in the light of the question "Who's waiting for this thing?"

To this outsider Vista sounds like Windows XP SP3.5 with a not terribly well conceived UI. Performance will be variable and reliability will continue to a problem as registry files grow and grow. I have no doubt that M$ will shift a bunch of units via OEM but will anyone actually go out and buy an upgrade to this turkey?

If I was a Microsoft stock holder I might be starting to give credence to the idea that M$ was deliberately depressing it's own stock price.

25/05/2006 13:03 by Matt Mower | Permalink | comments:
More about:

Continuing on the path of divergence

It's not that I was really looking forward to buying a Playstation 3 but if the news that Sony are moving to individuals licensing, not buying, games (to stamp out the aftermarket we're told) is true then it will be enough to stop me buying one. BTW: Even if they do this I don't think it will be a technical solution, I think it will be a legal solution to stop public trading.

In the 4 years I've owned a PS2 I've never sold a game and I've bought 4 so my problem isn't my love of the aftermarket. The reason I don't like this is that it's yet another thin end of the wedge about the way content owners are trying to redefine their relationship with us would be consumers (or the enemy as they like to call us).

We must remember that this move is being taken by Sony who recently got into hot water (but not hot enough IMO) by secretly adding RootKit based DRM to their media products. We should consider very carefully the motives behind what they do and what they think they can get away with. Or, rather, you should if you plan to give them your money.

To be very clear I am not in favour of trying to stop Sony closing down the PS3 aftermarket. As long as they are up front and open about what they are doing and how it will be achieved then I think they have a perfect right to put whatever walls around their content will make them happy. I just won't go along with it as long as I have a choice and it will ultimately self correct as the network effects hurt their business.

What is Nintendo's attitude towards it's customers? Maybe I need to switch platforms.

25/05/2006 12:20 by Matt Mower | Permalink | comments:
More about:

Where the hell is the opt out?

Where the hell is the option to tell Plaxo to get stuffed? I want an option so that if someone tries to add me to their Plaxo contact book they get a message to say I hate Plaxo and a URL to where I manage my own contact details.

24/05/2006 18:08 by Matt Mower | Permalink | comments:
More about:

Ambition without Careerism

I was listening to Radio 4's Great Lives program as I drove home yesterday. The particular life in question was Russian ballerina Tamara Karsavina.

Great Lives is a pretty odd show. I've listened to two and it's just not my kind of Radio except that... well somehow I find it interesting.

One comment in particular from the Karsavina show was her comment about being ambitious. I can't remember it exactly but it was along the lines of:

"I've always had strong ambition but never careerism."

That resonated with me because it's how I think of myself. I've always been ambitious and competitive but not really in any particular direction, more the direction de jour.

These days I am challenged to think a little harder. I guess partly because I am working with very goal oriented people and partly because, as I get older, I realise there is not the time left to achieve everything worth doing.

BTW; If anyone can give me Karsavina's exact quote that would be great.

24/05/2006 11:57 by Matt Mower | Permalink | comments:
More about:

Hear from your MP

I just signed up to Hear from my MP, Theresa May. It's a crazy idea but it just might work.

If you enter your details, we'll add you to a queue of other people in your constituency. When enough have signed up, your MP will get sent an email. It'll say "25 of your constituents would like to hear what you're up to. Hit reply to let them know". If they don't reply, nothing will happen, until your MP gets a further email which says there are now 50, then 75, 100, 150 — until it is nonsensical not to reply and start talking.

Apparently I am the 29th person to sign up which puts Maidenhead squarely in the middle of the league table and means we need to find 21 more people who want to sign up in order to get the next message sent to Theresa May.

I pity poor David Lepper, MP for Brighton & Hove, who has said he doesn't want to use the service and would rather his constituents read his Press Releases and Hansard entries. The poor man has the No.2 spot for sign-ups and I bet they'll keep coming.

24/05/2006 09:58 by Matt Mower | Permalink | comments:
More about:

Bringing the government to account

I've just used WriteToThem to send another letter to my MP Theresa May to point out my strong objection to the UK participating in, or assisting with, any US military action against Iraq. I've had two good responses from Ms. May to my recent letters about the Legislative and Regulatory Reform Bill and I await her response here with interest.

The crux of my argument is that the British government have, against my will, made me responsible for the death of thousands of Iraqs, hundreds of my countrymen, and untold suffering at a cost to myself and other British taxpayers, now and in the future, that I shudder to imagine. I reject absolutely the right of this (or any other) government to compound this misery by taking action against Iran who are a signatory to the nuclear nonproliferation treaty (unlike India, Pakistan, or Israel).

I've also noticed that WriteToThem now allows you to send messages to the Lords as well. In particular you can search, using keywords, for Lords that have spoken on a particular issue. I've identified 2 or 3 that I shall be sending further messages to.

I look at WriteToThem as one of the single most powerful tools the Internet has delivered. It's not accountability as I would have it, but within the confines of our present system of government it's a big step forward. Well done MySociety.

24/05/2006 09:41 by Matt Mower | Permalink | comments:

Now here are some interesting numbers

I never realised that Yahoo could show you insider stock trades in a company including the name of the employee making the transaction. One name in particular leapt out at me from the sheer number of transactions. A certain, William H. Gates III, sold $1,006,704,500 worth of MSFT in February 2006 alone. Must be planning an extension to his house or something like that.

22/05/2006 12:05 by Matt Mower | Permalink | comments:

Some ships just won't float no more

Saw a great comment in Mini-Microsoft's post about recent changes to the compensation plan at Microsoft:

Kevin Johnson talking about how the ad business is a big market and so we'll go after it and how "a rising tide lifts all ships". WHAT?!?!?! A rising tide won't rise a ship that has all this ballast and is anchored to the sea bed. Plus, aren't we MICROSOFT can't we control the tides? So I was disappointed that we had to sit through that to get to the second hour.

I really only read Mini for the comments. It's a fascinating window into a large company with a diverse work force. It's like watching a political discussion only I can treat it as pure entertainment because, having switched to Apple, I have so little interest in the results.

22/05/2006 11:06 by Matt Mower | Permalink | comments:
More about:

"Thank you for the delay"

I'm here at iNNOVATE! europe '06 in beautiful Zaragoza. Theres been a littlle delay getting started with todays program but the Wi-Fi works so all is forgiven.

I'm a little bleary eyed after last nights canape reception in the ruins of the Cesar Augusta roman theatre. Graham and I wandered around yesterday between engagements enjoying the sights and drinking a few beers along the way.

After the reception we found a little streetside cafe and whiled away a couple of hours chatting over beers and watching Zaragoza go by.

I get a really good feeling from this city.

16/05/2006 08:58 by Matt Mower | Permalink | comments:
More about:

I may have issues with parliament but...

The Legislative and Regulatory Refom Bill is getting close to parliament. I think everyone who enjoys the way the government acts now will be looking forward to a bill that gives ministers even more arbitrary power to make it up as they go along.

Here is the text of the letter I just sent to the MP for Maidenhead, Theresa May:

Dear Theresa May,

I am writing again with regard to the Legislative and Regulatory Refom Bill which is due before Parliament next week.

Despite the government having made some concessions I am still very concerned that this bill gives the government of the day far too much latitude in it's ability to change the law to suit itself.

Specifically I am concerned that, even with the ammendments, the bill would not, for example, prevent a minister from removing the right to trial by jury because it was 'a burden to the police'. We should not deliberately enact bad laws as we have far too many of them already.

I think this bill strays verges on rendering law-making arbitrary and it devalues parliament. I may have issues with our parliamentary system but if it's a choice between you lot and the whim of government ministers I know which side I stand on.

If the government wants to reduce bureacracy and streamline government it could start by reducing its own size and interfering less.

I hope you will consider my concerns when this bill comes before you.

Yours sincerely,

Visit the Save Parliament site for more information.

13/05/2006 17:13 by Matt Mower | Permalink | comments:

I know when I'm beaten

Okay so I got down to less than 10,000 unread threads in the Rails mailing list. I did this by going through page after page of threads in GMail hitting "Select All, Delete" until I got the number under 10,000. My strategy for the next 10,000 is more of the same.

If Rails isn't mainstream now I don't want to see what that mailling list might look like when it is. Perhaps I will continue to miss many diamonds by not being there and I surely already hurt by not participating more but my day job isn't titled developer and I just couldn't afford to keep up. Now I can't afford the cognitive pressure of even thinking about keeping up. It's never going to happen.

Rails list, you have defeated me!

13/05/2006 11:20 by Matt Mower | Permalink | comments:

Capistrano makes managing applications a breeze

I'm using Capistrano to manage the configuration and deployment of a Rails based web application. Capistrano is good magic. At it's simplest what using Capistrano means is that after I check in a bunch of new changes to svn I go to the prompt and type:

cap -p <password> deploy

and Capistrano takes care of connecting to the Quantact VDS that is running the app, telling runit to shut down the application, checking out a new version of the repository code, making all the appropriate symbolic links to static things like config files and log directories, and then restarting the app so the new version is ready to serve.

That alone would be pretty cool. But Capistrano has more magic to offer us that is based around roles. Now I want to manage a separate aggregator process that is included in the codebase but not strictly part of the Rails application (they communicate using DRb).

Turns out this was easy with a little reading of the docs covering extending tasks. The deploy in the command line task given above refers to the deploy task which manages the process I just described.

This task can be extended using new tasks like before_deploy and after_deploy that do extra stuff. So in my case I've added a new after_deploy task to handle restarting the aggregator process. What I've ended up with is this:

task :after_deploy do
    restart_agserver
end

desc "Restart aggregators"
task :restart_agserver, :role => :aggregator do
    run "sv restart ~/service/agserver/"
end

The indirection is necessary because you can only have one task with each name and I only want hosts with the aggregator role to do this this particular task. So the after_deploy task which may later be asked to do stuff for other roles, calls a more specific task which is restricted to the appropriate role.

As you might expect, earlier in the recipe I declare this new role:

role :aggregator, "www.metavalues.com"

This ability within the deployment recipe to create new roles, to extend tasks, and to restrict tasks to specific roles is, like Ruby itself, subtle and powerful. By making the deployment recipe a domain specific language for describing the maintenance of applications you get the whole package in way that is powerful (all of Ruby is at your commands) yet utterly simple.

All in all I think Capistrano adds a huge amount to the value of Rails once you step beyond your text editor and think about what it means to run and maintain your application.

Very neat.

13/05/2006 10:56 by Matt Mower | Permalink | comments:
More about:

Todays coding is brought to you by...

Monaco 10pt without anti-aliasing, respect to hasmanyjosh. I'm still tempted by Fabrizio Schiavi's Pragmata but I don't feel like paying £60 for a font.

11/05/2006 21:49 by Matt Mower | Permalink | comments:
More about:

All hail recipe 24!

I am of course talking about Rails Recipe No.24 "Adding Behaviour To Your ActiveRecord Associations". It's magical.

In one of my applications there is a relationship from a Feed to a FeedExpression where the expression tracks the degree to which that feed associates with a concept (actually a value). In Rails that's a pretty typical situation that you handle with has_many, so:

class Feed < ActiveRecord::Base
    has_many :feed_expressions
end

Now I can refer to:

feed.feed_expressions

to process the expressions.

But I also use the concept of a Slice which is allows for the division of the database into time periods like 'today', 'yesterday', 'last week', 'May 2005'. Each feed may actually have many different expressions for the same concept in different slices overlapping. But feed_expressions acts like an Array which gives me a problem. I'm going to get the expressions from every slice.

In that case I'm going to have to manually filter out the expressions from just the slice I am interested in, e.g.:

slice = Slice.find_by_name( 'this_week' )
feed.feed_expressions.select { |e| e.slice == slice }

That looks pretty ugly and things are only going to get worse when we realise how much overhead filtering all those unwanted slices is going to create on every access.

However Recipe 24 to the rescue... It turns out that feed_expressions is not a real Array but an AssociationProxy masquerading as an Array. And Rails lets you add functionality to those proxies, so:

module BySlices
    def for_slice( slice )
        find( :all, :conditions => ['slice_id = ?', slice.id] )
    end
end

and a slight modification to Feed along the lines of:

class Feed < ActiveRecord::Base
    has_many :feed_expressions, :extend => BySlices
end

means that I can now use:

feed.feed_expressions.for_slice( Slice.find_by_name( 'this_week' ) )

to get exactly the expressions I want and the filtering happens in SQL before ActiveRecord has to instantiate anything. Neat!

11/05/2006 20:15 by Matt Mower | Permalink | comments:
More about:

Scattershot learning

From Pauls tips comes a 6-step program for learning any difficult subject. It's a somewhat scattershot process and appeals to me because it is, more or less, how I approach the problem myself: fast paced immersion in a broad subset of the topic with regular breaks to give my brain a chance to cool down. I've noticed the breaks get a little longer and more frequent every year ;-)

11/05/2006 15:18 by Matt Mower | Permalink | comments:
More about:

Team Amerika have their priorities right

As Jon points out, the top US priority in Iraq is clearly to build the biggest swimming pool and country club in the country.

Who wastes good money ($592 million of it) on water, electricity, and health care for the natives when they dont even make a good workforce!?!

11/05/2006 12:23 by Matt Mower | Permalink | comments:
More about:

Information Asymmetry

Euan's got an interesting article about information asymmetry which is the term economists use to describe the imbalance in a transaction where one party has better knowledge than the other.

11/05/2006 12:08 by Matt Mower | Permalink | comments:

Neat Safari trick

Did everyone know this one already?

In Safari i have a bunch of my common links in my links bar: GMail, Squib, metrics, Bloglines, Techmeme and so on and they're easy enough to click.

But if I hit Cmd+1 it loads the first link from the links bar in the current window, Cmd+2 the second and so on.

What a neat trick.

11/05/2006 10:50 by Matt Mower | Permalink | comments:
More about:

How to make a bad situation worse

William Lind covers a report on the worsening situation in Afghanistan where government (i.e. US, UK, and Afghan army) control is diminishing in the south. The report suggests that this is because of the dual objectives being persued (apparently in no particular order):

  • Stop the insurgents
  • Eradicate opium production

For farming families with no other means of survival opium is a life-line and the insurgents play to this by supporting the farmers against the government. The division of military resources between these conflicting goals means that neither policy can be effectively enforced.

It seems to me that the answer is to legalize opium production and consumption (in Afghanistan, the UK, and the US) and treat it like any other product that has potentially negative side-effects (e.g. alcohol, paracetamol, Sky One). Slap a warning on the side and let people get on with their lives and the consequences of their choices.

At a stroke the Afghan government could support the farmers and cut off the support base of the insurgents. The farmers could get a fair price for their produce on the open market. And opium/heroin users can get a better product without being unfairly criminalized for their choices.

But governments don't do this sort of stuff because it means less meddling in other peoples lives not more. The idea that people don't need every aspect of their existence dictated to them by central government seems to be anathema to the raving bureaucrats we are saddled with.

10/05/2006 17:47 by Matt Mower | Permalink | comments:

Thanks for the goon squad

Lew Rockwell considers whether Bush's prime legacy will be the Transportation Security Administration.

  • The main effect of the TSA? We could talk about the massive increase in theft from baggage.
  • We could draw attention to the loss of travel freedom, such that federal snoops have become the gatekeepers that allow us to fly from here to there.
  • But let us discuss something more practical: the incredible waste of time and the unrelenting frustration that flying has become since the TSA took over.

I remember the first time I flew to America under my own steam back in April 2000. I'd hopped a weekend flight to Cleveland to see my girlfriend who was on a training course.

I'm not sure how much this says about me but it was exciting to finally fly on my own like that and I was excited to go because America seemed such a great place (heck even Cleveland!) I can still remember the silly and excited feeling as I arrived and made my way downtown in a real yellow cab.

Now try to imagine how far my thoughts are from excitement as I ponder the prospect of future visits to the US. I think dread might not be too strong a word. Because what the TSA says to me is:

"Hey! Listen up bozo. If we're prepared to treat our own ordinary people like criminals imagine what we're prepared to do to you foreign bastards!"

So thank you America for your goon squad. It does you credit.

10/05/2006 08:46 by Matt Mower | Permalink | comments:

As Steve Martin would say, the answer is to get small

I think that the article by Lew Rockwell that I just referenced is really worth reading:

In Mises's view, in order to maintain peace and free trade, large nation-states had to become small nations based on the will of the people. Otherwise, he said, they would be centers of civil strife, where wars of some against some would perpetuate themselves. He also believed that all groups needed the right to separate from the state and form their own states. This was the only way that democracy could be implemented.

My own thinking has evolved to this point of view and not just for states as large as the US. The same argument can be made about the UK. Proper devolution coupled with fewer restrictions on the movement of people and ideas. This naturally leads to an answer to immigration problems:

Or we can choose the direction of liberty, which requires devolution, decentralization, and the elimination of tax-paid privileges for immigrants. Never before has the choice for the right and true been so crucial.

This doesn't affect each mans choice about where to spend his own money in the furtherance of the world society in which he wishes to live. In fact it gives him more freedom to exercise his judgement and to escape the unwise judgements of others.

In my vision we end up in a situation where good societies really do evolve because they are fitter.

09/05/2006 15:25 by Matt Mower | Permalink | comments:
More about:

The rule is to destroy

I was reading a peace by Lew Rockwell about the negative effects of the state on economic progress when I came across something very interesting which I have often wondered about:

Even the shape of your office is influenced by intervention. Thirty years ago, offices started using cubicles to house workers. Cubicles are still the largest selling office furniture, despite a huge range of management experts who say that they create a bad form of business environment.

Why do they persist? In 1968, the Treasury Department created new depreciation schedules that subsidized cubicles at the expense of separate offices. Companies can depreciate cubicle walls in 7 years, whereas permanent office structures are given a 39.5-year rate. In other words, the costs of cubicles are more quickly recoverable than offices. This one change alone is what turned our workplaces into pictures out of Brave New World instead of the comfortable and humane places that they should be.

09/05/2006 15:11 by Matt Mower | Permalink | comments:
More about:

"You'll have had your tea"

Dad and I (courtesy of his friend Mike Boxwell of Littlefoot software) went to see the recording of the first two I'm Sorry I Haven't a Clue of the new season.

What a great evening! The show is very funny itself but it's also a pleasure to see a group of people who work so well together and so obviously enjoy themselves. We got lucky and Jeremy Hardy was in the guest slot. It was great to finally see Humph in action. May he carry on another 20 years.

Fantastic!

09/05/2006 15:06 by Matt Mower | Permalink | comments:
More about: