Post Christmas Dinner (by )

Today we went to my brother David and his girlfriend Michelles house for a post christmas/new year lunch. There was lots of chopped peppers which Jean woofed down, homous and pizza!!! We were in hevean.

Then there were gifts, we handed over Jeans tea towel with her drawing on plus some bits I'd made. They did something similar and we got an old copy of one of their films as it was in a box set one of them had got for Christmas - this seems a sensible way of doing things to me. They've been having a few issues due to the credit crunch in that David lost his nice manager job just after they had sighned on the morgage. He is now temping at just about anything.

We had a lovely time, mum and dad had got them stuff for the new house which included a gravey boat - most of the pictures I took seem to contain it or David playing with it :/ Oh and yay!!!! I have a camera again!!!! Mum and Dad bought it as a joint birthday and christmas presant and it is twice the resolution of the old one though I am currently running on its internal memory which is a whole 10 pictures :/

But yay!!!! and here are the picks including lots of cute Jean ones and yes she's in her chinese outfit again. Unfortunatly last night we watched KungFu Panda so she now keeps hitting people 🙁

Michelle Michelle and her camera let me see the camera mummy! Monkey David distracted by the gravy boat Jean and David Monkey david playing the gravy boat Jean, Monkey David and the gravey boat Jean and her money box Alaric and Dad

I had to take arty shots I just couldn't resist - sorry!

pretty purple tree star

Trojan

Ivan and Sam’s New Year Party (by )

For this New Year we headed down to my cousins house for a party, as always we got lost on the very last bit of the journey and Ivan had to come out and find us - I was navigating but the map didn't go down to a fine enough detial ok!

There was lots of food and lots of kids! Jean had a great time as there was basically a room full of children throwing balls and things at each other and there was a mirade of pepper pig videos and the like. Ivan and Sam also have a fish tank 🙂 Jean loves fish we take to the garden centres locally just to look at 'Nemo's' (Becca and Olly have a lot to answer for!).

At mid night there was the the popping of party poppers and as always I ended up with a wig of the paper strings - this time Jean put it on my head 🙂 We all had an attempt at Auld Langs ey and by the end Jean was the only on of the 'babies' still running about full of energy but then she had had a nice long sleep all the way from Gloucestershire to Essex!

Jean was shy at first but cheered up when we changed her into her satin pink party dress - all the other kiddies were dressed up and she felt abit out of place I think - she had her sparkly silver shoes and all would have been well if she hadn't tried to walk away from me whilst I was trying to tie the bow around the waste - I stepped after her and trod on the belt and she kept going and there was an ominous ripping noise and so she ended up with her belt ribbon tied as a braclet around her wrist instead.

'Mummy you broke my dress!'

'Yes well if you won't keep still when I say things like that will happen.'

It was a good party and we even got warm mugs of tea as we stayed to help tidy up - they offered for us to stay the night but Al wanted to get back to Highgate.

