Digital UK Design Blog

I had an issue today when installing pytrainer. It wanted to install some extra python packages but it couldn’t.

The reason was that I had python2.5 v2.5.2-2ubuntu5 installed but the extra packages depended on an older version – 2.5.2-2ubuntu4.1.

I don’t know how I had ended up such a knot, but the ubuntu5 packages I had seemed like they had been obsoleted from hardy-proposed which is clearly one of my sources lists. Ho hum.

Downgrading through the GUI wasn’t intuitive, I tried to ‘force version’ but that seemed to have no effect.

The answer lies in the command line, and is explained by this forum post.

Aptitude lets you specify a version parameter over the command line, so I used sudo aptitude install python2.5=2.5.2-2ubuntu4.1 to install the older version. This then resolved what other packages needed downgrading, gave me a summary, and did the business.

I run Windows Vista on dual boot. My inclination is to get rid of it altogether, but I paid for a license thanks to the Microsoft Tax when I bought the machine and sometimes vendors (Garmin for example) only support Windows.

I gave Windows Vista 12GB with virtually no applications and it’s used it all up. It refuses to install Vista SP1 because there isn’t enough room.

Rubbish.

Enter GParted – the Gnome Partition Editor. It is included with the Ubuntu install CD which doubles as a live CD (just select the ‘try Ubuntu without changing my system’ option when you boot the CD). Boot from the CD, run GParted, drag your partitions around and let it do its thing. A few hours of disk crunching later you have successfully resized your ext3 and NTFS partitions.

Impressive stuff this free and open source software.

Incidentally, I should say that I’m a bit grumpy that Vista needs more than 12GB just to exist and with virtually no software installed. That really sucks.

So, the British government baled out Northern Rock. That seemed bad enough, but at least it was more of a cheap loan than a bottomless pit.

This week HBOS was incomprehensibly brought to its knees by the failure of Lehman Brothers. The story goes that HBOS loaned Lehman Brothers a wodge of cash; Lehman failed; HBOS realised it wouldn’t get its money back; HBOS had its credit rating dropped; creditors started pulling money out; depositors started getting shaky feet; confidence in the bank was falling – banks live on confidence.

Whilst all this was going on the whole hype and hysteria was magnified ten fold by the stock markets – a load of big players started short selling HBOS shares (i.e. betting the share price would fall) to make money. They benefit if confidence is lost in the bank because that would bring the price down. Now, they wouldn’t have spread nasty rumours would they? Surely not?

Wind forward to today and the USA’s government is baling out all of its financial institutions who are exposed to bad debt, but they’re going a step further – they’re going to nationalise that debt and take it away from the financial institutions.

What? Run that by me again?

When I last checked the USA was purported to be a shining example of how capitalism should work. You don’t get the same social safeguards over there that we enjoy in the UK – if you’re unemployed then you’re right on the bread line, if you get ill then you either have insurance, you pay for it (now or for the rest of your life), or you die (not quite, but you get the idea).

If you can’t pay your way in the USA then you’re on your own. Unless you’re a big financial institution it seems.

I thought that capitalism involved balancing potential profits with risk – you speculate to accumulate, but with it comes the risk that you might not accumulate. You cannot make money 100% of the time on 100% of your investments.

The whole argument behind the bale out is that if the financial institutions collapse then so does the economy and everybody suffers. This is an argument that I buy. However if it was so important for these institutions to succeed then where were the safeguards to ensure that they didn’t lend irresponsibly in the first place?

And more importantly, now that the horse as bolted, where are the strings with this rescue package to ensure that this never happens again? Ever? I’m not seeing any.

From around the year 2000 onwards I can recall having loads of conversations with people down the pub about the credit bubble. Everyone was buying things on credit, house prices were rising sharply – everything seemed too good to be true and when you’re borrowing money you’re going to have to pay it back one day, you can’t borrow forever. If we were talking about it down the pub then surely the government and financial institutions were too? Why weren’t they making sure it was all sustainable instead of basking in the glory of having sailed a good ship?

Also weren’t they squirreling money away because times were good in readiness for a downturn? No, of course they weren’t – shareholder dividends were high, Britain was spending tax revenues like there was no tomorrow with our public national debt still rising.

In conclusion, we seem to have created a monster – financial institutions which know that they can do whatever they want to maximise profits to their all important shareholders and security that when they get it horribly wrong by over-reaching then the people at the bottom will be there to pay them out. If I am right then that is unjust, immoral and wrong.

The little guy is being screwed over and when he wakes up to that fact he is going to be really pissed off about it.

Typical, after my last post extolling the virtues of how easy it was to install a printer in Ubuntu I hit a problem today.

The symptoms are that you go to do a printer administration task, like add a printer, either through the gnome print manager or cups/cupsd web interface you get and a challenge box: “Password Required” “Password or someuser on localhost?”. You will try all manner of combinations but it keeps coming up.

Reinstalling cups doesn’t help, you seem to have the default /etc/cups/cupsd.conf.

It transpired that the critical lines are:

# Administrator user group...
SystemGroup lpadmin

Then the penny dropped – I wasn’t in the lpadmin group. I added myself and we all lived happily ever after.

I should say that this wasn’t on a recent install of Ubuntu – this machine has effectively had 3 upgrades since it was first installed, so that’s its get out of jail free card.

I need to do a bit more flag waving for Ubuntu Linux. I have said it before, and I will say it again:

