Saturday 17 July 2021

Moving Home

Just a quick post to say that I'm moving this blog to a Github hosted site at: https://www.dancorder.com/blog

See you there :)

Friday 4 July 2014

Backing up archives - Archiverify

I take quite a few digital photos which I need to back-up. Until recently I did this simply by copying my original photos folder onto one of two portable hard drives which I then stored offsite.

This is a simple system and was working pretty well except for one flaw that I hadn't considered. What happens if my master copy of a file gets corrupted and I don't notice? After a little while the corrupted copy will be in both my back-ups and I won't be able to retrieve a good copy from anywhere. I thought that the chances of this were occurring were tiny, unfortunately I was wrong (or unlucky), and I now have a number of corrupted files in my master copy, some of which have also made it into my backups*.

So, how do I stop this happening again? Also how do I work out which files are corrupted but recoverable from backup? To address these issues I've written a small program called Archiverify that can compare the files in two directory trees against each other and against previously generated hashes (if you don't know what hashes are, think of them as fingerprints). This is allowing me to find files that are different between my back-up and master copy so that I can check them and remove the corrupted version.

Once I have my back-ups back in order it will also allow me to run a single command against a back-up drive that will:

  • Check that all images in the backup and master folders match each other and their fingerprints. This means that all of my images are read from disc every time I do a back-up and corrupt files will be found quickly.
  • Offer to correct images that have been corrupted by copying over the good version from the other directory
  • Copy and fingerprint any new images.

Hopefully, having three copies at any one time will make the chances of them all getting corrupted/lost at the same time very small.

There are a couple of other features such as the ability to just run against a single directory tree. This can be used to generate hashes or to compare files against previously generated hashes, but doesn't allow you to repair corrupted files.

Archiverify should be useful for any files that you want to back-up that don't change. In my case that means:

  • Original photo files
  • Installers for various programs that I use
  • Game mods that I want to keep a copy of
  • Anything else so old that I'm probably never going to change it again

If Archiverify sounds useful to you, then you are in luck. You can download and use it for free from https://github.com/DanCorder/Archiverify/releases/. To run it you will need to have Java installed and then use the command "java -jar <path to jar file>" to see the options that are currently available. The most common usage is "java -jar <path to jar file> <first path to compare> <second path to compare>".

Archiverify is released under the GPLv3 open source licence and you can view (and fork) the source on Github at https://github.com/DanCorder/Archiverify.

I have written and tested the app on Windows, but I have tried to ensure that it will also work on Mac and Linux. If anyone tries it on those systems please let me know how it goes.

* Those of you thinking "that would never happen to me, my backups are on CD/DVD/Blu-Ray", you may be right. If you're using the more expensive discs designed to last for many years, and you're checking all of your back-up discs regularly then you're probably fine, but I don't envy you all the disc swapping, and the task of changing media when your current media finally becomes obsolete. If you're not doing all of the above then I'd suggest that your back-up strategy is probably just flawed in a different way to how mine was.
Backing up to Amazon S3 (directly or through another service) looks pretty safe as they claim to generate hashes and regularly check them against your data. However you do then have ongoing costs and potentially long upload times.

Sunday 11 November 2012

Cycle commuter clothing

I do actually own a pair of padded lycra cycling shorts, and for long distance commuting I'd recommend some "proper" cycling clothing and getting changed at work/home. At the moment though, as I currently only cycle a mile or two at a time to and from railways stations I just wear my normal clothes. However, as I need to cycle every day, I do need to be able to cope with the British weather.

This basically means that I need to have a waterproof top, waterproof trousers, headgear, gloves, and some way of keeping my trousers away from the chain on my bike (I tend to wear waterproof walking shoes so those are already fine).

I currently have an Altura Pocket Rocket jacket in yellow as my top. This jacket packs down to a very small size and has done a good job of keeping me dry. But I've found that it hasn't coped well with being taken on and off 4 times a day for a year. The inner membrane is coming away at the cuffs and under the arms. For occasional emergency use it's probably still a good choice, but this year I've asked Santa for what looks to be the more hardy Night Vision jacket, which has the added benefit of being available in orange. As I plan to wear my jacket any time I cycle, the ability to pack it down to a small size is no longer such a consideration. I'll report back if the Night Vision doesn't stand up to daily use.

For my legs I've been using a proper pair of waterproof Lowe Alpine hiking trousers. These have worked fine but they are fairly bulky and I've actually used them surprisingly rarely. So for trousers I'm going in the opposite direction with a pair of smaller, flimsier, and cheaper Regatta over-trousers. So far I've used them a couple of times and they have worked nicely and they take up far less space in my bag most of the time - they pack down to about the size of a can of soft drink and come with a bag to keep them that size.

When I started commuting I would tuck my trousers into my socks. This works ok as long as:
  1. The sock elastic holds up
  2. It's not raining hard. If it rains my sock gets wet and the water runs down into my shoe.