(hopefully at some point I'll get the photos on here:/)

Happy New Year 2009 (by )

This year sees lots of exciting things - its the International Year of Astronomy and so I have set up a specific Astronomy blog - the spellings all need sorting and alot of the stuff on there is from things I've written up on here.

I know its another blog but other wise I have too much to go on here and its nice to have a specific theme and things. Plus I now have a specific career goal which is to be a popular science writer - I want to bring science to the front, so kids find it interesting, explain it to the lay person etc...

I want to rekindle the flame that the victorians lit - a flame that is in the danger of blowing out leaving our culture with just recipies for current technology but no inovation or advancement.

I wanted to do alot of Astronomy stuff last year but with everything that happened it just got swept aside 🙁

Other goals for this year are to carry on with the Prince's Trust and MRes both of which are giving me valuable skills. Get Web-Empire fully up and running but more on that later 🙂 Enter the Young Science Writer of the Year compatition and just generally get our lives back on track.

Jeany will also be starting school in September! She'll be the youngest in her year - I feel this will be a good thing.

I hope you all have good New Years and lets hope this one will be better than the last!

Backup system progress (by )

I mentioned an intent to build a backup system this Christmas. Well, I've not had two days to work on it yet; I've just had an hour and a half one evening, in which I've written the local-filesystem backend...

But last night I had a dream about it. In particular, I dreampt of visiting an old friend I've neglected to keep in touch with lately; and at her house she had a rather snazzy little mini-laptop, like an EeePC or something, which had an eSATA connector into which she plugged some humungous (in terms of gibibytes; it was the size of a double CD case, physically) external hard disk upon which she had a filesystem that seemed to work very much like Fossil/Venti, the original inspiration for my backup system - or perhaps like a giant personal Git repository.

In particular, one feature that cropped up in the dream was that the filesystem had a magic file on it which was an RSS feed of recent changes to files.

Which got me thinking about features for version 2 of my backup system (if I get to finish version 1, that is!). My focus is on offline use, for batched backups, but the filesystem in my dream was being used online.

For a start, we could have a log of changes to tags, as in my system tags are the "roots" of the archive system. The creation of new tags, the deletion of tags, or the updating of a tag to point to a new snapshot would all be logged. This could then be used to create the RSS feed.

Secondly, it shouldn't be too hard to write a FUSE interface to the thing for read-only access, presenting a root directory containing an RSS file generated from the log, along with a directory for each tag, which in turn contains a current subdirectory containing the current value of the tag as well as dated subdirectories containing all the past contents of the tag, in ISO date format so they sort correctly. And perhaps an RSS file just listing the history of that tag.

But then the next cool thing would be to allow write access, by using a local disk directory as a staging area, so the current subdirectory can be written to (with the changes being spooled to the local disk). Then when a commit command is given, those changes are merged into current. Which would require a new underlying operation to merge changes in, rather than taking a new snapshot; the difference being that any files or directories missing in the directory tree being snapshotted are 'inherited' from a previous snapshot already in the system, with some mechanism to reflect deletions.

Anyway, unrelated to the dream, it also occurred to me that it'll be neat to support replicated archives; my implementation of the backend architecture will make it easy to take a set of backend instances and merge them into one, with every write going to all of them and reads serviced from the first one that succeeds. It'll also be easy to support staged archives, where a number of read-only backends are checked for existing blocks, but all new blocks go to a nominated writable backend, with another backend adapter. That will allow for generational backup systems, where a local disk is filled up with backups until it reaches a size limit, whereupon its contents are shipped off to a DVD writer (keeping a local cache of what blocks where on there, so the DVD need not be put in unless the contents of blocks are actually needed).

But, all idle speculation for now. I still need another day and three quarters to implement the core of the thing...

Design patterns (by )

I'd thought I'd had this little rant before, but as I went to find the post I'd had it in to link to it from a big ranty post I'm working on, I couldn't find it.

So here it is.

My opinion of design patterns.

Design patterns are common structures that appear in computer programs, but that can't themselves be abstracted into a reusable component.

That's fair enough. I have the "gang of four" book of design patterns, that started the craze, and I think they're all good design patterns in mainstream OO languages; things that can't be actually encapsulated as a class or whatever, but that keep cropping up.

However, the problem is that the patterns community has somehow ended up with some dogmatic folks in it. Who take phrases such as "Design patterns are common structures that appear in computer programs, but that can't themselves be abstracted into a reusable component" - and then attack anybody who claims to have encapsulated a design pattern into a reusable component.

Because design patterns are really only valid in relation to a set of languages. For example, in assembly language (or even traditional BASIC with GOSUB), procedure calls are a design pattern. There is no language construct for a procedure; instead, you have a GOSUB or CALL to a given address, that explicitly saves the calling location somewhere and then jumps, and a RETURN to go back to that saved location. The GOSUB...RETURN pairing is put in there by the programmer; it's a design pattern.

But then higher-level languages have explicit procedure abstractions, and all the fun they entail.

Even object orientation is a design pattern in languages like C. "Put function pointers in a struct, and call them with the struct pointer passed as the first argument". Or including a pointer to a struct of function pointers in every data struct (and call it a virtual method table). But go to Java and that's an explicit language abstraction facility.

The gang-of-four book is taken as the authoritative book of common design patterns (although it is, in my opinion, a book of design patterns for mainstream OO languages). And design patterns are things that cannot be expressed as native abstractions in code. THEREFORE, fools think, it's impossible to write a design pattern in code. And anybody who claims to have done so needs shouting at.

Sadly, as demonstrated in Peter Norvig's presentation on design patterns in dynamic languages, more advanced languages can express abstractions that others can't, and there are plenty of more advanced languages than C++ and Java.

In fact, I think that the appearance of design patterns in a language is probably a hint that the language needs to be more powerful - and suggests how to make it so. What sort of abstraction would make it possible to encode your design patterns?

And so, as I read "Modern C++ Design" by Andrei Alexandrescu (a book on doing good things with C++ templates), I come across the following phrase:

Eventually, Andrei turned his attention to the development of template-based implementations of popular language idioms and design patterns, especially the GoF [gang of four] patterns. This led to a brief skirmish within the Patterns community, because one of their fundamental tenets is that patterns cannot be represented in code. Once it became clear that Andrei was automating the generation of pattern implementations rather than trying to encode patterns themselves, the objection was removed...

Bleargh. It sucks when people get all religious about the interpretation of a given piece of "scripture". Even when people manage to work around it by using illogical arguments ("No, no, it's not a representation of the pattern in code, it's a bit of code that automates the creation of implementations of the pattern..."). Sadly, in other realms, this kind of thing can lead to people being burnt at the stake.

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales