# Friday, September 17, 2004

I was just looking to get into music downloads and guess what Scoble says. Is he psychic?

Need some fun rave-style music to get your productivity up? Mix Of the Week provides it.

(via Scobleizer: Microsoft Geek Blogger)

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, September 17, 2004 5:32:15 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, September 15, 2004

Sometimes, when you have to get a lot done in a ridiculously short time, you need a different approach. As a case in point, we need to replace all the remaining ASP code in our product with ASP.NET before we add some essential new functionality. If we don't we will be stuck with the old code forever. This new functionality has to be delivered in a matter of weeks. It could be implemented in classic ASP but it will be much easier and faster using .NET.

What is called for is a few days of pure implementation. No "discussion", no "difference of opinion", just code. It's risky - probably only a 50% chance of success but if it works then we could save days in the immediate future and additional weeks down the line.

There is a way this could work; by modelling the team on an operating theatre. In this setup, there is one person who does the bulk of the work backed by a second to provide help and support. These two make the core pair - everything goes through them on the way into the product. The rest of the team are assigned packets of work by the core pair on an as needed basis. When the packets are complete they are given back to the core pair to stitch into the product. Effectively, one feature at a time is worked on by the whole team.

The main benefit to this style of team is the minimal communication needed, resulting in a higher code to comms ratio. The packets of work are usually so small that they can be described in a couple of sentences. If the result is not quite right then the core pair make whatever changes are required saving the time usually spent explaining additional work to the developer.

There are two key points to note before you embark on a development style such as this. Firstly, the core pair has to have a very strong shared vision of what the result should be. If not then you won't be on a straight line to goal and too much rework will kill the efficiency of the method. Secondly, it can be a bit ego bruising to the non-core developers. They are told exactly what to produce, they have no real opportunity for free thought and the code they return may be modified or even not used. Nearly everyone can put their needs and feelings on hold for a week (even developers) but I wouldn't push it beyond that. This is only for tiger-team style development.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, September 15, 2004 9:31:18 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, September 12, 2004

I have my guest systems configured to use their own network because I don't want my ISP moaning about DHCP and domains appearing on the subnet. The lack of "Shared Folders" in Virtual Server makes life difficult as it also won't mount ISO's larger than 2GB; you have to actually burn the image onto a DVD to use it in a guest operating system. The next challenge comes from Sharepoint Team Services and Active Directory Application Mode - these setup files are executables not CD images so can't be mounted. The solution, use mkisofs to create an image with the correct files on.

Finally, Visual Studio 2005. The handy hint here is not having "undo disks" enabled or you will grow old before it completes. If you are going to install the supplied MSDN then block out a full day anyway...

OK, everything installed... Fire up Visual Studio and connect to the Team Foundation Server... Yep, it connects. Try and create a portfolio project and... Bam! Access Denied... F#!%$%*k

I've just given a whole Sunday to this thing... Does anyone know what the problem is? I've tried adding the user to Global Administrators group as described in the docs but GssUtil reports that the identity "adm:" cannot be resolved.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, September 12, 2004 6:52:29 PM (GMT Daylight Time, UTC+01:00)  #    Comments [4] Trackback
# Thursday, September 09, 2004

The Photo Gallery is out of order at the moment. I seem to be having some nGallery issues with it. Thanks to everyone who mailed me to let me know.

[Edit: Actually, it's up and down like a whore's drawers so try your luck with it...]

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Thursday, September 09, 2004 4:10:44 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, September 08, 2004

I was in a customer data centre today. It's quite impressive seeing all the racks of servers they have. The customer in question is one of the UK's leading banks and the physical security of the place is amazing:

  • No company name on the building - you have to know it's the right place
  • Double layer prison style fencing with security cameras
  • Steel gate that opens for your car when buzz and speak to security
  • You have to pass though an outer door (operated by security again) before signing in and picking up your pass
  • To sign in you have to have a prearranged visit organised 72 hours in advance
  • Then an inner door (security personnel operated)
  • You are now in the building but only have access to the canteen and toilets
  • You get collected by a member of staff and go to the data operations gallery to pickup a second pass (green level -> limited access)
  • Finally with this second pass you get access to the room and rack where your servers are

Once inside the server room you understand the reason for all the security. It's full of mainframes and storage systems where the bank keeps their data. Very impressive to see and kind of makes our two 2U servers look a bit small.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, September 08, 2004 9:02:44 PM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback
# Friday, September 03, 2004

One of the nice things about System.String is that two variables having the same contents will point to the same object once they have been interned. So you have the following:

string s1 = "abcdef";
string s2 = "abcdef";

object o1 = string.Intern(s1);
object o2 = string.Intern(s2);

Debug.Assert(o1 == o2);

This can be put to good use when you want to use caching... If the non-cache lookup is expensive, say a database call, you want to ensure that the lookup operation will only happen once in the presence of multiple threads. The lock(cache) keyword is ideal but not very granular. An alternative is the lock the cache key:

public string GetFromCacheOrLookup(string key)
{
    lock (string.Intern(key))
    {
        string result = (string)cache[key];

        if (result == null)
        {
            result = LookupFromDatabase(key);
            cache[key] = result;
        }

        return result;
    }
}

This method allows multiple threads to perform the expensive lookup as long as the key is different; if not then they wait for the initial lookup to complete before continuing.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, September 03, 2004 1:07:43 PM (GMT Daylight Time, UTC+01:00)  #    Comments [3] Trackback
# Thursday, September 02, 2004

I couldn't resist this when I saw it in the shop... Maybe I can use it as a stand in at meetings? But then again I feel the need to keep it in its box as it looks kind of geekier there... I took a few more pictures too.

If you squint hard I reckon it looks a little like like Robert Scoble. In fact, if you look at the notebook that comes with it the task bar is unmistakably Windows but there was no tablet pen supplied so I guess it can't be him after all...

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Thursday, September 02, 2004 3:27:35 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2] Trackback
# Wednesday, September 01, 2004

I have 5 Gmail invites to give away... I'll give them to the first 5 people to leave a comment telling me why they read this blog and what content they want to see in the future.

[Edit: They keep giving me more so check back here to see if I have any spares. Current count: 0... All gone for the moment, but if you add your name then I'll send you one as soon as I get some more.]

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, September 01, 2004 10:54:19 AM (GMT Daylight Time, UTC+01:00)  #    Comments [5] Trackback
# Tuesday, August 31, 2004

...that you can swap between Amazon in the US and UK by changing the .com to .co.uk as the URL query string will return the same book regardless of the site. I guess it's not rocket science when you think about it, but useful all the same.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Tuesday, August 31, 2004 5:05:29 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Tuesday, August 31, 2004 11:25:44 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, August 29, 2004

OUTPUT Clause

This one gives you access to the inserted and deleted tables in normal SQL so you can write statements like:

DECLARE @changes TABLE (
    ProjectId int,
    Name nvarchar(max),
    Description nvarchar(max)
);

update dbo.Projects
set Billable = 1
output
    inserted.ProjectId,
    inserted.Name,
    inserted.Description
into @changes
where Billable = 0

WRITE Clause

Allows more efficient updates of varchar(max), nvarchar(max) and varbinary(max) columns. For example:

declare @update_text nvarchar(max)
set @update_text = ' ... this is added to the end'

update dbo.Projects
set    Description.write(@update_text, null, len(@update_text))
where  Name = 'Timesheet'

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, August 29, 2004 7:05:47 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, August 28, 2004

A Short History of Nearly EverythingThe incomparable Bill Bryson travels through time and space to introduce us to the world, the universe and everything. -- Amazon

I have never read anything by Bill Bryson before as I'm not really into his usual genre of travel writing but I was given this by a friend. In short, it's a great book - I was hooked by the end of the introduction where he describes his early experiences with a textbook containing a cut-away of the earth illustrating the earth's interior. He asks "How did they know that?". A question which resonates from my own school years, where teachers would often avoid the question or provide some unconvincing answer. The book promised to provide some real answers.

As for the "nearly everything" description, he is not wrong. The book covers some five hundred years of scientific history and touches on subjects of cosmology, maths, physics, chemistry, geology, vulcanolgy and biology. We learn how to build a universe, how to measure the size of the earth, what the inside of an atom is like, how mountains are created (and destroyed), the precarious nature of life and how we came to be.

The whole text is littered with little tidbits of curiosity; like the person who really discovered something as opposed to the person given the credit and the back story to each scientific breakthrough. He must have expended a huge amount of energy to get all this in. All of this is told in a witty style that makes compelling reading.

This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, August 28, 2004 2:57:01 PM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback