Monthly Archives: August 2009

My favorite NHibernate exception

We have a rather large, connected domain model, so we use quite a bit of lazy loading to deal with the richness all these connections provide.  The one thing I would have liked C# to get from Java is “virtual … Continue reading 

Posted in C# | 7 Comments

The WebForms stalwarts

One sentence I’d never thought I’d see describing WebForms is: It was perfect, and it’s acceptance was meteoric ! That’s from the VisiCalc-WebForms comparison of Joe Stagner.  Obviously no framework is perfect, but I wouldn’t attribute its acceptance because of … Continue reading 

Posted in ASPdotNET | 4 Comments

How to hinder reflection-based scenarios

In one easy step:  Make sure an object’s runtime type doesn’t actually match its compile-time type.  This test fails: [Test] public void HoorayNullables() { int? i = 5; i.GetType().ShouldEqual(typeof(int?)); } With a rather unexpected error message of: Expected: <System.Nullable`1[System.Int32]> But … Continue reading 

Posted in C# | 5 Comments

Getting stuck in the weeds

While plowing through some AutoMapper support issues this weekend, I got a rather troubling one, where a developer got a rather scary exception message: “Operation could destabilize the runtime” Well that’s disturbing.  It all came about because they were trying … Continue reading 

Posted in C#, Design | 1 Comment

Continuous learning and getting left behind

One of the more tiring arguments against ideas like Agile or Lean is the line of “gee, it used to be RUP, now Agile, now Lean.  Make up your mind!  I’ll come back in 2 years when it’s something else … Continue reading 

Posted in ContinuousImprovement | 13 Comments

JavaScript: A tool too sharp?

Ehhhh…no. But, Roy Osherove believes so.  When I first started JavaScript, I thought so too.  My problem was that I approached JavaScript from the eyes of a C# developer.  But C#, JavaScript is not.  So what are the main gripes … Continue reading 

Posted in C#, JavaScript | 6 Comments

Late-Bound Invocations with DynamicMethod

When I was looking at improving AutoMapper performance, I initially focused on just the “getter” side of the mapping equation.  At its core, you map between types by getting a value from one member and setting it on the other.  … Continue reading 

Posted in C# | 9 Comments

Analyzing AutoMapper performance

One of the last things I wanted to look at AutoMapper before pushing it out to production was to get some idea of how it performed.  One of the more difficult things in doing this is trying to come up … Continue reading 

Posted in AutoMapper | 8 Comments