Monthly Archives: October 2012

Finding a File in Visual Studio – the Quick Way

If you do not have Resharper installed (as I don’t on my work machine), there is a nice little nugget of goodness in Visual Studio to help quickly find a file in a massive solution.

Go to the Find in Files ComboBox, which you will find on the Standard Toolbar:

The syntax is as depicted in the picture above. That is:

>of [name of file]

When you hit Enter, the file which you select will be loaded in the editor.

Report Data Window in RDLC

This is one to jog my memory. Every now and again the Report Data window disappears when working on an rdlc report. (That’s the window with the Built-in Fields, Parameters, Images and DataSets).

To bring it back, just use the following key-combination: Ctrl-Alt-D

Being a Responsible Mentor

If you are going to jump on someone, at least make it a worthwhile endeavor.

At least do it when the person will actually learn from it. Don’t do it just because you are in a dire mood.

I used to work under a couple of people who were “past masters” at shooting down developers for no constructive reason. An example follows.

One day, when we were doing a proof of concept, I instantiated an object in a constructor to save the time of hooking up an IOC container. I then got jumped on by the team-lead when I explained that, “I used poor man’s dependency injection”. I can’t even remember the tirade, because there was nothing to be learnt from it. It was more of an exercise in solipsistic, self-indulgent ranting than anything. Somebody’s ego gave themselves the green light to knock me with their big swinging intellect.

I am reminded of this, because I just read this article by the great Dino Esposito. Let me just quote a paragraph from that article:

Because the controller class clearly has a dependency on the orchestrator, you might want to design the controller class to support dependency injection. Therefore, as a first step you abstract the orchestrator to an interface. The code above uses the poor man’s dependency injection schema (an overloaded constructor); feel free to rewrite that code to use your favorite IoC framework.

I wonder what Dino would have said if he had been on the pointy end of the ridiculous rant which I was exposed to.

People judge you at work. For good or bad. So if you are going to start swinging your ego around with no real benefit to the project, the team or the junior developer in question, prepare to be judged and remembered. Remembered as that person who didn’t really know that much, but who always had to service their insecurity with useless rants of no worth.

Updating the jQuery vsdoc File in Your ASP.NET Web Projects

Intellisense in jQuery is a treat. But what happens when you start a fresh web project and want to replace jQuery 1.4.0 (out of the box – VS project template) with the latest version? You go to jQuery.com and get the latest jQuery files. But what about the vsdoc file which gives that sweet intellisense?

This is how I do it (when I can’t use Nuget, for one reason or another):

  1. Navigate to Microsoft’s page which has links to its CDN files.
  2. Click the link jQuery Releases on the CDN where you will see text urls to the latest versions of jQuery, as made available on the CDN.
  3. Copy and paste the relevant vsdoc file url into the address bar of you browser (I use Firefox). That loads the javascipt file.
  4. Save the file to your system, ready to be added to your Visual Studion Web Projects.

Or, you could just use Nuget…