Hydroponics fun

Hydroponics toy
Hydroponics toy

Just spent a few hours rescuing my hydroponics greenhouse. OK, so that’s a slight exaggeration, it’s probably more realistic to call it a hydroponics TOY. But it’s been sitting on my Kitchen windowsill for many months in desperate need of some attention – all the plants are long dead…

It was doing the job of growing a strowberry plant with only water very well, but then it caught a nasty infection – almost certainly from the mouldy leftovers next to it meant for the compost heap.

So my first job was to clean up the growing medium which no doubt had remanents of the attacking spores as well as all the dead plant material. I’m not sure what the growing medium is but it looks like small white pebbles, that absord water, a bit like packing paper but harder… anyway, I had to filter all the rubbish out, so I commandeered the kitchen for its utensils.

First a filtered out the large things with the collinder, then used the strainer to get out the tiny particles – I attempted to seperate again by shaking up the particles in a bottle and by floating in water, but neither gave satisfactory seperation, but that was ok as much of the filtering had been successful.

Then to wipe out any remaining infection I boiled up the growing material in some water (the smell wasn’t very nice, you might like to cover you mouth here), now it’s sitting on the side drying. I also washed the plastic parts thoroughly, and I think it’s no ready for another go.

Ad the fast show once said: This year I’ll be mostly growing tomatoes. I’ll let you know how it goes. I might also attempt some scientific tests on it. Check out amazon for your own: http://www.amazon.co.uk/ExpertShopper-Hydro-Greenhouse-2/dp/B000A6T52S

The Olympics

Just one of the venues at the Vancover Olympics
Just one of the venues at the Vancover Olympic

There is something rather special about the Olympics. There’s very few things I’d stop up until the early hours watching,but here I am watching at 3am, and keep on staying up till late.

First there’s the fact that it’s going on live, and you never quite know what’s going to happen, just in the last hour I sa several horrific looking toboggan crashes and some nasty falls in speed skating – everyone is OK though – and then there’s the cheering on of the national team, gold for the nation is something everyone can get behind, but then you also can’t help but support the participant who’s believed to have no chance but comes pushing up with a fierce determination or the person who’s on their last Olympics and just maybe win that that last medal. So many emotions from the winners and the losers, those who came so close but heartbreakingly missed their chance for Olympic glory.

Then there’s the history of the Olympics, it’s beginnings dating back around 3000 years to a time when nations again competed against each other instead of waring.

But the most important celebration should be just knowing that the world really can come together and take part in something entertaining, magnificent and peacefully.

I’m really enjoying these 2010 Winter Olympics, and looking forward to 2012 when Britain gets to hold the Summer equivalent – that’s going to be just great!

Go TeamGB!

My New Laptop

The Dell Inspiron 15 z Laptop
The Dell Inspiron 15 z Laptop

My new laptop has come. It’s a Dell Inspiron 15z and I splashed out for the Cherry Red version (which looks much more red than the photo gives credit). This is a quick blog about it, expect a more detailed one after more experiments over in my tech blog.

The “15” refers to the size of the screen, actualy 15.4 inch widescreen. It’s got a nice reflective surface on it, and looks to be very clear. The “z” part refers to the lightweight, small, and long battery life version of the inspiron. However, it still has 4 GB of Ram, 320 GB of hard drive and a fairly nice graphics card (512MB ATI Mobility Radeon HD4330). The main battery life saving is via the processors, two intel 1.3 GHz processors, about half the power of standard processors, but still very capable for all but the most intensive of jobs.

It’s not an incredibly light laptop like some much more expensive laptops are (this one was about £650), but I’d still call it an extremely portable laptop (if not quite ultra portable). Battery life seems to be around predicted values on dells website. I’ve been using this laptop for about 4 hours already, with wi-fi and dells power saving settings on, and I’ve still got over 2 hours left of power. With the wifi off, and screen at it’s lowest (it’s half way at mo) I’ve seen predicted times of over 7.5 hours.

All in all I’m very pleased with it. As a bonus I’m hoping to count some of my 10:10 commitments to my new laptop!

10:10 – The year of green change

10:10 campaign logo
10:10 campaign logo

The time for debate on climate change has passed, it’s real – now it’s time to do something about it. 2010 could go down in history as the year when we decide to combat this threat, that’s if the people at 10:10 UK get their way.

10:10 UK was set up late last year as a way for people (and businesses, schools, organisations) to state they’ll make a 10% cut in the carbon emissions in 2010. Anyone can join through a simple form. There’s no tracking of your savings so you’ll just have to be trusted (You’re only be cheating yourself… and the 7 billion others on Earth…)!

As of writing, there are 53’044 individuals signed up, which is a great number, but a really small percentage of the UK’s population – I’ve already signed up and hopefully encouraged others to join but they really need to reach more people.

Some of the things I’ve done or plan to do are:

  • Replace all my lights with energy saving ones.
  • Track my electricity usage minute by minute.
  • Look into the feasibility of insulating, double glazing and making other improvements to my four hundred year old rented house.
  • Drive my car less, use public transport and cycle more.

I’ll be following up on this from time to time through out the year.

If you live outside of the UK try this site instead: http://www.1010global.org/

A Happy New year to you all.

The Own Art scheme

turning

Here’s a really nice way to buy some prised pieces of art – be it anything from paintings to pottery.

It’s a scheme run by the Arts Council in England (And therefore only available in England – sorry world.) They provide you with an interest free loan from £100 to £2000 which you pay off in 10 monthly installments.

You can buy whatever you like, and it’s as simple as going to one of the many local arts galleries that are taking part. (There’s a searchable list of participants here).

Take a look at the arts councils website here: http://www.artscouncil.org.uk/ownart/

I just need to decide what to buy now…

Subversion – folders and projects

This post is about folder structures and project management in Subversion.. If you don’t already know what Subversion is check out the previous post: http://blog.akademy.co.uk-tips/2009/09/source-control-beginning-with-subversion/

Folder Structure

The folder structure you implement in your repository can have significant impacts on how well your project gets managed, now and in the future. With the right forethought you can implement things like:

  • release version tagging,
  • multiple simultaneous version releases
  • and have code, installers and build systems all in the same place.

Tags – release version tagging

Tagging is the term used to “mark” a certain version of your files as important in some way. Most often this will be to mark public releases of your code, this enables you to go back to that specific version even after other changes and version releases have taken place. In Subversion there is no specific tagging mechanism, instead you simply take a copy of the code as it is at the moment. Now this sounds like it would use a whole lot of memory space but you need to remember that Subversion only ever records the changes between files – a tag will not not have any changes in so is virtually copied for free.

To keep track of all your tags you’ll need somewhere to put them and in subversion this means a folder. So in the top level repository folder have a folder called “Tags”. Lets assume you have another folder called “Main” for now which contains your source, to create a tag you’d just copy it, so type something like:

  1. svn copy file://your-path/TestProj/Main file://your-path/TestProj/tags/release-1.0 --message "1.0"

Branches – multiple simultaneous version releases

To work on multiple versions you’ll need to once again copy the main source code. You might need to work on two different releases if you have two major changes to the code which you want to test separately, or you need to make bug fixes in an old release but don’t want to mix up the new code, or you just want to try an idea but don’t want to mess with the main source.

You’ll need to keep this code separate also so create another folder at the top level of your repository. We’ll call this one “Branches” as you are copying the main code to subsequently change it – it branches away from the main part. Now You’ll just need to copy the main code, so type:

  1. svn copy file://your-path/TestProj/Main file://your-path/TestProj/branches/newtest --message "fixing"

This command is near identical to the tag one. This is because all you are “really” doing is making a folder and copying some files to it.

Main (or Trunk) –  code, installers and building

When you read up on subversion you’ll come across the folder “Trunk”. Once again, this is subversion so it’s just a folder, and it’s where you main source is edited from. (It’s called “Trunk”, because it’s where the “Branches” come from!). The above paragraphs have called in “Main”.

I tend to split my main folder into several others to make the full building of a program easier. Typically this will be something like “Source”, “Installers” and “Builder” – “Source” holds things like c++ files, “Installer” will hold the files needed to create an installer, and “Builder” is the files needed to automatically build all the bits into some kind of release, such as a CD; (you might like to add “Content” or “Manuals” or something else to your own). This is very useful when you need to tag something as everything needed to rebuild a specific release will be copied into that tag.

Trunk, Branches, Tags or anything.

Obviously the folders you’ll need will depend on your own project. Don’t be afraid to experiment with your own names and structures – the folders are yours to play with!

A few caveats on changing from “Trunk”, “Branches” and “Tags”

  • Some client programs can automatically create tags and branches if you stick to these folder names.
  • Much of the documentation will make reference to these folder names.

Multiple projects

Up until now I have assumed a single Project in your repository but that’s not the only way to do it. There’s two main ways to store multiple projects in Subversion, each with positives and negatives.

  • Create multiple repositories, one for each project.
  • Create a single repository with a top level folder for each project.

Multiple repositories, single projects

This is the simplest to manage. Every new project his it’s own repository and is entirely separate from any others.

Positives:

  • You can reduce the impact from a single hardware failure as repositories can be kept on separate hard drives.
  • You can backup each project separately, depending on it’s value.
  • You can easily give user access to a single project
  • User subversion errors limited to a single project.

Negatives

  • Users will need to be created separately for each repository.
  • The merging of projects is very difficult.

Single repository, multiple projects

A single repository, with top level folders for each project. Each sub folder has the usual “Trunk”, “Tags” and “Branches” in.

Positives

  • A single list of users is all that is needed.
  • A single, simple, backup procedure.
  • Merging of several projects into one is very easy.

Negatives

  • Can mistakenly give access to a user for any project.
  • Single hardware failure can wipe out all projects at once. Single backups also at risk.
  • A subversion user error in one project can impact all other projects.

Conclusion

There is no right and wrong way to store your folders. It really depends on your use, for instance I use subversion to back up my fiction writing, and it contains no folders just a list of files.

There are some best practices you should consider though, decide how you’ll make taqgs or branches if you’ll need them, and if you are going to use multiple or single project repositories.

