House for sale

Looking for a property outside of London, near Leatherhead, in leafy Surrey? Why bother with pesky estate agents, go straight to the source.
Why not take a look at this house for sale in Bookham 

www.paddockview.eu

 

Fitting AMD X2 4600+ Dual Core

Since Intel have released their latest Dual Core range AMD have slashed many of their prices. So I thought this was a good time to replace my year old (!) AMD 64-3200 with a shiney new AMD 64 X2 4600+.
 
The processor arrives a neat little box with a fairly hefty heatsink, fins, copper pipe and pre-applied TIM (Thermal Interface Material). Reading the instructions it all looked pretty simple so I set about uninstalling the existing processor.
 
Sweat #1. The retaining bracket of the existing heatsink is set into place with large plastic arm, unlocking this arm proved to be the first stage of making me sweat. Pulling the arm up is supposed to free the bracket, however the arm started to bend rather than turn. So after inspecting the bracket I managed to free the bottom end of the bracket which allowed the arm to easily swing free.
 
Sweat #2. The existing heatsink came away but become stuck on the second bracket location point. Not sure why, my view of this point was hindered by the PSU but with a bit of fiddling it eventually came free
 
Sweat #3. The last processor I’ve removed by hand was a 486Sx so this was all pretty much new to me, however it seemed simple enough. Pulling up the processor retaining arm was easy enough. I tried to pull the processor out but it wouldn’t budge. I wasn’t convinced the retaining arm was up properly so pulled it a bit harder. Suddenly the processor bay moved down a couple of mm <gulp>. Ok looks like it should do that since the processor was now easy to lift out. Hurray, stage 1 complete…uninstall successful
 
Sweat #4. After carefully removing the new processor from its packaging, whilst hanging off the grounded radiator, I carefully position the CPU over the slot. "Hmm, how am I going to line this up correctly with the…plop". The CPU went straight into the slot with zero fuss. Retaining arm down, job done.
 
Sweat of sweats #5. So far so good, now came the biggest battle…fitting the new heatsink. I carefully positioned the heatsink of the processor consious of getting the square of TIM to line up with the processor. If fitting in nice an easy. Now for retaining clip #1, "click". Retaining clip #2, "come on you s**", "come on…", motherboard creaking, "come on!". No joy. I took the heatsink back off and tried again at least another three times, each time looking dispearingly at the smudged TIM. For some reason I just couldn’t get both clips on. Eventually I resorted to brute force (and a fair dollop of ignorance) and finally "click"…hurray!
 
I’ve been reading a few stories about people having to re-install XP after fitting a dual core so with some trepidation I switched the machine back on. The BIOS startup showed the correct processor and continued to load XP (still holding breath). XP started fine, a ‘new hardware’ dialog popped up installed a new driver and everything was fine…or was it?
 
First things first, I took at look at the CPU temp’ probe. "32C", ok. "35", Huh. "40", hmm. "47", gulp. "50", eek. "47, 45, 47". Ok stabilised at high 40s, even for a dual core that seems a tad hot for doing very little. So I ran a performance benchmark and it seemed to be about 12% quicker – ho hum. The really odd thing was that Cool n’ Quiet utility was showing the processor to be constantly max’ed out. So after a little forum searching I found that I was running the Microsoft rather than AMD drivers.
 
Sweat #6. Tried to install latest drivers, "you must uninstall previous version". Ok, uninstalled previous version. Installed new version, "Fault, could not find necessary file". Oh no, so I’ve uninstalled some driver I didn’t install in the first place and the new ones won’t install. Rebooted and everything seemed fine. Tried to install the new drivers and it worked. Rebooted and Cool n’ quiet (CnQ) started working, also the usuall 4/5 second startup pause in Windows was gone. So it now seems like XP understands the dual core better and core temp was now stable at 32C (although under server load 47C) – better. However, re-running the performance test with CnQ the machine was now slower than it was with the 3200! So I’m little puzzled by that, perhaps the performance tests don’t enjoy having CnQ on.
[Edit remember to switch the Power Option scheme to minimal to get CnQ to work)
 
So overall upgrading from a 3200 to a 4600 was ok, the CPU temp has risen under load but but the rest of the temp’s have remained about the same. The performance doesn’t seem to be good when using the benchmarking tool ‘PerformanceTest’, but it does feel quicker to load the initial drivers and the like. Plus there isn’t the usual start menu lag when another application is opening. So it does feel much more like a true multitasking environment rather than time-sliced. One of main reasons for going dual core was to use Microsoft Virtual Server. It does seem to work better with dual core, still not as good has having the proper server but it doesn’t seem to "drop out" quite as much as it did before. For purely scientific reasons I now need to load up a few FPS games, just to see if there is any performance difference you understand.
 
 
 
 

Remote Desktop, Restarting in Console Mode

Remote Desktop is a fantastic way of using a remote Window machine. The biggest problem with it is using Visual Studio on a Windows 2003 machine. For some reason, probably something to do with clashes with the console session, Visual Studio runs very slowly. The workaround is to use the /console flag when starting remote desktop, this works like XP and takes over the machines desktop console session rather than creating a new "background" session. However, the problem here is that it seems almost impossible to ask the machine to restart or shutdown. The only way I’ve found of doing this is to issue shutdown -i from another machine (could be your remote desktop client) and make sure you don’t have "warn users" checked, that seems to do the trick.
 
