Sunday 31 December 2006

My eBay listing

So it's coming up to New Year, I've finally moved on from London and starting life elsewhere and it feels good. Feeling deeply positive and happier than for many months now. Anxiety gone replaced only with an open heart and an open mind. Am re-reading Douglas Coupland's book JPod which is geek fiction and frankly a must-read for any computer nerd, in it the characters write an eBay entry to sell themselves. In this spirit and looking forward to the future and the loves and laughs it may hold, I include my offering below.

Narg Boy Toy! VGC, energetic, fun, loyal and adventurous

Item number: 0011001110
Starting bid: $1.00
Buy it now price: $1,000,000.00
Current bid: $13.00
Start time: April 13th 1976 10:30
End time: 29 years, 5 days, 11 months 10 hours 4 minutes and 32 seconds (approx)
Ships to: Anywhere overseas
History: 5 bids
High bidder: theskank56 (12)
Seller: narg

Item specifics:
Condition - used (but good for its age)

Description:
You have the amazing oppertunity to purchase your own boy toy! Standard features include...
- workable head, legs and feet (one ankle slightly limited movement due to avoidable accident a few years ago)
- several scars (including many from maintenance surgery and rough use by previous owners)
- adventurous spirit
- ability to mould body according to diet and exercise in accordance with new owners taste
- fun, kind, energetic and loyal
- comes with multilingual plug-in adapter
- one previous long-term owner, several short term leases
- good cook and will happily provide funding for cleaner

This is a fantastic oppertunity - don't miss out! Bid on the Narg toy today and you too could get a companion for life who will love unconditionally and will smile and laugh with you.

BUY IT NOW!


Feel free to email/post your own adverts!

Take care everyone out there in the internet ether. I wish you all reach your dreams in 2007.

Saturday 30 December 2006

First few days in New Zealand.

This place rocks. Totally. It's beautiful - like a warm Scotland with more hills and more diverse flora and fauna. The place we are staying is staggeringly cool. Acres of land, swimming pool, sauna, jacuzzi, massive house - it's trippy. There's just friends and family here and you could walk around the forest surrounding the house for a long time without seeing anything. Nearly got my cock caught in a possum trap in the woods trying to figure out how it worked. Never mind tho eh, no harm no foul.

Been down the beach at the
Mount a fair bit doing some surfing and general idling and partying. It's great meeting the extended family here - cold beer is offered upon entering any residence regardless of the time of day or day of the week. It's required because it's so damn hot too. Wearing factor 50 at the moment, sitting in front of a monitor for the past 4 years getting pasty white termite skin is definately not good build-up to deep tanning. Still, bought a new cowboy hat so fitting right in with the locals.

Feeling total peace, for those who have never been to New Zealand before, I'd really recommend it. It's the most beautiful place with the most generous people. The beaches are pure white sand and an atmosphere that makes you relax just breathing in the oxygen-rich sea air. There's gentle talk of a Narg family outpost here, maybe with a bit of land/small farm thingy so it looks like the boy Narg may well need his new cowboy hat for rounding up the sheep in future.

Yee-har!

Flying to Auckland

Backdated to 24th December

This totally rules. Flown Manchester --> Singapore then Singapore --> Auckland. Just spent 24 hours on a plane playing Super Mario Bros, who wants to be a millionaire, watching videos and being served bloody mary's by staggeringly attractive stewardesses whilst sitting in an arm chair. Talk about heaven. Only problem was that I spent 8 hours getting to level 16 on Super Mario Bros then changed planes in Singapore. Fuckers. Still, undaunted carried on and then spent a further 5 hours getting back to the same place in the game on the new plane. Yeah baby, 1-0 to the Narg for having too much time on his hands!

Stayed over in Ackland for the night, driving to Mount Maunganui tomorrow. Weather is awesome. Fried lizard on the menu is a little weird though.

Friday 22 December 2006

Packing

Packing today ready to fly tomorrow. It really sucks to choose what not to take. I'm contemplating just travelling across there with a wallet and a smile and just buying stuff appropriate whatever day it is then giving the previous day's clothes to charity. Funky idea.

Flying Singapore Airlines and heard you get the old tv screen in the back of headrest of the chair in front. Sweet. If I could get a few smokey treats on the go and watch Blazing Saddles, Get Shorty, Star Wars, etc going across Asia and the Pacific Ocean - well it would be a bit like flying in the comfort of my own living room.

Only a short post today. Bit busy. Will try and post again later =)

Wednesday 20 December 2006

"Home James, and don't spare the horses"

Spent the first day back in Lancashire. It's been beautiful - a clear blue summer's day next to the sea. Have met up with old friends, played a few games of snooker at the Lytham Yacht Club, been out for dinner, had a few drinks and generally done a few pre-crimbo jobs.

It's mint up here, all that clear blue sky and healthy air. Even saw a fucking London black cab driving down the road. Had an automatic reflex to hail it and tell the driver to "go past a cash machine and a favoured take-away". Thank Christ I didn't because up here a take-away is generally some form of raw vegetable stolen from a field and the cash machine - well let's just say that it involves removing bartering material from a cow's arse manually. Lovely.

Going to see the titular head of the family tomorrow. Grandma. Everyone else of that generation has kicked the bucket and frankly she's a frightening woman. She still scary as hell now and I'm 30. I'm not being a beaver - she's got eyes like superman and tongue that leaves scars if she hears anything out of line. I bought her a "black mamba double-headed love length" for her christmas present. A change to something more useful is probably in order to reduce the potential for getting Narg's botty whipped.

Tuesday 19 December 2006

How much crap?

I'm nearly done moving my stuff out of my flat, and it's struck me that there's SO much total crap that I've bought over the years. An amazing amount of seriously shite t-shirts, books, clothes, games, toys and paperwork. But being the true geek, made up an algorithm in my head based on the frequency of use, the age of the object and the potential future usefulness in order to find out what to throw away.

This made it easy for items such as the "Party Like Pacman" tshirt below - never worn, pretty old, never going to wear it in my life time. Answer - charity shop to start some 12 yr old on their new potential lifestyle.



But what about the shocking tanks? Very cool, used pretty often, a bugger to try and convince customs that they're only a weapon when in the wrong hands, and the likelihood of using them in the future in the snow (with all it's conductive properties) relatively slim. Answer - sod it, give them to one of the kids next door after singing the little beggar's fingers in a demonstration.

All in all, it's going pretty well though. Threw out a load of suits - very therapeutic and not just a little symbolic - as well as turfing out old programming manuals for recycling and organising the paperwork accordingly (it's been filed carefully in date order in the bin). Successful day, just need to get enough contact lenses to last for several months then we're rocking.

Timescales are:
Fly to NZ on Saturday morning.
Fly around the southern hemisphere a bit.
Fly back from Singapore (leaving some members of the party there who haven't quite finished drinking) 17th January.
Fly out to Geneva Friday 19th January and head to Chamonix.
Bliss.

To all the ex-workmates who are reading this. Thanks very much. It was a hugely positive experience working with all of you. Special note to Andy who I still believe is the best problem solver I've ever come across and acted with such dignity when things were't quite so peachy. Also thanks to Kuntesh, Badjon, Duff, Chris, Bobby, Swaps, Jonny, JQ, iPatch and all the others who still make me smile thinking about them. Take it easy y'all. See you in the next life =)

Monday 18 December 2006

Date reconverter

This is the date reconversion utility that I mentioned in a previous post. It takes similar arguments to the string.toDate() extension posted being in format dmy to represent day/month/year with this one having the optional argument t to denote the time. double a character means the result will be padded (so if the month is april using m will return 4 but mm will return 04). Pretty self explanatory, but I like the slickness of it. It could be better improved to organise times being formatted before dates, maybe something to consider at a later date.

/* Convert a date into a string.
* The format argument denotes the format (including padding zeros) the
* date is returned as. d - day, m - month, y - year, t - time.
* Double characters or quad y for year) will pad/extend that number.
* Optional: argument d_l is the date delimiter, t_l is the time delimiter.
* @param (String) format
* @param (String) d_l (Optional)
* @param (String) t_l (Optional)
*/
Date.prototype.convert = function(format, d_l, t_l) {
    var d_l = d_l || "/",
        t_l = t_l || ":",
        date = [],
        pad,
        d = this;
        
    pad = function(n) {
        return (n < 10) ? String("0"+ n) : n;
    }
    
    format = format.replace(/(m+)|(d+)|(y+)|(t+)/gi, function(s) {
        switch(s) {
            case "d": date.push(d.getDate()); break;
            case "dd": date.push(pad(d.getDate())); break;
            case "m": date.push(d.getMonth()); break;
            case "mm": date.push(pad(d.getMonth())); break;
            case "y": date.push(String(d.getFullYear()).substring(2, 4)); break;
            case "yy": date.push(String(d.getFullYear()).substring(2, 4)); break;
            case "yyyy": date.push(d.getFullYear()); break;
            case "t": date.push(d.getHours()+ t_l + d.getMinutes()); break;
            case "tt": date.push(pad(d.getHours()) + t_l + pad(d.getMinutes())); break;
        }
    });
    
    return (date.length < 3)
        ? null : (date.length == 3)
            ? date.join(d_l)
            : date[0]+d_l+date[1]+d_l+date[2]+" "+date[3];
}


// Usage:
var strDate = "4::13::1976 10.30";

// the previous post String extension to create a date object
var objDate = strDate.toDate("mdy");

// Use this date convert extension
var newStrDate = objDate.convert("ddmmyytt", ".", ":"); // outputs 13.04.76 10:30

Done and dusted

Last day today. Going out with a few of the boys for lunch - going to miss lots of them but my mind's already on going to New Zealand for a month and then onwards to Chamonix. Already I can feel the air of the mountains in my mind and the smell of the snow in my nostrils - weirdly I've also started speaking french in my dreams and have begun developing a taste for smelly cheese. The body seems to be readying itself for the culture change. When I stop shaving my funzone and start wearing speedos to the swimming pool, I'll know that the metamorphosis is complete.

It was great to say a blanket goodbye to everyone on Friday and seal my time in London on a positive note. It reinforces the belief that fate is aiding this move to France - everything just fits perfectly and at the end of the evening at the museum when it was time to go, it seemed right to just walk out of the main entrance with no fuss and just a genuine, happy, satisfied smile.

There's one more thing I have to do before I go. A while ago my ex lent me a book, the Celestine Prophect, which I promptly managed to lose. The book means a huge amount to her and I feel bad about misplacing it so I'm going to find it online and get a copy sent to her. It's personal to her and we shared a lot of personal moments - it's not fair to take any of those away from her without her permission.

PS
I know I said I'd post up a date re-conversion function the other day, I'm going to try to do that today.

Friday 15 December 2006

After effects

Have been saying goodbye and going for Christmas drinks and birthday parties all of this week - ploughing headlong into the seasonal spirit and the joie de vivre. Tonight's festivities are to include the annual office christmas party - held at the Science Museum in South Kensington just around the corner from where I used to live. It's mint - I love the Science Museum and am really looking forward to squeezing in a go on the ice skating rink outside the Natural History Museum as well.

I have a nasty habit of turning into "naughty monkey" after a few cheeky beers however, and by far and away the biggest concern is doing something truly monumentually idiotic tonight. We're talking about things like trying to get in a rebuilt Gyspy Moth with a pair of swimming goggles Biggles-style shouting "Tally-ho! Hun at 3 o'clock!"; maybe even solving the age-old question of "will it hurt if i place my genitals on a plasma ball" (I'm thinking there might be some sort of jacob's ladder action between Captain Chopper and the high-voltage glass...); perhaps even trying to remove a tattoo with an industrial laser; "liberating" Scaramanga's gun from the James Bond exhibition; licking Stephenson's Rocket the possibilities for mischief are quite frankly astronomical - especially after hooning around at Mach 10.4 on the ice skating rink getting progressively more and more revved up. Nice. I better calm my ass down, I'm actually starting to bounce on this chair.

But I am really, genuinely excited. How many times in life do you get the chance to eat at the Science Museum surrounded by history and innovation. It seems really fitting to end my old life in London surrounded by technological artifacts, with the odd futuristic concept dotted in between, at the place where the future brings new, exciting oppertunity and the chance to create and craft something important and new that's going to push some boundries. I'd like to think that's the message whomever is crafting my fate, organising my karma, whatever you want to call it. It's a beautiful way to end life in London and look back at what's been achieved and at the same time see the challenges and adventures of the future dotted in between. Granted there will be a small amount of drink taken - but this time it's not a sad goodbye, it's a welcome to the future with open arms, an open heart and an open mind.

Wednesday 13 December 2006

I need a date!

OK, so the title of the post is catchy, but this isn't about an urgent yearning for the future Mrs Narg - actually there's always an urgent yearning for the future Mrs Narg but let's not go there. This is about converting a string to JavaScript date object.

The concept is you have a string and you just call this method with the sequence the day/month/year appear in (d, m, y respectively). This is regardless of any delimiters of your date (delimeters being the characters between the numbers) so this will work the same way for dates in formats such as: 13/04/1976, 1976-04-13, 04::13::1976
It's pretty neat, a regular expression just finds the numbers in the sequence and then uses the format (dmy, mdy, ymd or ydm) to find which number refers to what. It then has a look to see if a time has been passed. Again the delimiter splitting the hours from the the minutes is not important, but the order must be hours then minutes (ir hh:mm or h/m or hh-mm). If no time is found, then the time defaults to 00:00 on the date supplied. All this information is then used to create a standard date object and return it - if the process fails at any stage, the method returns null.


/*
Copyright (C) 2006 Martin Rudd

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
*/
String.prototype.toDate = function(format) {
    if(/(\d{1,4})[^\d]+(\d{1,4})[^\d]+(\d{1,4})([^$]*)/i.test(this)) {
        var date;
        switch(format) {
            case "dmy":    date = { year: RegExp.$3, month: RegExp.$2, day: RegExp.$1 };
            break;
            case "mdy": date = { year: RegExp.$3, month: RegExp.$1, day: RegExp.$2 };
            break;
            case "ymd": date = { year: RegExp.$1, month: RegExp.$2, day: RegExp.$3 };
            break;
            case "ydm": date = { year: RegExp.$1, month: RegExp.$3, day: RegExp.$2 };
            break;
        }
        
        if(typeof date === "object") {
            var time = RegExp.$4.replace(/^\s*|\s*$/g, "");
            
            if(time.length > 0) {
                if(/(\d{1,4})[^\d]+(\d{1,4})/.test(time)) {
                    date.hours = RegExp.$1;
                    date.minutes = RegExp.$2;
                }
            }

            date.hours = (typeof date.hours != "string") ? 0 : date.hours;
            date.minutes = (typeof date.minutes != "string") ? 0 : date.minutes;
            
            return new Date(date.year, date.month, date.day, date.hours, date.minutes);
            
        } else {
            return null;
        }
    } else {
        return null;
    }
}


Feel free to have a play. Tomorrow I'll post up a method turning the JavaScript date back into a string in different formats.

Tuesday 12 December 2006

Midget rental

Nearly finished up at work. All that needs to be done now is to find someone to take to the office christmas party. One of these little guys should do the trick:

http://www.youtube.com/watch?v=54x3oW5tarM&eurl=


Of course you could just go directly to the website to order one:
http://www.rentamidget.com/

Joining strings

We've all been there before - concatenating strings of html, but which way is quicker?

1) Recursive concatenation.
var html = "<html>" + "<head>" + "<title>";

