ReSharper Tip: Go to File by Name

This is one of my favorite little ReSharper features that took me a while to discover and fully appreciate.

Let's say you're working in a huge application with a deeply nested directory structure.  You're chugging along, editing some arbitrary file somewhere.  Ok, now you're ready to jump to some other file in your application and read some code or make some changes there.  The things is, you only kind of remember the name of the file, you don't really remember which folder it's in, and you really don't feel like digging through the whole folder structure of your application to find out where the file is hiding.

In comes ReSharper's "Go to File by Name" feature to save the day.

Let's say that file you're looking for is a master page, and you think it's name starts with "Guest".

Hit Ctrl+Shift+N and start typing "guest".  You'll get a list of all the files in your application that start with "guest".  Now just select the file you're after, and bam!  There you are.

screen1

Let's say you know that the file you need is a master page, but you don't remember anything else.

Hit Ctrl+Shift+N and start typing ".master".  Unfortunately, since the file name obviously doesn't start with ".master", ReSharper can't match any files, and you see that the text turns red.

screen2

But, thanks to a little feature I discovered recently, you can type an asterisk ('*'), and ReSharper will treat it as a wildcard.

So, try your query again, but this time type "*.master".  Now you'll see a list of all the master page files in your application, and you can easily locate the file you're after.

screen3

Obviously, this is only a very simple example.  I'll leave it as an exercise to the reader to imagine all the various ways that this could help one to locate arbitrary files in a large application.

Enjoy! (And get ReSharper if you don't already have it!)

Dear Twitter

I mean this in the most constructive way possible: Why is your Facebook application such a piece of crap?

I love the idea of your Facebook application so much.  But in reality, the application is so unreliable that it's essentially worthless.

How much of a priority is it for you guys to fix this thing?  Facebook is so hot right now, and I'd think the number of users you turn off because of the terrible quality of your Facebook application would be unacceptable to you guys.

Please keep in mind that I'm only writing you now because I love you, and I'm hoping against hope that you will someday get your act together.

Your loyal fan,

Matt B.

Problems Debugging ASP.NET Apps in Vista

I was having an extremely annoying problem while debugging an ASP.NET app in Visual Studio 2005 under Vista.

It'd set a break point in my code and start debugging the app.  After stepping through a few lines of code and stopping to ponder a particular line, Visual Studio would suddenly exit out of debug mode, and I'd be unable to continue stepping through my code.

After googling around for a while, I finally found the answer to my problem in the ASP.NET forums.

 

Here's the solution:

- Launch the IIS7 manager
- Find the application pool your app is running under, right-click on it, and select "Advanced Settings..."

app_pools
- Under "Process Model" find the setting called "Ping Maximum Response Time (seconds)".  Change the setting to something large.  I used "3600" (one hour).

advanced_settings
- Click "OK"

 

That's it.  No more mysterious terminations of your debugging sessions.

Use Firefox to Debug ASP.NET Apps

Did you know that you can configure Visual Studio to use Firefox when debugging your ASP.NET apps? Here's how it's done.

- Under the Solution Explorer, right-click on any ASPX file and select "Browse With..."


- Click "Add..."



- Click "..."




- Find "firefox.exe" and click "Open"



- Click "OK"




- Make sure Firefox is selected under "Browsers" and click "Set as Default". Close the dialog.





Done! Now when you debug your ASP.NET apps, they'll launch in Firefox rather than Internet Explorer.

Blog Post of the Year?

"When I told one of our users, a business analyst, that using just one field for the name meant a huge amount of work for programmers, she actually asked me what our job was, if not to do the work that makes users productive. I’m very much afraid that things are out of hand. I tried to explain how our database schema works, and so on, but she impatiently insisted that it was our job to make things work."

I've been reading blogs like crazy this year, and I can say, with no exaggeration, that this may be the best post of the whole lot.

Reg FTW!

Multiline String Literals in C#

That little @ is even more magical than I thought.

C# still has a few surprises left for me.

RESTful Wankery

"An insider at MyTube tells us confidentially that they get up to 100 users before the system slows to a crawl, causing bored users to delete random files from their servers by requesting well-formed URLs like http://mytube.com/database/delete and http://mytube.com/debugger/start. 'It's just so rude', MyTube engineers were overheard saying in their Atlanta office. 'Some of our users are just plain wankers.'"

- Steve Yegge