# 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
# Saturday, October 23, 2004
My friend Ryan on how to prepare for the release of Halo 2 on 11th November. I have my copy on pre-order but the satellite delay on my broadband will make Xbox Live useless, shame.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, October 23, 2004 5:10:05 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Friday, October 22, 2004

The autumn TV schedules are causing me a bit of a headache. Do I watch Hex or Carnivàle, The West Wing or Stargate Atlantis (or Champions League Football), Long Way Around or Spooks? The TV companies are really battling for viewing figures this season. Something has to give...

It's time to turn to toys. I need some sort of hard disk recorder that can record the programmes that clash. As I have a Sky subscription, it's a bit of a no-brainer, it has to be a Sky+ box. They have also just released a new version with 160GB (80 hrs) storage and a subscription deal that makes it only £150 more expensive than the standard model.

A couple of clicks on a web site, Google AutoFill for the credit card details and it'll be here next Friday. Sweet.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, October 22, 2004 11:04:06 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, October 20, 2004
Microsoft has decided to delay the release of SQL Server 2005 from the first half of 2005 until later in the summer of that year. A Community Technical Preview will be released as an interim beta with possibly more to come before the final beta and the product’s eventual release.

(via The ServerSide.NET)

I guess my previous post was correct in it's assumptions. The SQL Server delay has allowed the Visual Studio team time to add C# Edit & Continue.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, October 20, 2004 10:05:34 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2] Trackback
Just a quick one... To tell you about another new Exony blogger. Koan (rss) is her name and she's quite a unique individual but I'll let her tell you why. She was a Microsoft Certified Trainer on SQL Server and Analysis Services before joining Exony and will be able to delve deeply into all things SQL.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, October 20, 2004 6:31:33 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Tuesday, October 19, 2004

I thought it was interesting how my article on C# Edit & Continue was handled by a couple of Microsoft bloggers. On the one hand we have Robert Scoble who stuck it on his link blog, there by making it available to a much wider audience than normally reached by my site.

The flip site was a little different. I left a comment on Somasegar's web log pointing back to the article for two reasons. The first because I'm not sure that dasBlog ping-backs work with .Text and secondly I thought it polite to let Somasegar know what I'd written. He has comment moderation turned on so gets to decide what gets published. Unfortunately he decided not to let this one on his blog.

I prefer Scoble's blogging approach, so the rule on this site is I will never delete a comment unless it's personally defamatory or libellous. Otherwise, lets have a discussion about whatever you disagree with.


As a side note, I found a useful feature of Google Desktop whilst writing this article. My internet connection at home wasn't working tonight so finding the URLs for the links was a bit difficult. No problem - just search for the stuff with Google Desktop and use the cached page instead.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Tuesday, October 19, 2004 10:05:15 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, October 17, 2004

I'm just working on the membership part of the web site and as the user configuration is stored in a file I wanted to make sure it was going to be saved safely. Simple, just copy the file to a backup before saving. If anything goes wrong then restore the backup. The code is a little fiddly and I want to use if everywhere I save a file so I've created a little utility struct.

    public struct AutoBackup : IDisposable
    {
        private string file;
        private string backup;

        public AutoBackup(string file)
        {
            this.file = file;
            this.backup = file + ".bak";

            if (File.Exists(this.file))
            {
                File.Copy(this.file, this.backup);
            }
        }

        public void Dispose()
        {
            if (File.Exists(this.backup))
            {
                File.Copy(this.backup, this.file, true);
                File.Delete(this.backup);
            }
        }

        public void DeleteBackup()
        {
            if (File.Exists(this.backup))
                File.Delete(this.backup);
        }
    }

It's a struct because it should always be created on the stack. Initially I had some problems because I was trying to modify the fields after initialisation; something you can only do with reference objects. Usage is as follows:

    using (AutoBackup bak = new AutoBackup(membershipFile))
    using (FileStream fs = new FileStream(membershipFile,
            FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
    {
        serializer.Serialize(fs, membership);
        bak.DeleteBackup();
    }

The DeleteBackup() call is to stop the auto restore functionality from kicking in. If anything happens during the save that causes an exception to be thrown then the using block ensures the old file is restored.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, October 17, 2004 9:59:29 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2] Trackback

A couple of days ago Somasegar announced that C# would have Edit and Continue support in VS 2005. Wow, great news... But hold on, haven't they been saying all year that they didn't have time to do both refactoring and edit & continue? What changed and more importantly, how has that affected the final delivery date? You don't just add in a major feature and expect everything else to stay the same. So I guess one of the following has happened:

  • They found a bunch of devs and testers who have nothing better to do
  • Yukon has delayed some more and since VS2005 shares the same CLR version they now have so much slack in the schedule that they can add the feature
  • The new feature has delayed the product

I don't expect the first option is correct. I suspect the second has happened. Even if it's the third then we have a schedule slip somewhere and an even longer wait. Come on guys, I thought Microsoft's 21 Rules of Thumb was all about begin schedule driven and not feature driven? I'm under pressure to use alternative technologies so if the wait is too long then I'm afraid you may lose your chance.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, October 17, 2004 10:38:44 AM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback
# Saturday, October 16, 2004

I was just thinking about the overall architecture for the Golf Web application and whether or not it would be better to try and use existing products instead of trying to roll my own. I could use dasBlog and nGallery like this site does to provide pictures and allow members to update what they are doing.

This is the classic "buy vs build" decision that sometimes gets overlooked in software development. The cost equation is simple: will the purchase cost of the bought component + integration costs be greater or less than the cost of developing said functionality + support costs. Putting numbers in the equation is a little more difficult. Remember the purchase cost may include additional licensing fees. At Exony we have a simple rule for commercial components - if the component can't be redistributed royalty free or under OEM license then we don't use it. Open Source can be useful must don't forget to check the license especially the part about derivative works where the wrong license can commit your entire product to the public domain.

I'm not keen on using the two products mentioned above because they are complete overkill for what I want. There is a third way though, to use parts of the code base. The architecture will be mine but using code from the other two; sort of like a code snippet library. I've checked the licenses and this is allowed as long as I include the original license and copyright notices.

What I couldn't find though was any sort of .NET web contact manager. Does anyone know of one?

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, October 16, 2004 6:27:52 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Friday, October 15, 2004
I installed Desktop Google an hour or so ago. It's just completed indexing my entire hard drive and it's search speed blows everything else out of the water (bye bye Lookout). It indexes cpp and header files, but for some reason SQL and CS sources aren't. Shame, it would mean I don't have to use grep.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, October 15, 2004 4:38:45 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, October 13, 2004
My friend Brad on why you should (or not) "blog like no-one's reading".
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, October 13, 2004 10:27:36 PM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback