Shop with Wiggle sports shop and raise money for charity!!!
by caveman_dick on Aug.25, 2010, under Uncategorized
If you haven’t heard on the 3rd-5th Sept I will be cycling from London to Amsterdam in aid of the charities “Hope and Play” and “Action for Children”.
To aid with my fundraising, I recent just negotiated with my favourite online Cycle store Wiggle to get 10% cashback of anything you buy on the site for 3 months after you create a new account!!
To setup an account and make your purchases use click on the banner below.
Please Note: This offer will only work if you setup a new account. If you have an existing account with wiggle you will need to setup another account for the money to go to the charity.
If you are not very sporty but still want to donate, you can use my fundraising page here: http://www.virginmoneygiving.com/team/haysL2A

www.wiggle.co.uk
Headphone volume issue on HTC desire after upgrading to froyo
by caveman_dick on Aug.11, 2010, under Uncategorized
So I went ahead and upgraded my mobile with the OTA update that has showing on my mobile. I wanted to upgrade ASAP due to the fact that I have run out of space for apps on the internal memory and this upgrade will resolve it (apps can be moved to the SD card).
However I think I may have jumped the gun as now whenever I use headphones the volume is stuck at max and even when the phone software says the volume is silent it’s still blasting out!
Unfortunately spotify doesn’t have an internal volume control at all so it’s a no go there too.
I’ve had a search on Google and it looks like people are not experiencing the exact same issue, however there are a lot with issues with the volume in some way or another.
Hopefully this will be fixed pretty quickly as it now makes the phone unusable as a media player and I have to go back to using my iPod.
In the meantime if anyone finds a solution to this please let me know!
UPDATE: After searching for a resolution to this and not coming across anything much I managed to find someone saying recessed headphone jacks are quite problematic. The Desire doesn’t actually have a recessed jack but I do use a silicon case that makes the jack a bit recessed. This has not been a problem before, but I thought I’d give it a go without the case. Low and behold the volume buttons seemed to be working fine. I thought this was a bit strange so out the case back on and what’s even stranger is that is still worked fine. Now I have no idea why this happened and to me it seems a bit strange that this would even cause it in the first place (I would assume that it would be lower in volume or only one channel). Unless of course I came across a bug that has a 1 in 1,000,000 chance of hitting. Anyway I’m glad it’s working now!!
London To Amsterdam bike ride 2010
by caveman_dick on Jun.29, 2010, under Uncategorized
Basically I’m on the scrounge for sponsorship. On Friday September the 3rd, along with 100 other riders I will be participating in a bike ride to raise money for the charities “Hope and Play” and “Action for Children”. Over 3 days we will be cycling just over 182 miles, from Stanstead in London, to the centre of Amsterdam in Holland.
To put the distance of how far we will be riding into perspective, it will be the equivalent to doing the London to Brighton bike ride, every day for just over three days.
Here is how we will do it
Day 1:
Stansted Mountfitchet to Harwich – about 110km (68 miles) though undulating Essex countryside. At 9.30am we will leave Stansted Mountfitchet where we will make our way to Harwich.
Day 2:
Hook of Holland to Heemskerk – about 135km (83 miles) up the F1 cycle path on the Dutch coast. We will disembark the ferry at around 7.30 and straight onto the cycle path up the cost. Heading through the Kennemerduinen Nature Reserve we will make our way to Heemskerk.
Day 3:
Heemskerk to central Amsterdam – about 50km (31miles) This will be the final stage of the ride and will take us nicely in to the centre of Amsterdam
You can sponsor me at virgin money giving, http://www.virginmoneygiving.com/team/haysL2A . Any donations, no matter how small will hopefully help me reach my target of £500 of which all of it will be going directly to the charities as I am covering the £290 trip costs myself.
Last but not least, no we will not be cycling home!!
Thanks in advance for your generosity.
Not sure if anyone actually reads my blog, but anyway it’s worth a go and any extra pennies will be worth it!!!
UPDATE: If you use the below banner, setup a new account and make any purchases within the next 3 months, I will donate the proceeds to the charity page.

www.wiggle.co.uk
Bulk documenting common columns in Sql Server 2008
by caveman_dick on Jun.29, 2010, under CodeSnippets, SqlServer
Recently I have just discovered the very cool app that is DataDictionaryCreator http://datadictionary.codeplex.com/. For those of you don’t know, it is a windows application that allows you to document your database with the documentation stored as extended properties within the database itself.
Almost every table that we have in our database contains 2 common fields that have the same meaning called “CreateDate” and “ModifyDate”, I’ll leave you with the hard task of trying to work out what they are for. Anyway to save myself manually adding the same description for these I knocked up a little sql script to write the data to the db (I did cheat a bit and had a peak at the sql exported from DataDictionaryCreator).
go
set nocount on;
declare @ColumnName nvarchar (128)
declare @TableName nvarchar (128)
declare @MS_Description nvarchar (500)
declare @Debug bit = 0
declare @SchemaName nvarchar (500)
declare @CommonColumnDocumentation table
(
ColumnName nvarchar (500),
MS_Description nvarchar(500)
)
declare @TablesToProcess table
(
ColumnName nvarchar (500),
TableName nvarchar(500),
SchemaName nvarchar(500)
)
insert into @CommonColumnDocumentation
select 'CreateDate', 'This is the date the row was created. It is populated via a default constraint.' union all
select 'ModifyDate', 'This is the date the row was last modified. It is populated via an update trigger (If it is not being updated correctly please check the trigger exists).'
insert into @TablesToProcess
(
ColumnName,
TableName,
SchemaName
)
select
sc.name as ColumnName,
so.Name as TableName,
ss.Name as SchemaName
from syscolumns sc
join sys.all_objects so on sc.id = so.object_id
join sys.schemas ss on so.schema_id = ss.schema_id
where so.type = 'U'
and sc.Name in (select ColumnName from @CommonColumnDocumentation)
while exists (select * from @TablesToProcess)
begin
select top 1
@SchemaName = ttp.SchemaName,
@ColumnName = ccd.ColumnName,
@TableName = ttp.TableName,
@MS_Description = ccd.MS_Description
from @TablesToProcess ttp
join @CommonColumnDocumentation ccd on ccd.ColumnName = ttp.ColumnName
if (@ColumnName is not null and @TableName is not null and @MS_Description is not null)
begin
print 'Updating documentation for ' + @SchemaName + '.' + @TableName + '.' + @ColumnName
if(@Debug <> 1)
begin
if exists ( select 1 from ::fn_listextendedproperty (
N'MS_Description',
'Schema', @SchemaName,
'Table', @TableName,
'Column', @ColumnName))
begin
exec sp_dropextendedproperty
@name = 'MS_Description',
@level0type = 'Schema', @level0name = @SchemaName,
@level1type = 'Table', @level1name = @TableName,
@level2type = 'Column', @level2name = @ColumnName;
end
exec sp_addextendedproperty
@name = N'MS_Description',
@value = @MS_Description,
@level0type = N'Schema', @level0name = @SchemaName,
@level1type = N'Table', @level1name = @TableName,
@level2type = N'Column', @level2name = @ColumnName;
end
end
delete from @TablesToProcess
where TableName = @TableName
and ColumnName = @ColumnName
end
As always use at your own risk, and if anyone has any suggestions…
Team build fails even though the project builds fine.
by caveman_dick on Jun.10, 2010, under Problems Solved
The last few days we’ve been having a strange problem where TeamBuild on our TFS server was repeatedly failing. What was even weirder was that the solution definitely builds OK and there are no compile errors. So I started digging around in the log file and as you will no doubt know (On average mine are 3k-10k line plain text files!!) this is a rather painful task.
After quite a while looking through this it was a fruitless exercise and was no closer to find out why. Luckily I have already setup other VM build servers and these were running ok so was able to narrow it down to the TFS server itself. Next I tried deleting the BuildSources folder to see if there was any rouge or corrupt files there. Nope, not that. I vaguely seemed to remember that the Build process itself runs as a windows service so I checked that out. Was seemingly working fine but decided to give it a bounce just incase. AS always this action seems to work and the build server started working fine. I just wish I’d always remember to log-out/restart app/reboot first as this would have saved a LOT of time.
Just remember when 1st-line tell you to log-out/reboot, do it, you might be surprised!!
Using the virtual memory restriction in IIS6
by caveman_dick on May.10, 2010, under Problems Solved, Tips and Hints
We’ve been having some seemingly random performance issues on some of sites and for a while I was quite stumped. Basically every so often the website would take between 16-20 seconds to load the page, although we were not able to predict when it would happen, as it occurred on different pages within the site.
My initial thought was that it was a network issue due to the fact that it was only being reported on some sites. Luckily the company subscribes to a external monitoring service so I was able to see the sites that it was happening on and how frequently. Once I had a look there I noticed that was happening on all the sites to varying degrees.
One of the servers was taken out of the DMZ to try and isolate the issue and it was only then that I noticed what was going on. With all the other sites shut down and only one or two w3wp.exe process to keep an eye on I was noticing that one of the processes was being shutdown and replaced with a new one. Now I know that this is the what happens when an app pool gets recycled but this shouldn’t have been happening as we had only 1 scenario enabled, the virtual memory limit setting:
As you can see this was set to 250Mb and process itself was never getting anywhere near that!! In fact even before I had thought it was a network problem I did actually check for this, however with so many w3wp.exe processes (~30) it was difficult to see them recycling, and because none of them were going near my limit I quick discounted this idea! So I went ahead and removed the setting and re-ran the tests. Low and behold it fixed the issue. Now the reason I had set it in the first place was due to getting System.OutOfMemory exceptions if too many bots were walking the site at one time. This happens due to the fact that we use the XsltCompiledTransform to clean up content coming from our Homebrew CMS. This generates a lot of assemblies and hence when to much content is accessed toor quickly it runs out of memory. Initially I was wondering if there was a bug in IIS6 but it turns out that memory can be consumed directly from the swap disk completely bypassing the physical RAM and hence why the w3wp.exe never got anywhere near my limit.
Anyway in the end the fix was quite simple, just use the physical memory setting in IIS.
Using PowerShell to record ping failures to a logfile
by caveman_dick on Mar.09, 2010, under CodeSnippets, PowerShell
Recently we’ve been having some major problems with our websites not being able to connect to our Sql2008 cluster. Part of the analysis I was asked to run (yes I do seem to do everything here!!) was a simple ping test. We started off with the classic command line ping to file using the pipeline (ping IPADDRESS -t > LogFile.txt). This is good but has one major flaw, the results don’t record the date and time to file, all you can see is that it DID fail. So I decided to use my favourite scripting language to knock up something a bit better and this is what I came up with:
$showAllResults = $false;
$logFilename = "[PathToLogFile]";
$ping = new-object Net.NetworkInformation.Ping;
$minRoundTripTime = 500;
function WriteToOutput($filename, $text)
{
$text | Out-File $filename -Append;
Write-Host $text;
}
WriteToOutput $logFilename "$(Get-Date): Starting ping logging...`nPress any key to stop!";
do
{
$result = $ping.send($serverName);
if($showAllResults -or $result.Status -ne "Success" -or $result.RoundtripTime -gt $minRoundTripTime)
{
WriteToOutput $logFilename "$(Get-Date) -Status: $($result.Status) -time: $($result.RoundTripTime)`n";
}
}
until ($Host.UI.RawUI.KeyAvailable);
WriteToOutput $logFilename "$(Get-Date): Ending ping logging...`n`n";
Let me know if you have any suggestions to improve it!!
Getting Team Build to trigger a new build when you update the MSBuild file
by caveman_dick on Feb.24, 2010, under Tips and Hints
I’ve been working on getting some more builds added to our TFS server today and actually had a moment of inspiration! It doesn’t happen all that often so better blog it while it’s still fresh!
I have set-up several custom build steps that run after the normal build process has finished. These steps simply remove any files not needed for deployment and deploy to a server so it can be tested/QA. Previously if I updated the MSBuild file that handles the build and deployment (TFSBuild.proj) I had to manually trigger a build. Today I realised that if I add the folder containing the MSBuild file, TFS would automatically detect that it has changed and trigger a build!! I know it’s only a few clicks and will not save a lot of time, but everything counts!!
64-bit W360BT Bluetooth drivers for a Dell D630 laptop
by caveman_dick on Jan.28, 2010, under Problems Solved
After re-installing my work laptop with the 64-bit trial of Windows Server 2008 I was having trouble getting the bluetooth working due to a lack of drivers. Strangely Dell do not list any compatible drivers when you use the service code however after much googling (and people suggesting using Toshiba drivers which didn’t seem to work) I managed to find some, you’ll never guess where, yes the Dell website!!
The drivers can be found here.
They seem to be working so far even though the GUI comes up with an incompatible OS warning (and I use a Bluetooth mouse!).
Make sure you uninstall obsolete hardware apps when P2V’ing servers!!
by caveman_dick on Jan.21, 2010, under Problems Solved
The last few days I have been performance testing one of our websites due to a severe performance drop after migrating to a new VMware hosted environment. Admittedly the application is not a great perfomer anyway (due to IMHO major overspeccing on the application security) but there was a significant drop in performance that was causing users (and us) grief.
It turned out that IBM director was using about a constant 30% CPU whilst the box was doing anything and even though it never actually reached 100% the user experience was that of a box under full load. Once it was disabled/uninstalled the box went back to normal.
TBH this was prob an oversight on the person doing the P2V but uninstalling obsolete software is something that really should be done as a matter of course!!


