Perfil de PaulioIT BytesBlogListasScraps Ferramentas Ajuda

Blog


29 de abril

The Bozo bit

If there is one anti-pattern that I really need to keep reading is this one, http://en.wikipedia.org/wiki/Bozo_bit
I'm posting it here in an effort to remind me not to do it.
 
28 de abril

Profiling Web Projects in VS2008

I had a number of problems using VS2008's profiler today so I thought I'd share my finding to lesson the suffering for others!

I'm working on a solution with a large number of projects all starting from a web project. All of the projects are strongly named. I wanted to use 'instrumentation' in order to get the most accurate statistics I could gather.

Problem 1.
When I first tried to launch the profiler it complained that my project was signed. The problem is that instrumentation requires the profiler to inject code into my DLL therefore changing the DLL, thus breaking the signature of the code. Happily it tells you that you can use an instrumentation step to re-sign the DLL.

Problem 2.
Ok, now luckily I'd been here before (and blogged how) so I added the re-sign code and tried again. So it launched (using IIS rather than Cassini) and I navigated around the site and finished the session. However the report was gibberish and contained hex numbers and guids where function and DLL names should be, not good. So it looks like a problem with the pdbs. After setting a number of pdb locations and ensuring the pdbs were serialized correctly I finally decided that the injection of code was upsetting the pdb so I switched off signing for every project.

Problem 3.
Still gibberish. Odd. I went to the ASP net temporary files and delete the lot. Re ran it and hurray something that looks like a profile.




27 de abril

Hard Disk noise

I've spent a fair bit of time trying to stop my PC sounding noisy. I could feel that the hard disks were vibrating and that was probably the cause. The disks had been pretty close to silent (through carefull buying) but for some reason that were now noisy. So I bought the Nexus DiskTwin hard disk cooler and vibration dampner. Is a pretty standard fair where you install your 3.5 disk into the 5.25 bay but with a large chunk of rubber and metal heat sink to make up the difference. But which out of my 3 disks should get the 5.25 treatment? I took the power out of all the disks and put the back trying out all the permutations. Odd thing was that when 2 of the 3 disks were installed is was pretty quiet, with all 3 the vibration came back. So I can only assume that the combination of disks is just enough to catch some sort of re-inforced feedback and cause the vibration. So I decided that I should keep the two Seagates together since they use the same hardware and hopefully would create the same frequency of noise and isolate the Samsung. Installing the Nexus was easy enough but it was wan't without an annoying problem. My case uses runners to easily fit disks but the screw positions are not flush to the end of the drive like you'd expect from a 5.25 drive. Consequently the disk won't fit into the rail guides and therefore I was forced to remove 2 drive bays to make room for the one disk. Was it worth it? Well the horrible vibration has died down a bit, and is close to silent with one of the drives goes to sleep so overall it was worth it to reduce the noise even if it hasn't cured it. But at least I've got a good idea what I need to do now...get rid of one of the drives!
 
 
03 de abril

Set Focus plea to web developers

This is a plea to you web developers out there, and that includes those responsible for this site too! If you write a page, typically I'm thinking of a logon page, and you want to set the focus to a particular text box please write it correctly. It is very annoying that as the page renders the text box is available so I start to enter my password only for the document load to eventually fire and the code either resets the password text and/or places the insertion point at the start of the text box. This is very annoying, check what's happening to the text box before assuming it is empty!