So I decided to get some trouser clips. I started with the traditional metal variety, but I found that they were either so tight that they were painful, or so loose that they slid down my trousers around my ankle - and in one case then fell off onto the road and got lost. There may well be some trick to the metal clips that I haven't discovered, after all they have been in use for years, but I just couldn't get on with them. Fortunately since then I've tried some fabric and velcro bands that work much better, and seem more reflective too. Looking at them I don't think that they'll last forever, but £7 every year or two isn't going to break the bank.

On my head I always wear a thin headband under my helmet to keep my ears protected from the wind, and when it gets really cold I have a snood to keep my neck and face warm too. For gloves I wear a pair of normal gore windstopper gloves which do a good job of keeping my hands warm and will also provide some abrasion protection if I ever end up sliding along the road. These bits are all pretty small so I have no trouble keeping them in my bag (actually in one of the side pockets for easy access) all the time.

Monday 27 August 2012

More Stickers and paint


When I first posted about adding some stickers to protect my frame from rubbing a couple of people helpfully posted comments about clear stickers.

During the process of changing my handlebars the places where the cables rubbed on the frame changed so I took another look at the clear stickers and decided to give them a go as I thought they would look better than the checkerboard pattern on my previous stickers.

The clear stickers are a bit more expensive than the others but you do seem to get a lot of them, or rather you get some fairly large bits that can be cut up into a lot of smaller bits. I went for a set meant to cover large parts of a full size mountain bike and I hardly made a dent in it.


After a while most of the clear stickers are still in very good condition. Below you can see the front fork. The lighter patch is the repainted area underneath the sticker. Note that normally the sticker is much less visible than this, here it was photographed in strong side sunlight.


The area where the front fork hooks onto the rear triangle when folding the bike seems to be an area of particularly strong rubbing. When I checked there the double layer of clear sticker I had put there had been completely rubbed through not just the stickers but the paint too.


So here I've decided to keep using the checkerboard stickers as they are much thicker and also seem to be tougher; so far it's holding up well.


Whilst I was checking the frame over I noticed quite a few more chips in the paintwork, especially on the side and top of one of the rear triangle tubes which I'm quite surprised about as I have no idea how they would have got there:


I also found another area of cable wear:


I guess the moral of this is that I'm going to have to check the frame over every now and again for chips and cable wear and keep some stickers and paint on hand.

Thursday 2 August 2012

Ouch


Having cycled at least part of the way to work on and off for the last 10 years I've been lucky not to have had any trouble with cars aside from a couple of idiots that thought it was fun to shout as they went past. However, yesterday I was actually hit by a car for the first time. Fortunately both myself and my bike somehow came out of things unscathed. This is a somewhat self-indulgent post, but I feel like I need to write this down even though the only lasting effect was a bruised buttock :).