[Edit] To use console mode when using a Mac as the the Remote Desktop client you must hold Apple Key down whilst pressing connect

Toolstrips and Application Settings

I’ve not really spent any serious time writing a Windows Forms application in .net so I decided to see what’s changed.

The first thing that struck me, and subsequently consumed all of my time was the seemingly simple concept of a menu and tool-bar, or in .net terms MenuStrip and ToolStrip. Back in the day creating a menu was a basic affair, you said you wanted a menu and one would appear at the top of the window that you could change using editors of varying capabilities. This time I double clicked the menu control and the menu embedded itself within a container half way down the page. Now I’d also been playing with docking and anchoring so try as I might I couldn’t persuade the menu to appear at the top, it was always below another container. At this point I realized that I needed to get my head around the ToolStripbusiness, and so follows my tiny guide to using menus and toolbars.

1. The Tool Strip Container

Start off dropping a Tool Strip Container on the form, this allows the user to move any menus or toolbar to whatever edge of the screen they so desire.

2. The Status bar

Drop a status bar control inside the Tool Strip Container and dock it to the bottom of the container

3. Menu & Toolbar Strips

Drop a Menu Strip inside the Tool Strip Container followed by a Tool bar strip. You may want to use the smart icon to automatically insert the standard menus and buttons. I’d also recommend setting the “GripStyle” of the menu to visible.

4. Dock the Tool Strip Container

Set the docking mode of the container to “Full”.

You should now have the basis for a standard form where the user can drag the menu or tool strip to any of the edges of the window. The next trick is getting the application to remember where the user has left their toolstrips, this brings into to play the concept of Application Settings. In Visual Basic 6.0 saving user preferences was done via the SaveSetting and GetSetting API. This vanished with .net so I wrote a little wrapper for Isolated Storage to do pretty much the same thing. However, .net 2.0 introduces the ideas of Application Settings and User Settings. It’s a good concept, not only can you ask a form to save the settings you can also ask it to reload the last set or even reset to the default values, powerful stuff. So I can finally throw my Isolated Storage wrapper away, but I was still faced with the tedious job of storing the location of these ToolStrips. Fortunately before I dived headlong into grabbings lots of location details I discovered a static class called the ToolStripManager. This exposes LoadSettings\SaveSettings that does exactly what I wanted, remembers all the toolstrip location details on a per user basis. So just add;

ToolStripManager.LoadSettings(this);

ToolStripManager.SaveSettings(this);

 

To your Form constructor and FormClosing functions respectively and the user preferences will be adhered to. However, ToolStripManager doesn’t support the Form’s Application Settings concept of Reload or Default. Reloading isn’t too difficult, since the save takes place only when the Form is closed you can simply recall LoadSettings and it resets to the last known settings. “Default” is a bit trickier, you need to put the ToolStrips back to they way they were when the user first opened the application. As the application author I knew where they should go, but how do you tell that to the application? I guessed that the trick was to add the controls to the ToolStrips Container.Controls property, or in my case;
toolStripContainer.TopToolStripPanel.Controls.Add

This worked fine, the TabStrips would all appear in the top container where they started life, but not quite. The order of the TabStrips was seemingly random, no amount of reordering or setting of indexes would provide a constant result. Reading a bit more I discovered that I should be using Join and not Add…it’s so obvious(?). Join allows you to specify the row in the container you wish the ToolStrip to appear, therefore allowing me to consitantly display the menu before toolbar.
toolStripContainer1.TopToolStripPanel.Join(toolStrip, row);

 

NB. Development Gotcha

During development of the the menu my SaveSettings kicked in and saved my new menu in the wrong position. Therefore whenever it loaded the settings back my menu would be incorrectly layed out. To fix this you have to navigate into your own document store and alter the settings XML by hand, usually located in something looking like:

<drive>:\Documents and Settings\<account>\Local Settings\Application Data\<application name>

 

Talking about Testing for Safari when you don’t have OSX

 

Quote

Testing for Safari when you don’t have OSX

Developing using Microsoft technologies can make it expensive to test your site for other browsers and platforms. IE, Firefox and Opera can ease (or maybe that’s make things harder) to test your site. However, the big bugbear is OSXs Safari. Well until the OSX86 project managers to make it legal to run OSX on any PC I think it boils down to…
  1. Buy a Mac – nice if you afford it
  2. Use a screen shot service – pain to use if your site has any kind of dynamic changes, lets face it they’re a pain to use full stop
  3. Use another KDE based browser

Option 3 is the one I’m currently recommending. Safari is based upon the KDE browser engine, so why not use another browser that uses the same fundamental rendering engine, e.g. Konqueror. Well, the first problem is if you’re running Windows there currently isn’t a version for good ole’ Windows. The answer is turn to Linux, well sort of. My advice is to get hold of the VMWare player with a downloaded image of your favourite flavour of Linux, mine is Ubuntu (if only for the name). Install Konqueror and off you go, Safari like browsing without OSX. It’s not a 100% guarantee, but you’ll iron out the most obvious problems.

 

 Well I’ve since learnt that this isn’t as useful as it first seems. I’ve now had two occasions when Konqueror as done some odd (or not worked at all) and Safari has been fine. So…accept no substitute!