web 2.0

Doctor Who on Location

So filming has finally begun in what is thought to be David Tennant's final Doctor Who episode the 2009 Christmas Special.  I spotted these images on the website for the Penarth local newspaper showing the Tardis and David himself on Victoria Road in Penarth - I even managed to find the location on Google Streetview which I believe is 52 Victoria Road, Penarth - very nice area too. It sort of reminds me of the house in Sylvester McCoy's episode Ghostlight

I know these specials are a bit of a departure from the way Doctor Who has been presented before (usually we wait all year then get a 13 week block) but I sort of like the new format (temporary as it is) the episodes are more like events and they are 15 minutes longer too making each one like a mini movie. I'm really looking forward to the next one "The Waters of Mars", I'm guessing there'll also be a summer and Autumn ones to follow too.

Tags: , , ,

Best Birthday Cake Ever

I recently celebrated my 40th Birthday, and since it was so close to Halloween I had a horror themed party. It's the first birthday party I'd had since I was 14, so it seemed like a great idea for such a landmark birthday.

It was a complete surprise to me when my fiancee brought out my birthday cake, she'd made a brilliant job of it (and in complete secrercy too).  Apart from the skeleton, the spiders, candles and the rats the whole thing is edible, the grass is icing sugar, the fence is made of matchmakers, the soil was crushed oreos and chocolate even the pumpkins and the tombstone were all molded from icing sugar.

To show her how proud I was of her I've decided to post it on my blog.




Tags: , , , , ,


Miner's Strike - fond memories

Well it seems we're coming up to the 25th anniversary of the miner's strike.  Already? blimey I left school the year after with no hope of getting a job EVER! thanks Mrs T.. 

I've got lots of personal memories about the event, coal picking, soup kitchens etc. My dad wasn't a miner - but he did work in a mining related trade so the strike effected us almost as much as my friend who's dads were out of work, with no income coming in. I still remember during the summer holidays - we'd have to break off what we were doing (usually hanging out at Vale Head Park) while my friends went up to the local middle school to get their free meals.  

I also remember stories of the police pulling so called agitators out of the local pubs too on an evening, allegedly to give them a hard time to try and make them think twice about leading the strike.

But one story which always brings a smile to my face happened, so I've been told on the picket line at the soon to be closed South Kirkby Colliery, during the winter months there'd been a fall of snow, the picketers had built some snowman in their lines, as a sort of joke reinforcement.  A policeman spotted this and ordered them to knock them down, "you're not here to have fun" was the reason given.  The miners refused, so a second warning was given, "knock them down or we'll run them down in the panda car".  Again the miners - now laughing to themselves refused. So the policemen went to carry out their threat, giving the car quite a lot of revs they sped towards the line of snowmen. There was a crash and a rather satisfying crunch as the panda car ended up beached on one of the concrete bollards the snowmen had been built over..  Apparently the miners refused to help remove the car too.



Tags: , , , , , , ,

Date Calculations c#

I’ve just spent quite a bit of time stuck on such a seamingly simple job, using c# work out what the date was 6 months ago, I tried alsorts of methods – using the TimeSpan function, subtracting 6 from the DateTime.Now value none of which worked for obvious reasons.. finally I noticed the function:  




Brilliant thought I, just subtract the integer of 6 from that. But alas no, the Subtract function uses a TimeSpan value, which meant creating a TimeSpan object and populating it – I know that’s not that difficult but my solutions was even simpler, I realised I could add minus figures to the current dates, using:



At first I thought that’ll never work – it’s just too outside the box, but it does. Give it a go. Also on a similar vein I found a nifty little function which does a similar job to the vb function DateDiff, this returns the number of months as an integer between two given dates.


private static int monthDifference(DateTime startDate, DateTime endDate)


            int monthsApart = 12 * (startDate.Year - endDate.Year) + startDate.Month - endDate.Month;

            return Math.Abs(monthsApart);


Tags: , , ,

My Wordle

I just came across this site yesterday (Wordle) while looking at an interesting twitter stats site, amazing what you can do with a bit of xml and some imagination.  This site takes your blog or twitter feed and analyses the word count, then creates you an image based on the frequency of the words used... myWordle


Once you've created you Wordle you can then save it to their gallery for world to marvel at, this is mine

The strange thing is that this post will have changed my wordle now as new words will have been added, but then that's the fluid nature of blogging I guess.

My Twitter Wordle is there too


Merry Christmas Everyone and a Happy 2009 :0)

Tags: , , , , , , ,

C# - The ternary operator

Just when I thought I'd got C# syntax sorted, I come across a statement which looks like some sort of alien script language.  So I decided to look it up and see what it's all about. The statement is what's known as the ternary operator. Simply put it's a way of doing an if else statement in one line of code. Making it more readable and I assume more efficient.

Lets say for example we have a function which returns a dataTable, in some cases the dataTable may have a null value, and trying return the it would cause an exception. So we would have to return null in this case.  The usual syntax might go something like.

if (dt == null)

   return dt;


  return null;


But using the ternary operator we can distill this down to one line:



return (dt == null) ? null : dt;


A lot nicer, once you understand it.  I believe this also works in JavaScript, but I haven't tested it.

Tags: , , , ,

Whos Next