On my route home there is a 3 exit roundabout at the top of a hill. I was turning right when I noticed a blue BMW coming towards the roundabout in the lane to turn left - so he was going to follow me off my exit. There was a white car in the other lane that had stopped and was waiting for me to trundle past (I'm pretty tired by the time I get to the top of the hill). As the BMW approached my thought process was something like:

  • "He's going a bit fast, typical aggressive BMW driver I guess, he'll brake hard at the roundabout"
  • "Actually he's going to have trouble stopping at the line, I'll leave him a bit of extra space just in case"
  • "He's is going to stop right?"
  • "Oh dear (actually something a bit stronger than that), he's going to hit me"
  • "I wonder how much this is going to hurt"

At this point I think I turned even further away from the car, but at the speed I was going I don't think it made much difference (the earlier turn to give him space definitely helped though). Fortunately it was a glancing blow as he was turning left and I think he hit the bike first, before my bum bounced off the right hand side of his bonnet/wing. I don't remember the time I was in the air, the next thing I remember is seeing my bike land further from the car than I did and standing in the road shouting at the driver of the car (I must have turned around in between but don't remember it).

The bike somehow went out cleanly from underneath me even with the PowerGrips on my pedals, I guess the low frame of a Brompton helped here, and I managed to stay on my feet after bouncing off the car, otherwise things would have been much more unpleasant.

To his credit the driver did stop, helped me check over my bike and put the chain back on (he'll need to clean his stearing wheel after driving home with bike chain grease on his hands!). Somehow the bike seems to have escaped totally unharmed save for the chain coming off, some bits of road on the ends of the rear axle and a small slight scuff to one side of my t-bag. Given that both ends of the rear axle look to have scraped up a bit of road the best I can come up with is that the bike initially went down on its left and skidded away briefly on its tyres and rear axle bolt before flipping over and landing on its right (which fits with my general impression of the bike bouncing as it went away from me).

The driver said that he simply hadn't seen me and, as he was heading directly into a setting sun (and very few people try to deliberately hit cyclists), I believe him. He was genuinely shocked at what he'd done and hopefully will be a bit more careful in the future - the white car stopping in the other lane ought to have been a big clue even if he hadn't seen me.

As far as I'm concerned I've learnt four things:

  • If a car looks like it hasn't seen you, even in broad daylight with an orange bike, then there is a good chance that it really hasn't.
  • I should consider wearing my day-glo yellow cycling jacket even when it's not cold.
  • Bromptons are tougher than they look.
  • I should have got his name, address, and/or number plate (and ideally that of one of the witnesses). A camera phone would work well here. Even though I think my initial assessment of everything being fine was correct, I was slightly in shock and could easily have missed something. Without these details I'd have no way of trying to get any help paying for any damage I discovered later on.

Sunday 1 July 2012

More Handlebars

A while ago I changed my handlebars with some success, but I wanted to see if I could do better. The main issue with the new handlebars was that they were a bit too low which made the riding position less than ideal.

So I looked around until I found some mountain bike handlebars with 65mm of rise (compared to 30mm on the other set) that were still 25.4mm wide at the clamping point. A handy hint if you're looking for bars like this is that they are often called jump bars (I believe because they flex a bit on landing). Anyway the ones I went with are the "Full Bore" model made by a company called Funn and came from Chain Reaction Cycles.

Unlike the previous bars, the Funn ones widen out well before the clamping point, in fact they are virtually 25.4mm in diameter even at the curves. This makes them very difficult to get through the clamp. Even after spreading out the clamp a bit with a screwdriver wrapped in a cloth I still managed to scratch a fair bit of paint off the handlebars. Fortunately some Brompton black gloss paint tidied it up fairly well.


The Funn bars are also even wider than the XLC ones so I decided to cut them down a bit. I did it a little at a time an eventually took off about 5cm from each end. Note that this was the most I could take off and still fit my brake levers and grips on, and that my grips were already cut down a bit from when they were on the original Brompton bars. So if you have a larger hands you'll probably want to take a bit less off.


I also cut down my brake and hub gear cables by about 5cm to get them to sit a bit better in their new positions. In truth they could do with being cut down a little more, but they're OK as they are and I haven't had the time or motivation to tidy them up any further.


With these adjustments made the Funn bars are a bit more comfortable than the XLC bars, and I think comfortable enough to live with - I've been using them for about 6 months now. I haven't noticed my knees hitting my stomach since changing over either. The other improvement is in the clearance of the brake levers and cables over the front luggage which is now enough to not worry me.


The extra rise in the bars does make them a tiny bit more flexible, but not enough to be annoying (unlike the original un-braced Brompton bars)

Like the XLC bars I can have the bar ends set up in a comfortable position without interfering with the fold.


Overall I'm happy with this set up and will stick with it for the forseeable future, however I have to wonder if I'd have been better off just getting an S-type bike and the smaller luggage to begin with. The larger T-bag is nice to have and the extra capacity has been useful at times, but most of the time I'm sure I could have made do with the smaller S bag. Mind you, if I'd done that I wouldn't have had half as much to write about!

Saturday 14 April 2012

Kudos to Apple

I have a second hand 13" white Macbook. Like most Macbooks of that vintage it has developed cracks in the palm rest where the ridges in the lid push on it when it's closed. I recently found out that Apple in the US are still fixing this problem for free, I guess because it's seen as a design defect.



So I thought I'd call up Apple here in the UK and see what their policy is. It turns out that as long as your Macbook is less than 5 years old they will fix it for free - even a second hand one like mine!

I didn't know when my laptop was bought and it turned out that the original owner hadn't registered it when they bought it. However the AppleCare guy was able to determine that it must have been bought after November 2007 (I guess from the model number) so it was still within the 5 year window. After checking with his supervisor he told me that it would be fixed free of charge, gave me a case number, and told me that I'd need to make an appointment in an Apple store to have it done (actually he offered to make the appointment for me, but I needed some time to work out which store would be most convenient so I did it).

They do also recommend that you back up your computer, presumably to cover them in case they accidentally break something.

Making an appointment at an Apple store is handled on their website and is a pretty nice experience, you pick from a list of available dates and times and leave a message explaining the problem.

When I got to the store today it seemed that they hadn't actually read the message much in advance as the person helping me told me they'd have to check that they had the parts in stock. Fortunately they did and I was asked to come back in about 90 minutes.

I had read that the palm rest, keyboard, and trackpad are all one unit so I was hoping for, but not expecting, a new keyboard and trackpad. As it turns out, I not only got a new keyboard and trackpad, they also replaced the bezel around the screen, I'm not sure why. Perhaps the new one is less likely to break the new palm rest, but it looks the same to me, only much cleaner - the original looked like this:


So credit where it's due, I'm very impressed with the way Apple have stood behind their product here, and as a result I'm happily typing this on a brand new keyboard.