Policy Inject Me

I just started using the Policy Injection Application Block from Microsoft’s Enterprise library. At first, I thought it was worthless and overly complex. I was wrong. It is a very powerful programming tool that allows me to develop a lot faster and cleaner. Policy Injection is similar to aspect-oriented programming in that it helps to break away cross-cutting concerns (authorization, logging) from the actual business logic. And yes, I basically copied that from the documentation. »

IIS and Unknown MIME Types

Today I encountered a very weird issue with IIS 6.0. I added an ISO file to a website, and every time I tried to download it, a 404 error was thrown. After some googling, I found that the problem was because the ISO extension has no MIME type in IIS 6.0. Why IIS throws a 404 (Not Found), I don’t know… »

Brian Hartsock

YSlow

I know I am probably the last person on the web to find this, but YSlow is a sweet Firefox/Firebug plugin for analyzing web site performance. It basically analyzes the best practices Yahoo laid out for speeding up websites. Nifty tool, go download it. Word to Bulman who never informed me of it. »

Pleasant surprise...from Microsoft?

After almost a year, my time had come. A couple days ago, I went to turn on my XBox 360 and received the red circle of death. Unlike Nintendo, no amount of blowing on the cartridge was going to fix this (…that’s what she said). I knew Microsoft would repair it, but I was dreading the repair request process. After attempting to request the repair online, with little success due to 500 errors on the XBox website, I decided I had to call. »

Brian Hartsock

NHibernate Users Group

Check out the NHibernate users group. So far, it looks very active and filled with tons of information. »

Brian Hartsock

Clash of the Titans

Ten years ago, Java was the next big thing. It had portability and was purely object oriented, both of which were needed at the time. Today I found an article discussing Sun’s recent acquisition of two Python developers. Their main goal is making Python work on the JVM. This go me thinking, is Java trying to play catch-up to .NET? Don’t get my wrong, I know Java is a very widely used platform, but what has really changed in the past few years with Java? »

MySQL issue with UTF8 and large indexes

Today I ran into a very annoying MySQL issue. Basically, I can’t create a multi-part unique index for one of my tables because I get the following error. Error executing SQL commands to update table. MySQL Error Nr. 1071 Specified key was too long; max key length is 1024 bytes At first, I was very confused because the multi-part index was only two VARCHAR(255) fields, which by my guess should only be 510 bytes. »

Brian Hartsock

NHibernate O/R Mapper: Part 2

In a previous post I talked about my first impressions of NHibernate. Not a whole lot has changed since then, except I have learned a lot more. But, I said I would discuss what I didn’t like about NHibernate so here it goes. Session Management The biggest thing that I don’t like is the session management aspect. Although I have come to understand why NHibernate sessions are so valuable and critical to its functionality, it doesn’t stop the fact that persistent objects are tied to a single database. »

Subversion and Bi-directional merging

UPDATE: SVN 1.5 gets rid of the need for this. I haven’t actually experimented much with it yet, but this article explains reintegration. Much simpler than my method. Hopefully it works Since I started working at Mailtrust Subversion and Trac have become my best friends. Due to the intense usage, I have figured out a couple tricks. One of the biggest ones is how to properly do bidirectional merging. Subversion works great for small applications, but once an application grows large enough to need many different branches with many different developers, it can become very cumbersome to use. »

Brian Hartsock

App.config in NUnit

One problem with NUnit is it doesn’t necessarily test an application, but a library. This means that each test project is inherently an application, which needs a configuration file. NUnit’s way of looking for config files is a little odd, but according to this article, all it does is search for the DLL’s name with a .config extension in the output directory. Following the aforementioned article, creating a post build even to copy a config file from the project directory to the output directory solves this problem. »

Brian Hartsock