thefrozencoder

Programming and Technology blog

When refactoring goes bad

So I ran into this little nugget this morning while working on a C# WinForms project in VS 2008 (might be an issue in VS 2005 as well).

Compiler Error: The item "*.resources" was specified more than once in the "Resources" parameter.  Duplicate items are not supported by the "Resources" parameter.

Seems that when I copied an existing form and renamed the copy to something else (using the properties window) the refractor tool decided that the source form name needed to be changed as well.  Apparently this is a common issue as I did a search for the problem online.  Normally when you do a rename in a code file you get the option to preview the changes and apply what you want to.  If you do this in the properties window or rename a class file in the solution explorer it seems to just make the change without a preview and globally.

I think that I need more control with this feature so you can turn this off in the IDE under Tools (for VS2008):

  • Options
    • Windows Forms Designer
      • General:
        • Set “EnableRefactoringOnRename” to false.

Doing this still allows you to do your refactoring (via the context menu) but now you have more control over what gets renamed.  And as an added bonus it's also a performace tweek to the IDE.

HP Pocket Media Drive

A couple of weeks ago I purchased a HP Pocket Media Drive Model: PD2500s as a way to store large files (iso, vhd, gho, etc.) so that when I can:

  • Have a place to store my Virtual Hard Drives
  • Have a place to store my CD images
  • Have a place to store the last image of my laptop incase I need to restore
  • Have a quick place to do one off backups
  • Have a device that is small enough and large enough to store extra files I ma need on the road

So far the unit has performed flawless, I have no issues running my VM's or mounting ISO's from the drive and I don't really notice any performance issues.  The drive itself is pretty compact (being a 2.5" drive) and the case only adds about an inch more to the over all length of the drive.  The only issue I have is not with the drive but with the cable that came with it.

Most generic 2.5" drive enclosures come with two separate cables, one for data and one for power.  This drive comes with one cable but has two USB ends and one end that plugs into the drive (see Picture below).

 

The issue is the two plugs need two USB ports closer than 6.5” inches or you are forced to purchase an extension cable.  This is probably fine for most tower setups but a lot of laptops (older ones) don’t have two USB ports that close together.  Fortunately my HP does but I can see how this might cause issues for users who may have an older laptop.

Site up up up and away

Finally got a real site up, decided not to roll my own but try out a ready made blog engine.  I already rolled a home brew site willyd.ca which I will be slowly moving away from that site over time.

I have added some of my tech blogs from my other web site just for content, look for some interesting topics and items soon.

USB Flash Drives ...

Here in Canada Best Buy is selling 8GB USB Flash Drives from Duracell (who knew they made USB drives) for $19.99. Now I have seen drives of this size cheaper but to come from a "known" name brand like this made me wonder how good the drive actually was.

When I got home I tested the Read/Write speed using the USB Flash Drive Tester (found here). I also tested my 4GB ScanDisk Cruzer Micro as a simple control. While I am not sure if having two drives of different size matters the results were:
  • Duracell
    • Write: Tested total 7645.999MB in 0:11:52 with 10.741MB/s
    • Read: Tested total 7645.999MB in 0:08:59 with 14.177MB/s
  • ScanDisk
    1. Write: Tested total 3919.840MB in 0:14:46 with 4.431MB/s
    2. Read: Tested total 3919.840MB in 0:07:56 with 8.234MB/s
While I am not sure how acurate my tests were but it does make you wonder just because it is cheaper is it really cheap?