Friday, December 21, 2007

Installing Vista Language Packs Take a Long Time

I've been doing some locale testing on Vista and needed to install a language or two. Rather than just install the languages I needed for the test, I decided to choose all the language packes available from Windows Update. Big mistake as it turns out. Unfortunately, I didn't run across this until I'd let the system run overnight (and still not finish).

From now on, I'll take the advice -- install one language at a time.

Thursday, December 6, 2007

Deleting VMWare workstation snapshot faster

VWMare workstation is a product I use everyday in my development activities. I use it to create isolated debugging and testing environments. I tend take many snapshots so that I can easily rollback any changes I've made to the environment. As a result I often end up with a snapshot manager that often looks something like this:


I find that when deleting a snapshot and it's children VMWare often spends a great deal of time "cleaning up deleted files". Recently, however, I noticed that if I "Go to" a snapshot that isn't included in the set of snapshots that I want to delete things go much faster.
So in the example above, if I wanted to delete "snap 3" and its children (that is, "snap 4" and "snap 6", it will be faster to first go to "Snap 1", "Snap 2" or "Snap 5" before the delete.














Wednesday, October 24, 2007

Vista and the "Windows cannot connect to the printer" error message

Several months ago I purchased a new PC with Windows Vista Home Premium. I purchased it mostly to be able to make use of the parental control features of Vista and I'm pretty happy with it from that point of view.

There has been one nagging sticking point however. I couldn't get the Vista system to connect to a printer shared from another computer running Windows XP. From the Printer control panel I selected "Add Printer", clicked on "Add a Network Computer" and then choose the shared printer from the list. This resulted in a "Windows cannot connect to the printer. Access is denied" error message. In printing emergencies I was able to save the documents to the XP systems "Shared Documents" folders and then print it from the XP system but that is less than an ideal solution.

Fortunately, I've found a solution. Rather than choosing "Add a Network Computer", select "Add a local computer". Then click on "Create a new port" and click "Next". In the dialog box that appears enter \\ComputerName\PrinterName where computer name is the name of the computer sharing the printer and printer name is the shared name of the printer. (I found these instructions here).

Note however this won't work if you've already browsed the computer in Explorer to find out the printer name. Apparently, Vista will already create a port with that name and so the steps above will fail. So, be sure to shared the printer from the remote computer and then remember the name so you can type it in.

How to Debug with SOS in Visual Studio

Want to make use of the power of SOS (Son of Strike)? Are you a regular Visual Studio user intimidated by the relatively user unfriendly WinDbg? Tess has a post here to get you started using SOS with Visual Studio. There are also excellent references here and here.

Wednesday, October 17, 2007

How to declare out and ref parameters with managed C++

Lately, I've been using managed C++ quite a bit. Managed C++ would not be my choice for a project of any size but it's really convenient when you need to create a managed wrapper for C++ classes that you have in-hand.

The replacement syntax available with Visual Studio 2005 is much improved over Visual Studio 2003 (which was the last time I attempted to use managed C++ and so certainly isn’t news). However, I did struggle a bit trying to figure out how to declare what would be out and ref parameters in C# using managed C++.

Normally, I might use the most excellent Reflector in these cases. I just code up the construct in C#, load the assembly into Reflector and then choose the target language in the dissembler window. Unfortunately, Reflector only support the /clr:oldSyntax managed C++ syntax. Various Google searches proved unhelpful as well.

Finally, I stumbled upon the syntax for the tracking reference. Combine that with the System::Runtime::InteropServices::OutAttribute and it’s easy:

public ref class ExampleClass
{
public:
void OutParameter([System::Runtime::InteropServices::Out] String^% v);
void ByRefParameter(String^% v);
};

Simple (and unforgettable) once you know!

Tuesday, October 16, 2007

How to Read Performance Counters Without Administrator Privileges

This is mostly as a reminder to myself. Adding the user to the "Performance Monitor Users" groups, logging out and logging back resolve the unauthorized access exception with the PerformanceMonitor class when running on Vista. The BCL team blog has the source post here.

Wednesday, August 8, 2007

I'm Feeling Lucky

Jeff Atwood recently blogged about the Google "I'm Feeling Lucky" button. As a number of other comments to the post pointed out, the button is not terribly useful for general searches. However, it's serves as a great bookmark. I use it most frequently to find Lutz Roeder's most excellent Reflector tool. Just type "reflector", click the "I'm Feeling Lucky" button and I'm there.

Sunday, July 22, 2007

I don't think I'll be buying this

Does this program ("Hibernate while saving space v1.0") really do what I think it does?

I'm not going to even link to it since I don't want to raise its PageRank by even the tiniest bit. If you must, you can use this link to find it. I'm afraid to even download the software to see what it really does for fear it will infect my system with spyware.

If I understand the (nonexistent) documentation correctly, this application merely toggles off the "Enable Hibernation" check box on the "Hibernate" tab of the "Power Options Properties" in the Windows "Control Panel":


If someone knows what this program really does (rather than just what it appears to do), please drop me a comment, below.

Tuesday, July 17, 2007

Job Search Over (or How Not to Attract a Candidate)

After a couple of intensive weeks of phone interviews and on-site interviews, the job hunt is over. As expected, most phone and on-site interviews included a technical component. Questions ranged from simple by-the-book questions (i.e., "what's a virtual destructor for") to more challenging questions (i.e. "implement a function that does such-and-such").

Generally, most of my interview experiences were good. There was one exception however. I had an interviewer who didn't bother to read my resume and spent a good deal of the interview trashing technical decisions that had been made by the development team.

Interviewing is a two-way street. The company is deciding if I'll bring a skill set that will benefit the company and I'm looking at the company to determine if it's a good place to work. That particular interviewer's technique provided me with useful information, but probably not in the way the company intended.

Wednesday, July 11, 2007

Mapquest Confused and Google Maps "Gee Whiz" Feature

The job hunt has had me using Google Maps or Mapquest more than usual to get driving directions and times to potential employers or interview.

Most of my use of these driving direction web sites is for the "terminal phase" of the trip. That is, I generally know how to get from my house to the town in question so I just use these tools to figure out the last few turns. In the past Mapquest has been pretty good (picking the major roads I would have), but lately I've noticed that it picked rather odd routes. In any case, this prompted me to begin using Google Maps.

I've used Google Maps in the past, but recently I noticed a new feature with the driving directions (I have no idea when this feature first appeared). If you hover your mouse over a portion of your route, you'll get a "drag to change route" box. Dragging the box easily lets you make small tweaks to your route (for example, around construction or a closed road). The drag behavior is fast -- a testimony to the efficiency of the underlying route-finding algorithm.

Thursday, July 5, 2007

Rainy day activity

Rainy day and nothing for the kids to do?

Head on over to The ToyMaker. Click on the "Free Toys" link, download one of the many PDF files and print them out. Get out your scissors, tape and glue and start building. These are easy paper craft projects, many of which even younger kids can do. (Hint: Buy some cardstock weight paper for the printer first. Some of the projects turn out better with heavy paper).

Monday, July 2, 2007

Too much time on my hands?

Not really and I agree with Ian.

Searching for a job is way more work than an actual job. However, when I reflect back to what is was like to search for my first job (or even my last job, just about 9 years ago), I am truly thankful for today's technology. M first job hunt consisted of looking in newspapers, taking resumes to be copied, typing cover letters and mailing with a stamp. Then there were weeks of waiting for the responses.

With web-sites (such as LinkedIn, see my profile here), email and cell phones the feedback loop is much quicker. I was out of town for the first two weeks of my job hunt but still managed to conduct a number of phone interviews as well as keep up on email so that I had interviews in-the-pipeline when I got back.

Friday, June 15, 2007

Goodbye and Hello

Thunk! Splat! Swish! Plunk! That's the sound of me setting out the Welcome mat at my new blogging home. Previously, I maintained a Compuware-sponsored developer blog at http://blogs.compuware.com/cs/blogs/jstong (http://blogs.compuware.com/ is no longer on-line).

As you may or may not have heard, the Compuware\NuMega lab is no more. As a result, I find myself in need of a job and a new blogging home. So, thanks for stopping by and I hope to see you again soon.