Hi! Tom doesn't post here anymore. Please go here to see new posts.

Thursday, September 16, 2010

The Importance Of The Robots NoIndex Meta Tag, Or: What’s The Opposite of SEO?

I'm not much into SEO (search engine optimization).  It's a booming industry for some, but I still have this crazily naive idea that good content will just naturally rise to the top of search results.  That said, there are a some basic SEO guidelines that I try to follow on my site.  When I recently discovered my site was disappearing from Google results, I learned a very important SEO lesson.

Read more…

Monday, June 22, 2009

That Mysterious requirePermission Attribute

I started upgrading an ASP.NET 1.1 project to 2.0, and I got this error: "Unrecognized attribute 'requirePermission' (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 14)"

Read more…

Wednesday, April 8, 2009

Get Microsoft Virtual PC

I've heard about "virtualization" for years, but I never thought it was anything I needed to worry about.  I just thought it was something for network engineers to tinker with in big, expensive data centers.  It turns out there are plenty of handy uses for virtualization, using Microsoft's Virtual PC, in your everyday computing life.

Read more…

Thursday, March 12, 2009

Development Software I Use Now

I’ve setup a new development PC, so I thought it was time once again to review the software I normally install and use for development (I last did this in December 2007).

Read more…

Tuesday, February 17, 2009

How to Rename a Windows Service

I came across a situation where I wanted to rename a Windows service that had already been installed.  (In this case I wasn't able to rebuild the application to alter the service installation properties, which would of course be the ideal solution.)  Google was spectacularly unhelpful, so this is how you do it.

Read more…

Friday, November 21, 2008

When It's Okay To Use C# 3.0 var

I ragged a little bit on "var" a while ago, but there are some cases where I think it's a handy shortcut.  Those being when it's abundantly clear what the underlying type is, like when creating new objects.  For example, it makes perfect sense to change this.

Read more…

Wednesday, November 19, 2008

CookieContainer, HttpWebRequest and Secure Cookies

I ran across a troublesome problem that took several evenings to debug.  I couldn't find a solution with Google so maybe somebody else will benefit from this.

Read more…

Tuesday, November 11, 2008

Disabling Pluralization in Visual Studio

I noticed with some concern that the Visual Studio 2008 designer puts an "s" on the end of table names when it builds LINQ to SQL classes.  If you want to disable that, open Tools/Options, go to the Database Tools O/R Designer page, and change "Pluralization of names" option to false.

Read more…

Saturday, October 18, 2008

New Collection vs. Collection.Clear

Quick, which one of the following implementations is faster to use in a time-critical section of code.

Read more…

Friday, September 19, 2008

Finally != Inevitable

For future reference:  I had always heard that there were cases where finally blocks were not run.  The other day I actually witnessed one of those situations:  In a .NET console app, if you hit CTRL-C to exit the application, finally blocks are not executed.  Fortunately garbage collection will still handle standard cleanup of objects for you (at least I assume so).  But if you need to do something special you have to use the System.Console.CancelKeyPress event, like so.

Read more…

Sunday, March 9, 2008

NAnt MissingManifestResourceException Tip

With NAnt 0.86 Beta 1, I found that I couldn't use the <resources> element to include *.resx files in my <csc> task. For example, this didn't work.

Read more…

Sunday, February 24, 2008

Sharing Files Between ASP.NET Projects

These rambling thoughts document my search for a way to share files between Visual Studio web projects.

Read more…

Monday, January 7, 2008

Excel Spreadsheet Table Names

If you have the unfortunate need to use an Execute SQL Task SSIS component on an Excel spreadsheet, make sure you specify the worksheet name as "[Your Sheet 1$]" in the FROM clause of your SQL statement. I spent a while trying to track down the correct format, as it is not at all obvious from the error messages that result if the name is wrong. (No, I don't often work with Excel spreadsheets as data sources and I hope I never do again.)

Thursday, November 22, 2007

String Comparison

There are a bunch of different ways to compare two strings in .NET. Periodically I ponder which one is "the best." As with most things in programming, it's largely a personal preference.

Read more…

Monday, September 10, 2007

MySQL charset parameter

Just in case you don't know, in order to store UTF8 characters in a MySQL database, you have to add a "charset=utf8;" parameter to the connection string when using the MySQL .NET Connector. Otherwise you will get very frustrated. Also don't forget to set the field's character set and collation to utf8 too.