However, if you are looking for a quick set up, I’d recommend having a single repository for a project, then a sub folder structure of “Trunk”, “Branches” and “Tags”. In side that Trunk create a folder for each of the different parts you’ll need, although different parts can be added later.

That concludes this blog. A future blog will include subversion clients amongst other things.

South West US Road trip

Monument valley drive

Just back from my 18 day road trip around the south west of the US. A most enjoyable adventure.

We drove across six states in total: California, Arizona, New Mexico, Colorado, Utah and Nevada; on a 3000 mile circle (well oval) route which took in the Mohaje Desert, Route 66, Meteor Crater, Sunset Crater, the Grand Canyon, Antelope Canyon, Lake Mead, Mesa Verde, Canyonlands, Arches, Bryce Canyon, Zion, Las Vegas and Los Angeles.

There’s a small selection of images here, which were added on route. There’s many, many, more which haven’t yet been uploaded but that will no doubt be done soon. UPDATE: I’ve uploaded a lot more photos now – all geotagged… still loads left though!

PhotoSketch photoshops for you

PhotoSketch is some nifty software which allows you to creatively edit your photos by adding new parts to them.

As you  all you do is make a quick sketch of your scene, label each bit with some text and, seemingly by magic, you sketch is transformed into a unique photo.

photsketch

It looks like it takes your basic shape and matches them to parts in other photos. I’d imagine the parts have already been labelled inside the photo (maybe by way of GWAP). And then with some real clever pixel matching techniques the parts are embedded in a single photo background. In the above photo you can see the original photos and the sketch on the right with the new automatically created photo on the left.

More information from:

Response to Turing e-petition

I’m actually quite impressed by the Prime Minister’s response to the Turing e-petition. Quite often it’s just the normal government spiel.

Alan Turing was one of the key men in the second world War and a great mathematician (and one of the first computer programmers) but he was treated with contempt just a few years after he helped break German codes at Bletchly Park – it’s good to see that, on behalf of the government, Gordan Brown recognised his achievements and apologised for his shocking treatment.

The full script is available here: http://petitions.number10.gov.uk/turing/#detail

I was also impressed that they added the link to Bletchy Park asking for donations. Nice touch.

Subversion – source control

A good source control system is a must for almost all programming projects. For instance:

  • You can quickly check which lines across multiple files you’ve changed.
  • Revert changes to any previous date.
  • Never lose any file again.
  • Keep track of why a file was changed, by whom and when.
  • Take snap shots of release code versions.
  • Manage multiple engineers working on the same code base.
  • Automatically combine code from multiple engineers.
  • Split code development into various paths then quickly combine at a later date.

Over the years I’ve used many different source control systems – SourceSafe, CVS, Perforce, CodeSafe –  but the one I’m most impressed with is the only one I use at home and the one I encourage at work: Subversion.

Subversion is an open source, source control system (and they “eat their own dog food” – explained). It’s available on Linux, Windows and Mac and you can freely download it from their website.

If you used CVS before then you’ll probably understand how it works, but if you are more of a SourceSafe person (I feel for you) then Subversion takes a little explanation. Subversion works like this:

  1. First you create a “repository”, this will be where all the files are stored, lets call it “TestProj”, you’ll normally create this on your server so that multiple people can access it.
    1. type: svnadmin create your/path/TestProj
  2. Now locate where you want your own working copy to exist, lets call it “MyTestProj” and “Check Out” TestProj, this simply creates all the files in your repositiory (there isn’t any yet) together with some other files in a folder called “.svn” which holds the admin bits that subversion needs (you’ll see one of them in every subfolder you create).
    1. type: svn file:///your/path/TestProj MyTestProj
  3. Now create some files, say “TestProj.cpp”, “TestProj.h” and “TestProj.ico” in MyTestProj folder. These currently exist only on your computer so you need to “Add” them to Subversion. This just means you “are going to” add them, subversion won’t do anything until you subsequently “Commit” these changes, at that point you’ll get the opportunity to comment on your changes.
    1. type: svn add TestProj.cpp TestProj.h TestProj.ico
    2. type: svn commit --message "Adding first files"
  4. Now all your files are commiteed and the files are added inside the repository you created. Anyone else doing “Check Out” will see them in their working folder.

You can stick any folder or file in your working copy, and make any changes to the files you wish, nothing will happen to the Repository until you commit. You can “Update” you copy at any time to get everyone else’s changes or “Commit” you’re own changes back – by default there is no locking of files – if you change the same file as someone else then Subversion automatically merges them together –

…take a deep breath if you are a SourceSafe user, this will sound like witch craft…

– in almost all cases code can be automatically added as different lines will have been changed (this was hard for me to believe back when I first used it but believe me it’s clever enough to never cause a problem). On the rare cases (although this depends on project size, user number and frequency of updates) you’ll get a “Conflict” which means you’ve changed the same line someone else has and you’ll have to sort this out yourself before you are allowed to commit your changes.

There’s more information at:

That ends the first Subversion blog, in the future ones I’ll be looking at a folder structure you can use to make your projects easier to manage (see here), some of the client apps that exist to make working with subversion easier and more efficient, backups and a few more bits and pieces.