2) Append to the variable.
var html = "<html>";
html += "<head>";
html += "<title>";

3) Join the array
var html = ["<html>", "<head>", "<title>"].join("");

Smart engines such as SpiderMonkey (the basis for Netscape's original JavaScript engine - leading to Netscape, Firefox, etc) would use exactly the same underlying code for examples 1 and 2 - no speed difference at all. JScript in example 2 however would look up the html variable each time and use an intermediary to store the new values before discarding the old ones. So there would be a speed differential in JScript where example 1 is quicker than example 2.

The fastest string concatenation is using option 3 - this is down to the array's internal string builder facility which allows for much faster string manipulation. Of course it's only going to make a big difference when contactenating strings over many iterations - such as creating a large html table. Over a very small number of iterations the difference is so negligable as to be inconsequential.

Monday 11 December 2006

Reality check

Things are rapidly being ticked off the checklist.

1) Organise the London flat.
2) Get somewhere to live in Chamonix.
3) Find somewhere to work in Chamonix.
4) Get some immediate work (got the contract to rebuild some pub websites).
5) Move collection of thongs, leotards and hats from London to Lancashire.
6) Store the above collection of thongs and leotards not required for the mountains.
7) Stop worrying about the white stuff (woohoo!)
8) Grab a few days before flying to New Zealand to sort out presents & family stuff.
9) Ship over a load of computer gear really cheaply through the Post Office (bonus! thought there was going to be need to hire a van and drive it out there).
10) "Unhired" Rosa, my wonderful cleaner who has kept me in clean underpants for as long as I can remember.
11) Claim back some of the £888 year oyster card. I'm sorry but LTU are fuckers - pleased that they are actually giving something back for a change.
12) Find a cheap flight out to Geneva.