Thanks for my friend Kirstin for this post but looks like the hunt is on for who is going to be the next Doctor.

The BBC now has an official story on David Tennant's departure:

The rumor mill has kicked into high gear, and if you're a betting person, here are some published odds, courtesy of Outpost Gallifrey:


5/2 David Morrissey

3/1 Patterson Joseph

6/1 James McAvoy

7/1 James Nesbitt, Robert Carlyle

8/1 John Simm, Rhys Ifans

12/1 Anthony Head

14/1 Alan Davies, Jason Statham

16/1 Nigel Harman, Bill Nighy

25/1 Daniel Radcliffe, Burn Gorman

33/1 Stephen Fry, John Barrowman

20/1 Next Doctor To Be Female

50/1 Christopher Eccleston

Other rumors are out for a whole lot of others, including Catherine Tate, Peter Purves, Sean Pertwee, and so on.  We can expect to see probably every male actor in Britain between the ages of 30 and 70 being suggested, and quite a few of the female ones as well.

To futher add something interesting to the mix Kirstin did some calculations for us: 

Average lifespan of a Doctor: 3.2 seasons
Average # of stories: 20.3
Average # of episodes: 76.4
Average age at first transmission: 41.6
Five Doctors were born in London (one was raised in Manchester); two in or near Liverpool, one in Manchester, and two in Scotland (though one -- Sylvester McCoy -- was raised in Ireland).  So the average new Doctor is apparently 42 years old and born in London.
I'm looking up stats on some of the rumored Doctors now

Tags: , , , , , , , ,

Lets get some perspective

Ok I didn't want to do this because basically I'm only perpetuating a quite pathetic story, but here goes.  The number of stupid people who jumped on the shock bus (band wagon) last week regarding Jonathan Ross & Russell Brand, just goes to prove how stupid the general public can be.  And frankly I'm quite scared that mob mentality is still alive and well in this day and age.  How on earth did this story end up on the front pages and headline stories, over 2 weeks after it was first broadcast?  Especially in a week when:

  • There was a massive earthquake in Pakistan killing 160 people
  • A human catastrophe on biblical scales is going on in The Congo
  • Car bombs go off in Spain, Croatia & Quetta killing innocent people

It just seems to me that we are spoon fed rubbish by the media like children, and we get upset by what we're told to get upset by (right on cue).  Why can't people see or are we just becoming headless children living our lives as we're told to?

Wake up you sheep - because of the thoughless action of 30,000+ idiots radio 2 have lost people who have brought happyness into millions of peoples lives.  Lets face it Andrew Sachs is happy with his apology, his grand daughter from what I've seen isn't really in any position to be throwing stones and the people involved have admitted they over stepped the mark.

So can we all get on with our lives? 

Tags: , , , , , , , ,

Ajax CalendarExtender - Date Validation

I've just been asked to find a solution to stop users choosing dates in the past in a calendarextender control.  After using a little google-phoo, I found a couple of solutions which involved extending the extender itself.  Altering the calendar.js then recompiling it and putting it back into your solution.  That just seems a bit excessive to me.  So I got to thinking couldn't I just use some in page JavaScript to trap the date entered. The Solution was pretty simple:

First we add a text box and a calendarextender:

<asp:TextBox ID="txtDate" MaxLength="10" runat="server" ReadOnly="True"></asp:TextBox>
cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" TargetControlID="txtDate" OnClientDateSelectionChanged="checkDate">

you may notice that the CalendarExtender has an event attached (checkDate) - this is the JavaScript function you want it to call when ever you select a new date, add this function the top of your aspx page:  

<script type="text/javascript">
    function checkDate(sender,args)
    //create a new date var and set it to the
    //value of the senders selected date
    var selectedDate = new Date();
    selectedDate = sender._selectedDate;
    //create a date var and set it's value to today
    var todayDate = new Date();
    var mssge = "";

    if(selectedDate < todayDate)
        //set the senders selected date to today
        sender._selectedDate = todayDate;
        //set the textbox assigned to the cal-ex to today
        //alert the user what we just did and why
        alert("Warning! - Date Cannot be in the past");


 Simple and the nice thing is it's reusable for all the calendarextenders on your page, just add the checkDate function to your other extenders.  

Happy Coding


Tags: , , , ,

SQL 2008 FileStream DataType

I've just been reading up on the new data type in SQL2008 - FileStream sqlservercentral.com

At first I thought it was a brilliant idea, personally I've been using binary file types for ages to hold images, SWF files, etc.  And I know it can slow the database down terribly if things start getting out of hand size wise.  I thought this was going to be a new data type which would streamline this process and make it a lot easier to handle.  But it sounds like it simply uses SQL as an interface to store your files in the windows file system.  i.e. SQL creates an entry for the file then puts in tidily away in the file system for you, whilst keeping all the references upto date.

That got me thinking - well that's a cop out, it's just going back to the old way of doing things, e.g just storing a link to a file not storing the file as binary within the database. 

But thinking further it is quite a clever idea:
  • It reduces the load & size of the database
  • It doesn't limit the size of file stored
  • It allows you to use compressed file system folders 
  • It stops you having to worry about file/database references getting out of date.
I've not been to any of the microsoft conferences this year so I've not had a proper introduction to it, but I wondered what other peoples thoughts were on it.

Tags: , , , , , ,