Ditch Microsoft Windows.

Download Ubuntu for free, don’t pay the Microsoft tax.

Anyway, my most recent wonderfulism was when I was sharing printers. A few years ago I was using Fedora Linux on a machine upstairs. Vicky was using Windows XP downstairs and wanted to use the printer that was connected upstairs.

Frankly this was always a pain in the arse.

It didn’t “Just Work” â„¢. Windows hated the printer. I had to edit config files by hand on the Linux machine.

A few weeks ago I re-installed the operating system, overwriting it with Ubuntu because I’m desperately trying to sell my old machine (shameless plug!).

I was dreading setting the printer sharing backup – but I needn’t have worried. About a dozen clicks later, on both Linux and Windows and lo’ it was all working.

If you want to share your printer with Windows, do this:

https://help.ubuntu.com/community/NetworkPrintingFromWinXP

I should say by the way that I’m not sure whether this is because Ubuntu is ace, or just because Linux has moved on somewhat in recent years. I suspect the latter, it would certainly be unwise to draw conclusions about Fedora based on this as it would not be a fair test!

I saw an interesting article today pointing out a couple of overlooked vulnerabilities with data truncation in MySQL. It’s more of a bug in due to how you handle the event in application than in the database, but it’s a vulnerability none the less.

MySQL won’t be the only affected RDBMS (I know, MySQL really is an RDBMS … just) – off the top of my head I guess that Microsoft SQL Server would have the same behaviour with ANSI_PADDING OFF, and with some versions of ADO I recall that these warnings don’t appear in say your ASP application.

It’s also a good reminder that out of the box the following query (note the trailing whitespace) will return ’1′ – which may be counter-intuitive if you don’t remember.

SELECT CASE WHEN 'B'
               = 'B ' THEN 1 ELSE 0 END;

I feel a bit dim for not having this drilled into my tiny mind already. Thankfully I validate data against column lengths by default… I prefer not to trim data on the way in as mangling user input in subtle ways like that can lead to irritating behaviour from the user’s point of view, and perhaps other bugs.

Eat more fish!

September 9, 2008 | News & Reviews | Stephen O'Neill | 1 Comment »

I was entertained on the way to work today. As I drove through Hull I saw “Colin’s fresh fish” van.

His strapline, emblazened across his van was:

“Eat more Fish”

I just thought that this was amusing, and honest. I think that more companies should use that line. “Eat more McDonald’s”, “Buy more Fords” – get straight to the point with no pretentious bullshit and overpaid celebrities.

Conservatives and Northerners

August 14, 2008 | News & Reviews | Stephen O'Neill | No Comments »

I like reading the Fifteen Minutes of Oompah Blog. Today’s entry deriding the Conservative Party think tank’s completely bonkers view of the North’s prospects is particularly good.

http://mantrafilledoompah.blogspot.com/2008/08/rivers-of-black-pudding.html

Wednesday’s now my favourite day

August 13, 2008 | News & Reviews | Stephen O'Neill | No Comments »
Withernsea

Withernsea

Wednesday is OpenStreetMap Mapnik render day.

Here’s what I was busy with this weekend mapping Withernsea. There’s more to do, and a few bits to correct, but the detail that you see on that link is all mine. Yay!

A very excited geek

August 9, 2008 | Geek Hobbies | Stephen O'Neill | No Comments »

Morning all, I’m very very excited, just had to write a quick post.

Today was my first attempt at gathering a serious amount of GPS trace data.

The cat woke me up at 05:20 which was what I had hoped. I got up, fed him, ate some bran flakes (rather than porridge as it’s faster to make – that is how excited I was!), and went out to the shed armed with my GPS tracer and digital camera.

I fitted the tracer to my bike, and off I went.

I explored about 75% of the roads in Withernsea which are accessible by road, taking photographs of appropriate street signs as I went.

Unfortunately the 16mb memory card with the kindly donated camera filled up and by coincidence the memory filled on my tracer too at the same time so I had to come home, but I have broken the back of it which I’m really pleased about. There is a memory card with the tracer but I’m still getting used it and for some reason it wasn’t recognising it.

Anyway, I’ve just uploaded my GPX trace from this morning.

I have also fired up JOSM and imported my trace, the existing mapping data and, much more excitingly my photographs – geotagged so that they overlay my map. The idea being that the timestamp on the photograph matches the timestamp on the GPX trace and it can overlay it. JOSM’s AgPifoJ import did this for me automagically – excellent!

Geotagged photographs in JOSM

Geotagged photographs in JOSM

The screenshot with this post shows JOSM. The white boxes on the trace are where I took photographs, you’ll see one highlighted in red – that’s the selected one and is showing up in the preview window.

So it all worked, I didn’t waste 3 hours of my life, and I can now add more data for Withernsea – yay!

I plan on doing a how-to at some point as there doesn’t seem to be a “beginners guide for the impatient and lazy” – for people like me. In the meantime get in touch if you want help.

And I should say a big thank you to Chris Hill. I contacted him through OSMs “mappers near you” feature (which you get if you signup for OSM)and he’s been very patient and helpful in helping me fix my early mistakes and get me going. He and his wife seem to have mapped a large part of Hull themselves and want to get East Yorkshire done – so hopefully I will be able to help them with that.

Page 2 of 612345...Last »

©2006 - 2009 The Floating Frog