Monthly Archives: April 2009

Moving to a new PC – Migration checklist

OK, so I have been given a new machine at work (more RAM, faster processor, more disk space) and I’m in the middle of migrating all my old data to the new box.

I’m the kind of person that will forget to move something across before blowing an old PC away, only to remember it about 30 minutes after losing it forever. For this reason, I’m putting together a list of the important things that one should copy over.

So far, I’ve copied the obvious* :

  • My Documents
  • IE, Chrome and FireFox bookmarks
  • Local MSDN image files
  • Drive-level data folders (e.g. c:\ImportantStuffForProcessXYZ)

But I was hoping someone else could suggest anything else I may have missed. Either leave a comment here, or send me a tweet and I’ll update the post for future reference.

* This is not an exhaustive list – nobody really want to hear about an obscure folder that contains my todo list, do they?

Found the first thing in Refactor! that I don’t like

So far, the latest versions of CodeRush and Refactor! have been pretty impressive.  Unfortunately, I’ve just found the first bit of behaviour that I’m not too keen on.  Take the following snippet…

foreach (MyProvider provider in lps)
{
  Console.WriteLine(provider.AccountStatus);
}

  
Fair enough. Old Skool way to write a loop, but nothing too extreme. Refactor! prompted me that I may like to “Introduce ForEach Action”. I decided to take its advice, and it turned the routine into

Array.ForEach(lps,
delegate(MyProvider provider)
{
  Console.WriteLine(provider.AccountStatus);
});

 
OK, still does the same thing, but I hate the way it looks. It’s kind of a half-way house between old-skool and lambda. This was even pointed out by Refactor! – it suggested that I “Compress to Lambda Expression”.

So I did. The result was much more pleasing.

Array.ForEach(lps, provider => Console.WriteLine(provider.AccountStatus));

Lovely.

All I’d like to see in Refactor! is the ability to go from the first snippet the the last without having to take a detour through Uglytown. Is that too much to ask?