Current work have agreed to let me go on the 18th December, leaving drinks getting sorted, have said goodbye to some of my friends.

Jesus, it's actually happening.

Friday 8 December 2006

Texty texty

Texty texty

Was reading Simon Willison's Weblog and he posted up about an really simple full-screen, auto-saving, free text editor called WriteRoom. It looks really nice - really classic. It's definately going on my mac at home.



Further down in the comments left was a post by a certain Steve Ballmer about a similar editor for Windows called Dark Room. I'm actually using it to write this blog post and it really is sweet. For a start it's got an opacity filter to the background so you can see what's happening on your desktop. I'm sorry but that's just like geek porn. Ironically you could actually run a movie in the background and watch it through the editor whilst working on a document. Mmmmm. Coupled with the auto-save feature that it uses means that this thing is actually making Narg breathe a little deeply and wriggle in his chair. Of course there's the small matter of the CEO of Microsoft posting comments on your blog - cause for celebration.



I'm a big fan of these small software apps that people write and release freeware or under OSS licenses - they really do push the larger tech companies with the ideas they promote. Much of the underlying architecture of really famous bits of software has been pushed by small ideas over the course of software history. Look no farther than Internet Explorer - the current most widely used web browser was actually developed primarily from the Spyglass Mosaic browser around 1995. Spyglass Mosaic actually licensed technology from the National Center for Supercomputing Applications (NCSA) - technology which was designed for a UNIX web browser and released under very generous licensing. This is why there's a credit to NCSA Mosaic in Internet Explorer. You can find this for yourself by going to "Help --> About Internet Explorer" in Internet Explorer itself. Very funky.

This does go to show that small teams of developers can have large impacts farther down the line. I'd like to think that at some stage I'll write a piece of software - a website, an interface or an appliation - that will have this impact. I think that would be a real sense of satisfaction. I believe in my heart that this is going to happen with the Chamonix Valley website. There are some really sound ideas coming forward and oppertunity to realise these things. Earlier this week the first nerves about moving to a foreign country were felt - the first butterflies in the stomach, but in reflection it wasn't apprehension of the unknown, but the realisation that there's the chance to do something to have a positive impact on a lot of people. Awesome. Bring it on. Feel the love baby.

Further reading:
Mosaic web browser
History of Internet Explorer
Internet Explorer Homepage

Thursday 7 December 2006

jumpcut

A while ago I got a shout from a mate of mine to have a look at jumpcut a site that enables you to upload/edit/recut and share movies. Very cool, it's also free. I came across a rather entertaining definition of jumpcut on urbandictionary.com - apparently jumpcut is a video editing term referring to a large hop in the timeline of a movie. So the site's got a natty name, it's easy to use - I created a movie a couple of months ago to try out the software.

