Archive for January, 2007

All shiny and new – but broken

Friday, January 26th, 2007

It was time to order a new bike! I went to a few bike shops in Coventry, and even spent an hour in Halfords inspecting their gear. The problem was I couldn’t make my mind up between buying a decent bike I was going to look after, or buying another dirt cheap one that would hate me for abusing it.

I looked around online, and whittled it down to two options: A nice looking sporty Claud Butler Trekker or a slightly more hard-wearing Dawes hybrid. The Claud Butler certainly looked the part and the Dawes certainly didn’t. In fact, it would look more at home with a grandad. There was very little price difference, and so that was no discriminator.

Claud Butler

Dawes

After much deliberating, I decided to go for the more hard wearing one, bearing in mind the abuse that I tend to give my bikes, and it would stand up to towing 40kg of shopping too.

It arrived a few days later a few minutes before a lecture, and I manged to put it all together in super-quick time. However, when I came to adjust the rear brakes, I noticed that the back wheel was not true. There was about 3mm variance around the rim which meant that the brakes could not really be used.

I decided that as I had spent more than I really wanted, it should be right. I decided I would be better off not using the bike in case they wanted it back or were funny about sorting the wheel out.

I sent the guys a couple of emails, and waited nearly a week without hearing anything. In fact, I have still not heard anything! I rang them up, and spent 10 minutes in a call queue: “Your call is important to us” AKA “We are cutting costs by not having any service staff and really don’t care about after-sales service”.

Eventually I did get through to a very helpful chap, who suggested I take it to a local bike shop to get the wheel trued, send them the receipt and they would refund me upto £10 for getting it sorted.

The next morning I took it to my local bike shop (Jardine Cycles), who quoted me £12-15 for sorting it, telling me I would have to bring it back the following week. On the way out I mentioned that it was a new bike, and they turned around and refused to have anything to do with it – saying they couldn’t work on it. I should have asked them why, as even now I have no idea why not.

I eventually got round to taking it to another bike shop in coventry, where the most helpful guys sorted it out later that afternoon for £7.50. Qudos to Albany Cycles.

I have emailed the receipt to the firm I purchased the bike off, and surprise surprise I have not heard anything. I must ring them up sometime soon.

Freewheeling nowhere – my bike breaks again

Friday, January 12th, 2007

At the beginning of second year, I bought a cheap new bike off ebay. As well as being brand new and dirt cheap, it was also rubbish.

Me on my black bikeFor a term it got be to uni and back, and I even bought a trailer for it. It soon began to let me down after I snapped a spoke cycling down a set of steps on campus and I had to replace the spoke and retune my rear wheel.

Coming back after Christmas, I was cycling to uni and the freewheel went. John had to push me the rest of the way. I later walked back home with my bike, and took the freewheel apart. The small metal parts which engages the teeth had disintegrated, and so were pretty useless.

I attempted to put it back together, and it lasted a few more cycling minutes before failing again, and again. The only real solution was to get a new freewheel, but the bike wasn’t worth it.

Time to go shopping.

Getting rid of U3 malware on my memory stick

Wednesday, January 10th, 2007

Photo of my memory stickEvery time I put my Sandisk Titanium cruzer in a Windows computer, I have to wait about 30 seconds for some U3 software to load. Most tied-down PC’s like the ones at uni do not allow this program to run correctly and so it is completely useless.

If there was a way to turn this off or easily uninstall it, I wouldn’t mind, but there isn’t. As far as I am concerned this U3 software is malware. It installs itself without my consent, and there is no designated way to remove or deactivate it.
The problem stems from the flash drive setting itself up as both a removable flash drive, and an extra fake CD drive. This fake read-only CD drive is a small partition on the memory stick, and contains the autorun files for the U3 system.

U3 Software logoAfter reading a number of forums on the net, I found an exe that reformats the whole drive, steamrollering the CD partition. After downloading and running it, I now have a 6MB larger stick and a memory stick that works – All I wanted in the first place.

Those extra 6MB (and another 300 MB) have been nicely filled by Portable Apps – A clever set of programs that allows me to run Firefox, OpenOffice, Thunderbird etc straight from my memory stick on most windows computers. It even works on the uni computers, despite the removable drive not being fully mounted due to a lack of administrator privileges.

Could there ever be enough hours in the day?

Monday, January 8th, 2007

I was walking between lectures today, and thinking about all the stuff I need to do. My to-do list being longer that I care to mention, the conclusion was that I need more time, but how much more?

Picture of an anthropomorphic clock A 30 hour day might be good, but even then I would probably sleep more, and get involved in more societies, work more, play more, and just generally do more stuff. Perhaps 36 hour days would be in order. I like the number 36, it has lots of factors.

Perhaps I should just manage my time more effectively, but even then I would probably find more stuff to do.

A friend of mine that my remain nameless suggests days of 8 hours – so he can sleep all the time. I’m not sure that would solve any problems, except the one of world peace. A sleeping world surely be a peaceful world, except for the insomniacs.

I throw the question out: Could there ever be enough hours in the day?

phpSANE – a total rewrite

Friday, January 5th, 2007

I made a number of improvements to phpSANE a few years ago, but forgot to submit them back to the wider community. I was told by a few users that the new preview function was hard to use, so decided to improve it and share the code.

First of though, what is phpSANE? It is a php front end for the SANE (Scanner Access Now Easy), which is a scanner/image protocol a bit like TWAIN, but for Linux. Its massive advantage is it allows a scanner to be used from any networked computer via a web browser.

After looking at the existing code, I decided that it would be quicker to start from scratch, creating an interface that allowed the following:

  • Ability to switch between connected scanners
  • Settings based on the scanner selected
  • Scalable previews
  • Drag and moveable preview selection
  • Help fields for each setting
  • History of images scanned

After plugging in a new scanner and installing sane

$sudo apt-get install sane

apache2 and php5 were already installed, and so there was no need to install them. If you were to install them, it would be something like this:

$sudo apt-get install php5 php5-gd apache2 apache2-common

The SANE program creates .pnm files (a bit like like .tiff’s) and so there is also a small utility called netpbm which will contains the command pnmtojpeg which is needed.

$sudo apt-get install netpbm

Next job to is to test it all works: This should warm up the scanner, and create the image file /tmp/image.pnm

$scanimage > /tmp/image.pnm

Unless logged in as root, this will return an error as only root (or sudo) has the permission to run scanimage. The apache user, (e.g. www-data, apache, nobody) will need permission to run scanimage.

Create a group called saneusers, and add the apache user to the group.

$sudo visudo

At the end of the file, add this line:

%saneusers ALL=NOPASSWD:/usr/bin/scanimage

Running the next command should now work without any errors:

$scanimage > /tmp/image.pnm

Now for the programming to start.