Sam's posterous http://samjudson.posterous.com Most recent posts at Sam's posterous posterous.com Tue, 10 Mar 2009 07:26:26 -0700 Is Posterous down? http://samjudson.posterous.com/is-posterous-down-0 http://samjudson.posterous.com/is-posterous-down-0 A quick test to see if posterous is still working.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 03 Sep 2008 03:43:00 -0700 Creating generic exceptions? http://samjudson.posterous.com/creating-generic-exceptions http://samjudson.posterous.com/creating-generic-exceptions
Rob asked the following question on StackOverflow:

  How do I create an exception of a particular type from a generic method.

The best solution found on the StackOverflow site was this:

    static ExType TestException<ExType>(string message) where ExType:Exception
   
{
       
ExType ex = (ExType)Activator.CreateInstance(typeof(ExType), message);
       
return ex;
   
}

This is great - but there is a gotcha - it is possible to create an exception class that inherits from Exception, that does not implement the message constructor:

    public class MyException : Exception
    {
        public MyException()
        {
        }
    }

Given the above exception the following will work:

            Exception e1 = GenerateException<Exception>("Test message 1");

But this will throw a MethodMissingException:

            MyException e2 = GenerateException<MyException>("Test message 2");



Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Fri, 29 Aug 2008 07:50:00 -0700 <Script> element gotcha http://samjudson.posterous.com/script-element-gotcha http://samjudson.posterous.com/script-element-gotcha
Was testing out some external javascript stuff last night, and it turns out that you need to be careful in XHTML whether you have an end tag with no content, as opposed to an empty element.

And empty <script> element looks like this:

<script type="text/javascript" src="whatever.js"/>

While one with an end tag, but no content looks like this:

<script type="text/javascript" src="whatever.js"></script>

Now in normal HTML both are probably valid, but in XHTML (i.e if you supply a DOCTYPE at the start of your document) the former is NOT valid, and the latter is. This had me going round in circles for ages, as firebug would quite happily step through the code in the external JS script, but would not process anything after that.

See XHTML spec for more details: http://www.w3.org/TR/xhtml1/#h-4.3

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Fri, 29 Aug 2008 06:55:44 -0700 British Military Fitness http://samjudson.posterous.com/british-military-fitness http://samjudson.posterous.com/british-military-fitness
Started going to the local park (Leazes Park in Newcastle) on a Thursday (and one Saturday) to join a load of ex-army instructors and other fools to run around and get very sweaty, tired (and usually) muddy and wet. http://www.britmilfit.com/locations_venues.aspx?venueid=34. Basically its circuit training without a gym - and believe me, after a few weeks of doing it you come to quickly realise you don't need a gym to get completely knackered!

Last night was 'assessment' night - a month voluntary assessment. Since I've only just started I wanted to benchmark myself, and hopefully see my fitness improve over the coming weeks and months.

It starts off with a 1.5km run - which I did in 5min21 - a pretty damn fine time in my opinion.

The following page gives a list of the 'colours' used, blue, red and green, the 'top' level being green. I've gone as red till now, but my run puts me firmly in the green category for that part of the assessment - v. chuffed.

http://www.britmilfit.com/fitness_assessments.aspx

At the end we did 15 x 20m shuttle runs - and for this I got a time of 1:26 (or 86 seconds if you will) which also puts me in the green category! Yeah me...

You can sense the 'but' can't you - yep, the running is my strong suit.

I can't remember my exact numbers for the other three exercises - I think I got about 35 push ups, 50 sit ups, and 27 burpees[1] (in two minutes each). All well within the red category, and showing where I've definitely got room for improvement. My aim for next time is to add at least 5 to each of those totals.

[1] Video of burpees:

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 20 Aug 2008 03:56:27 -0700 What makes StackOverflow different... http://samjudson.posterous.com/what-makes-stackoverflow-diffe http://samjudson.posterous.com/what-makes-stackoverflow-diffe
I was asked the question recently, what makes StackOverflow different from other developer forums. (Thanks http://twitter.com/redgum)

http://www.stackoverflow.com

I've only been using it for a few days now, and its still in private beta, although it is claimed to be (mostly) feature complete.

There are a few obvious things that mark it as different from your usual developer forum.

1. No forums

It doesn't have the concept of forums, instead uses tags to provide order to the chaos. This is good, in that everything gets at least some attention when it is posted, as well as the eventual problem of things being posted to the incorrect forum never appearing.

2. No login

Eventually you will be able to ask questions and answer them without logging in. This does sound very strange, and as the web site is still in private beta it really isn't being tested much yet, but it certainly could make life interesting.

3. Voting

Questions, as well as answers can be voted up and down - you require a log in and the required reputation to do either of these things. Reputation is gained from answering questions, having questions and answers voted up, and by having answers marked as 'correct' by the question asker. The exact formula isn't really known.

4. Badges and Reputation

As you answer questions and generally interact you gain reputation, and various 'badges'. This is in common with many game web sites (such as Kongregate) where completing certain objectives gives you a particular badge. Badges are given for things like 'First Answer marked as Correct'.

So far this is producing a very fluid and engaging experience, but I don't think it will truly get tested till it is open to a) Spam and b) Crap questions. Hopefully the reputation/voting system will encourage the better questions, while discouraging the worst.

Will StackOverflow end up any different from all the other developer forums? They have certainly set out on the right path. Whether this path enables them to end up better than the rest is something I think is still to be seen.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Tue, 12 Aug 2008 05:07:34 -0700 Reasons Twitter is a better IM client... http://samjudson.posterous.com/reasons-twitter-is-a-better-im http://samjudson.posterous.com/reasons-twitter-is-a-better-im
I'm starting to like twitter. As with most (damn the phrase) web 2.0 major sites I have an account (I'm there on all the social networks, flickr, pownce, last.fm, friendfeed etc) but I found it quite hard work to get used to the format.

Then I started trying out http://www.posterous.com which takes anything I email them (like this), throws it on a blog and then updates twitter. That and a couple of people who've sent me actual tweets (ok, that still sounds silly) and the service just comes alive.

And the reasons I prefer it over normal IM - well mainly because of the whole "who's online" thing - I hate being pinged in IM by people at random times - if maybe I just logged on to check one thing in google, or I'm trying to write some code or play a game. So what do I do, well I shut down the IM client - or even worse make sure it doesn't start at startup. And from there on in it becomes pointless.

With Twitter there is no concept of being online - you just post anytime you want - and read others posts anytime you want. You can keep track of those sent to your ears, as well as what the world is saying (I think Search was the big thing missing, but now they've got that sorted too).

And if you close your twitter client (or heaven forbid twitter is down) then that's just a while for you to get more work done :)

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Fri, 08 Aug 2008 07:09:06 -0700 Felicia Day is hot http://samjudson.posterous.com/felicia-day-is-hot http://samjudson.posterous.com/felicia-day-is-hot
Not only is she a brilliant actress but she seems to love technology and gaming.

Recent Highlights:

The Guild: http://www.youtube.com/view_play_list?p=EE93D30C5588A850
Dr Horrible's Sing Along Blog: http://drhorrible.com/ (absolutely brilliant, but does no-one else think the ending sucks big time!)
The Legend of Neil: http://www.effinfunny.com/legend-of-neil (NSFW Link/Fairy action! Lucky Neil/Link)

My god she's everywhere - visit her website and bask in the glory of all those social networking links - twitter, youtube, flickr, facebook - everywhere!

http://feliciaday.com/

Welcome!

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 06 Aug 2008 01:52:10 -0700 David Tennant uses his hair - Patrick Stewart doesn't http://samjudson.posterous.com/david-tennant-uses-his-hair-pa http://samjudson.posterous.com/david-tennant-uses-his-hair-pa
I couldn't help notice in the BBC review of David Tennant's performance in Hamlet the following comment about his brilliant use of his hair:

"Tennant also uses his hair to great theatrical effect. From the sleek combed-back style of his first scene, he ruffles it to display despair, rage and madness. It deserves a credit of its very own"

Unfortunately they stuck this right next to a picture of Patrick Stewart, who's hair got no credit whatsoever...

http://news.bbc.co.uk/1/hi/entertainment/7540819.stm

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Mon, 04 Aug 2008 02:43:10 -0700 The Cake IS a lie... http://samjudson.posterous.com/the-cake-is-a-lie-1 http://samjudson.posterous.com/the-cake-is-a-lie-1
I got a new video card last weekend, and as a reward to myself I loaded up steam and bought the orange box - why you ask, Portal! I've heard rave reviews and played the flash copy, so wanted to give it a go.

Well lets just say I am REALLY enjoying it. I don't want to give too much away, but I think before long you too will realise that the cake IS a lie...

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Mon, 04 Aug 2008 02:36:42 -0700 RPG Bloggers Network http://samjudson.posterous.com/rpg-bloggers-network http://samjudson.posterous.com/rpg-bloggers-network
A bunch of blogs about Role Playing Games have joined forces to have a single place from which you can read all of their blogs.

http://rpgbloggers.com/

I think I read 5 out of 9 of them already, but I look forward to seeing what the other 4 produce in the near future...

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Tue, 29 Jul 2008 06:04:41 -0700 Compress Old Files actually works http://samjudson.posterous.com/compress-old-files-actually-wo http://samjudson.posterous.com/compress-old-files-actually-wo
I ran "Compress Old Files" on my PC today (or rather I am in the process of running it). I did have 194MB free space on C: - I currently have 1.6Gb and climbing!

Absolutely amazing - with these kind of savings don't you wish it did it automatically!

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 23 Jul 2008 05:52:14 -0700 Trying out the post toe twitter thing too... http://samjudson.posterous.com/trying-out-the-post-toe-twitte-1 http://samjudson.posterous.com/trying-out-the-post-toe-twitte-1
Well, this seems to be working well. Now, like always I just have to think of something to blog/twit about... :(

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 23 Jul 2008 05:47:08 -0700 Trying out the post toe twitter thing too... http://samjudson.posterous.com/trying-out-the-post-toe-twitte http://samjudson.posterous.com/trying-out-the-post-toe-twitte

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson
Wed, 23 Jul 2008 05:43:39 -0700 Must try new blogging platform... http://samjudson.posterous.com/must-try-new-blogging-platform http://samjudson.posterous.com/must-try-new-blogging-platform
Oh yes I must...

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/unknown75.gif http://posterous.com/people/3znn78js6 Sam Judson Sam Sam Judson