So it all looks very funky indeed. In fact after talking to one of the lads here we came up with a fantastic idea of doing a video blog. So I'll hook this blog into that video feed and hopefully be able to pop out a 2 minute segment at the end of the day in Chamonix with a bit of amusing or at least interesting news on the events and rigours of the day. Very cool!

I like the idea of doing this for a few reasons - Chris from listingslab already has a highly amusing blog about quitting London life to live in Chamonix and I'd like something slightly different. Also there's the benefit of being able to send a more interactive environment back to friends and family so they can see any phsyical differences (suntan, black eyes, stitches, etc). A bonus is that the chamonix valley website also has been exploring video content. Plus there's the added oppertunity for elaborate practical jokes which can't be understated.

I'd recommend having a glance over at jumpcut and I'll post up on here whenever there's a video update. In the mean time, if anyone's got any ideas for a good lightweight camera for taking bursts of video then please give me a shout!

Wednesday 6 December 2006

Dreamy love

Have been laid up in bed ill yesterday and today. Got man flu. Hence have been living off lucozade and dvd's - notably crappy romantic comedies. My lovely housemate procured some of the most meaningless film to gush forth from the window of knowledge and rather worryingly have enjoyed much of it. In fact, there's a few tips and tricks left in there to the wooers and wooees - limited notes below.

Observations of successful courting strategies:

Knock the person you are courting clean out.
Saw this in Hitch amongst others, it appears to be a favoured strategy generally. In fact causing some sort of physical distress seems to be a really good idea as the target will inevitably forgive and forget. I'd guess that this could be a precursor to domestic violence at some stage in the future but all the other tell-tale signs seem to get swept under the carpet. On the plus side tho, I do like sporty, adventurous girls and so counting the recovery time may well certainly lend itself to helping "weed out the minnows" when looking for Mrs Narg.

Sleep with someone else when drunk/vulnerable/drunk & vulnerable.
A little more emotionally charged than the physical aspect of above. Plus the sex is inevitably never as good with the third party. They are always cast aside at a later stage for the main characters to reunite, but it would certainly make it a more difficult decision for the hero/heroine to go back to their main partner if the third party had introduced a bucket of soapy frogs into a lively bedroom encounter. There's a lingering feeling that the potential Mrs Narg might be put off by the combination of Imperial Leather and amphibians however so this one's going to be put on the "maybe" pile.

Don't buy flowers/chocolates.
It's gonna take waaay more than that apparently. Save your money. The guy with the private jet inevitably has a girl at some point - that should speak volumes for the value of money. I'm hoping that Mrs Narg will prefer flowers over jets - preferably a wild flower on the heather highlands in the middle of Scotland to an EasyJet flight to Magaluf at least.

Be really attractive.
No seriously it helps a lot. Boy next door look seems to work very well. The investment banker in a suit is almost always the bad guy (so why do virtually all girls like men in suits?) whereas the guy in the jeans and shirt ultimately always gets the girl (and later sponsorship from Gap). However an underlying sense of style and buckets of confidence also feature into this quite heavily. There's 30% off at Gap at the moment, so Mrs Narg will be happy. Might even have a shave on our wedding day to really smarten up.


I guess that despite all the jokes and whatnot mentioned above - the only thing you can do is open up enough to someone else for them to love you for who you are. It's happened once before to me and it was all I could do to stop standing on top of everything and shouting it across the land. The most exciting, adventurous, happy, sharing, adrenaline filled, emotional trip ever. Once she fell in love with the mountains and snowboarding too, it was like the air had been filled with crystals everywhere you looked.

The unequivocal love of the mountains is one of the reasons for going to the France. Decisions become easier with less clutter and distraction (ie London), and life is much more pure both spiritually and physically. The interim stalling period to get out there is almost unbearable - waiting to be able to get stuck into programming at the foot of the Aiguille du Midi in the high clean air after a few hours riding the mountain in the early morning each day. This love for the mountains is unconditional, much like the love of the past. The chance to programme, to ride, to enjoy the mountains and to have a fulfilling life is too much to walk away from. I guess if I meet Mrs Narg out there, then the chance to follow my dream and have it merge with someone elses. Well that would just be too cool.