# Wednesday, November 17, 2004

I took the next step last night - to try and connect to Xbox Live... Not an easy problem because the router is upstairs (Xbox is downstairs), so I've bought a Wireless-G adapter. The adapter was easy to setup but connecting wasn't - reboot the router, modify the firewall, install a firmware upgrade (and panic when I then lost the internet completely).

I did manage to get connected but I think the delay on my broadband (it's via satellite) is going to cause issues. Whenever I play I get massive lag so as I move along I'll find myself back where I was a couple of seconds previously. I'm at a distinct disadvantage when going one-on-one with another player as I'll be shooting at their position 2 seconds prior.

I get two months of free trial so I'll see how things go. Hopefully everything will work OK because I guess I'll have completed the game in a few days and will need something to continue the interest. Check back in a month or so for progress.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, November 17, 2004 9:09:04 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Sunday, November 14, 2004

At the beginning of October I was starting to get referral spam so I implemented a blacklist to help remove anything that wasn't a true referrer. Well over a month on and I now have 10 times the amount of referral spam. It's not just the same stuff either - they are really clever with their domain names containing none of the keywords I'd previously picked. This means I have to login each day, checks the logs and add a new set of keywords to the list.

So I've coded up yet another change. This time I've inverted the functionality to only show referrers that I have configured. The code turns out to be cleaner and the site is far less maintenance for me so hopefully this should solve my problems for a while.

[Edit: I've sent the code to Omar so this should make it into the 1.7 release]

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, November 14, 2004 10:31:33 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Saturday, November 13, 2004

Ian Griffiths posted an article on "How To Stop a Thread in .NET", but as Richard Blewett pointed out "...the thread has to be able to check the flag to know it has to bring itself down...".

Richard's solution is better but I prefer another for a number of reasons:

  • The code could be waiting for 2 seconds before the Sleep gets interrupted
  • We can get rid a a few lines of code
  • I think this solution is clearer

What both articles are talking about is a shutdown event. In which case why not use the timeout for a sleep? So modifying Richard's code we have:

static ManualResetEvent
    shutdownEvent = new ManualResetEvent(false);

static void Main(string[] args)
{
    Thread t = new Thread(new ThreadStart(Func));
    t.Start();

    Console.ReadLine();

    // set the event to get the thread to come down cleanly
    shutdownEvent.Set();

    // wait for it to terminate
    t.Join();
}

static void Func()
{
    // open some resource that requires clean up
    using(FileStream fs =
                File.OpenWrite(@"C:\foo.txt"))
    {
        // check the event
        while(!shutdownEvent.WaitOne(10000, true))
        {
            // use the resource
            fs.WriteByte(0);
        }
    }
}

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, November 13, 2004 2:03:02 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback

I apologise, this blog has been a little quiet this week. The reason is that I've got a copy of Halo 2. For some reason whenever I start playing I lose about six hours. It's very immersive. I won't spoil anything but I can say I love the details:

  • In a vacuum the sound changes as if your ears have 'popped'
  • The sniper rifle scope (when not zoomed) shows the landscape it's pointing at
  • The "story" adds to the game which is unusual for video games

Oh and I'm glad that you don't need to wait until later levels to access the cool gear like the original - the writers assume you have already played the first one.

That's all, I'm off for another six hours.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, November 13, 2004 12:00:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Sunday, November 07, 2004

The primary reason for writing this article is I've managed to make exactly the same mistake on two separate occasions. A third time would be careless...

For this particular recipe you need:

  • A .NET application that uses COM interop (any should do but I'm using SQLServer DSO)
  • A Visual Studio installer project

First add the output of your COM interop project to the installer project and, as if my magic, the COM DLL that your interop is using will be added to the installer. Next build your solution and install your new application. Then spend a couple of hours trying to work out why nothing works and you get strange error messages like "Could not find msmdso.rll" whenever the COM object is instantiated. This is especially difficult if your application happens to be running as a service and COM DLL displays the message in a message box (hint: listen for the unmistakable "ding" of the message box sound).

What has happened? Well when the COM DLL was automatically detected and added to the installer project it was flagged as "vsdrfCOMSelfReg" which causes the new copy of the DLL to registered at install time zapping the original COM registration. As for the message box, nothing you can do if it's DSO like mine unless you happen to work for Microsoft.

For some reason setting the flag back to "vsdrfDoNotRegister" still causes issues and the best approach is to set the "Exclude" property to true and completely remove the DLL from the installer.

One last tip. If you manage to do this with DSO then you can avoid reinstalling Analysis Server by executing the following:

cd "C:\Program Files\Common Files\Microsoft Shared\DSO"
for %i in (*.dll) do regsvr32 %i
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, November 07, 2004 7:44:14 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Thursday, November 04, 2004

There are quite a number of Exony bloggers and on average a new one starts each week. This is great for the bloggers and great for the company but I've noticed that the first couple of articles usually contain content thats a little too "open". As we don't yet have a corporate blogging policy I would suggest that new bloggers bear the following points in mind:

  • Anything that's on the internet is public and the correct Google search can find what you've written in a second.
  • Don't talk about new features until they are announced publicly. Even Microsoft bloggers are completely silent until a formal announcement has been made - we didn't hear about Visual Studio Team System until the Tech-Ed announcement, nor did we hear about the Express Editions until Tech-Ed Europe.
  • Strategy and road-maps are best left to the marketing team.
  • Once a feature is out in the open (e.g. press release) blogging about it is probably good publicity but be aware that your words can be twisted by unscrupulous people. Write carefully.
  • Prospective customers might use your blog to decide on a purchase. If you write badly with spelling mistakes and poor content then they are likely to assume the whole company is run the same way.
  • Exony is valued on it's IPR. Don't give it away.
  • You are running a community - your readers. Treat them with respect.
  • Full text feeds please. I don't generally read anything that can't be downloaded to my aggregator and read off-line.
  • Linking is good. What better way to show us what you're reading? It brings relevant content together and provides a better picture.
  • If in doubt, I'll be happy to take a look at your draft before you post it.

For additional guidelines, I recommend the Sun Policy on Public Discourse.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Thursday, November 04, 2004 10:42:53 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Tuesday, November 02, 2004

I've been really busy with work lately which means no time to investigate bloggable things. It's a shame because I'm doing some really interesting work with Excel, Web Services and OLAP. Maybe when it's released I'll be able to find something that doesn't give away Exony IPR.

In the meantime, I was trying to remember a time when I had nothing to do. Not just work wise - I have a permanent backlog of things I want to look into or code up. New API's, new technologies, new techniques, new books are all stacking up. Add that to the Golf Web Application I'm writing and the 200+ feeds I'm subscribed to and I think I have enough to keep me busy for the foreseeable future. I think I have a solution though - apply Scrum techniques. The backlog of things is large but the priority of individual items varies depending on an number of external forces. Sometimes they may no longer be relevant when I get around to doing them. I constantly re-prioritise anyway but having a sprint goal will help give a measure of progress and avoid being overwhelmed by the full list. Four weeks is too long for a personal process so I'll start with a single week at a time and see how things go.

As a separate note, why is Halo 2 being released in the UK two days after the US? We Brits are going to have to listen to the Yanks harping on about it for a full 48 hours - torture!

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Tuesday, November 02, 2004 8:11:47 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Saturday, October 30, 2004

Koan has written an excellent article about Microsoft PSS entitled "A Bug's Life (or, how to get a hotfix out of Microsoft Product Support Services)". It's long but well worth reading.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, October 30, 2004 3:02:46 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

I hear there is a nasty case of flu around at the moment which is likely to hit the UK by 11th November. It's unofficially being called "Covenant Flu". If you catch it then wrap up warm and don't leave the house until the symptoms have disappeared.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, October 30, 2004 10:07:04 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Friday, October 29, 2004
Another great article from Scott. This time on Testing ASP.NET 2.0 and Visual Web Developer.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, October 29, 2004 5:02:11 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Monday, October 25, 2004

I've spent this evening working on the web pages for the GolfWeb application. Compared to the code I'm finding it somewhat difficult. Probably because web design is not one of my strong points. To make it doubly hard I've decided to complete the task without using any of the traditional table style layouts.

There are plenty of CSS resources on the web to help with the layout and effect you want but to tell the truth it's like learning a new language. The syntax is easy to pick up but, unless you know the language idioms, things don't flow and everything becomes disjoint. I guess the only way to learn is by doing so I'll have to persevere until things get easier. I don't suppose there's a CSS Cookbook available?

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Monday, October 25, 2004 10:30:16 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, October 24, 2004
I just wanted to link to this article by Scott Guthrie so the guys in the office could find it. It's an excellent article about driving up code quality by getting to a known point and staying there.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, October 24, 2004 9:09:43 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback