September 2007 Archives

Cheap backups

| | Comments (2)

Here's the situation: as a cheapskate I've opted to downgrade from a dedicated server to a virtual server. Saves me £35 a month. Fine. However, it means I lose the terribly convenient backup storage that came with the dedicated server.

Now, as a cheapskate, I don't want to end up paying for more storage somewhere else. But I noticed I get 150 mailboxes with the ISP and up to 25GB storage across the lot. So what I do is back up my server to a dedicated mail account. I just zip the folders I want to back up, split them if necessary into 40MB chunks, encrypt them, zip them up again and mail them to that dedicated account.

Simple, free, easy.

Useful CPAN tip

| | Comments (0)
If you use http://search.cpan.org/ you can add perldoc?Name::Of::Module to get straight to the documentation for any module. This is very handy for modules that the search facility doesn't find, like FCGI for instance.

http://search.cpan.org/perldoc?FCGI

The path to hell is paved with good intentions

| | Comments (0)
The current tumult over Northern Rock savings accounts is a perfect example of good intentions leading to bad ends. Working the chronology back from present to past, the Chancellor's recent decision to guarantee savings account 100% is driven by a good intention: to assure savers and end the panic run on the bank. The only reason Northern Rock would have difficulty after the Bank of England agreed to lend them money was if there was a run on the bank, and the only reason there has been a run is, well, because there has been a run. It's panic that's the problem, and reassurance such as the Chancellor offered sets out to eliminate the panic.

However, the panic started because Northern Rock borrowed from the Bank of England. The Bank of England lent to Northern Rock because it was necessary and lending to them would keep their cash flow flowing. That's a good intention: lend to an institution to prevent it keeling over. Lending by the way was at 1% point above base rate so it wasn't cheap.

But why specifically did the Bank of England lend to Northern Rock? Well, they, rightly some might say, decided that those affected by the US sub-prime led credit crunch should bear the weight of taking risks that exposed them to the sub-prime led credit crunch. You take the risk; you pay the price. That's right. In isolation. So the Bank of England were right to not lend generously on the general money markets if their decision was considered in isolation. But it was not taken in isolation; it was taken in comparison to the ECB and US Federal Reseve; both of whom released billions onto the money markets. UK institutions were at a disadvantage compared to their counterparts in the States or Euroland.

Had the Bank of England lent as generously and generally as the ECB or the US Federal Reserve the panic queues outside Northern Rock would never have existed. Had the Chancellor been a big enough thinker he would have seen that and made the BofE behave differently. As it is, as a result of a series of good intentions, we have a situation where banks can now try their luck at having their risks nationalised, people who lost on company pension schemes baying for the same sort of guarantee on their savings (and why not) and we're no better off for it than our European and American competitors who will have all dipped into the funds their central banks released onto the markets.

The path to hell is paved with good intentions.

Creating thumbnails on the fly under FastCGI

| | Comments (0)
A while ago I wrote about the problems I was having with trying to get Image::Magick to create thumbnails on the fly whilst running under FastCGI. Well, I was right then that the problem lay in the fact that FCGI ties STDOUT whilst Image::Magick also wants to access STDOUT to write to. I spent a couple more hours trying to figure out how to untie STDOUT, do the Image::Magick->Write to STDOUT then re-attach it to FCGI. No luck. The FCGI->Detach method didn't do it. Under hood was too complex for me to understand.

I retreated and looked at GD again. Similar problems, as well as a messier interface. Then I had a gander around seach.cpan.org and picked up on Imager. Thanks to the handy rating stars on the search pages it looked promising. And really, it is a breath of fresh air: well documented, developer-friendly interface, myriad options and ways to play with images (including the scale() method which automatically scales in proportion). And, crucially, you can write() your images to a scalar variable, which means you can then print that scalar and FCGI will scoop it up and print it out like any other print statement.

Job done: I can now make thumbnail images on the fly and send them back to the browser under FastCGI by dropping Image::Magick for the new and very impressive Imager.

Some things never change

| | Comments (0)
Politicians will always tend towards large scale monolithic answers which are almost always the wrong answer and involve selling the family silver in one shape or another. Take the current answer to the current housing shortage in the South East, which is, build more house in the South East. Yet catch a train from London to Edinburgh and you'll pass by towns like Doncaster where there are empty houses strewn about the place. We have the housing stock; just that we have an infrastructure geared towards draining all the working age young adults to the South East to spend their useful days working in the Hell that is London. We don't have a housing shortage nationwide.

The smart answer would be to move the jobs for which the people are sucked into London to the Doncasters and Burys of this country. There are 200,000 civil servants in London (each generating  approximately 3 other jobs, making 800,000 jobs, representing 3 million people inc. the families.) Move entire ministries - including their mandarins and ministers - out of London to cheaper areas of the country with spare capacity. That frees up real estate in London and its satellites, regenerates depressed areas, reduces running costs (cheaper buildings, no more London weighting allowance) and makes national government national, not London-centric, and you preserve the green belt, the fens, Wolds, Downs and Chiltern hills from myriad new Cambournes and Peterboroughs.

About this Archive

This page is an archive of entries from September 2007 listed from newest to oldest.

August 2007 is the previous archive.

October 2007 is the next archive.

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

Powered by Movable Type 4.1