Jan 22 2010

My Crash Course In High Performance NHibernate

It’s never good when your boss appears in your office unexpectedly to tell you that the deadline you thought was a few days out is actually tomorrow. It’s also not good when it happens right after your analyst informs you that the system you thought was producing valid output was actually built on an oversimplification that was only just discovered. It’s especially bad when the model you’re working against is supposed to be crawling a payroll system with insufficient metadata to support the busi... [More]

Tags:

Oct 22 2009

Simplify jqGrid JSON Generation

Category: .Net Framework | Web DevelopmentAlexRobson @ 15:09
So I’m trying to learn this jqGrid thing and so far it seems pretty cool but one thing was really bothering me: every example I saw that was using JSON was using anonymous types to create the required JSON format. Yuck city. Yes. I’m insane and whiney but there’s method to my madness. Here’s the anonymous type approach: var jsonData = new { total = totalPages, page = page, records = totalRecords, rows = ( from record in records s... [More]

Tags: ,

Oct 22 2009

The Bourne Framework – A High Level Introduction

Category: .Net Framework | Open SourceAlexRobson @ 03:16
For a little over a month now, I’ve been contributing to an open source project started and architected by Evan Hoff. After the week of the project, I started bugging him about when I could blog about the project. The project is called the Bourne Framework, and it’s changing the way I write code*. The one thing I should make abundantly clear is that Bourne is new and subject to change. The good news is that it’s also very usable in its current state. Technology Stack A lot... [More]

Tags: ,

Oct 16 2009

ASP.Net MVC 2 Preview 2 Installation Issue

Category: .Net Framework | Web DevelopmentAlexRobson @ 09:28
Thanks to some help from Elijah Manor, I was ready to pull down the Preview 2 installer for ASP.Net MVC 2 and play around with the new features over the week-end. Long story short; there are some people born lucky, and I am not one of them. The installer kept tanking hard telling me that I was missing important system updates and that the installer couldn’t continue without those. Say what? After messing around for a bit, I remember having other issues due to my (foolish?) decision to install t... [More]

Tags: , ,

Sep 14 2009

Installing WCF Activation on Windows 7 with VS 2010

Category: .Net FrameworkAlexRobson @ 17:34
I’ve had a problem on my most recent Windows 7 install with getting the WCF activation to install. I kept getting errors which told me that an error occurred and some of the features were not installed and then I was prompted to restart now or later… Well, great as that was, I was sort of hoping to find a solution… Thanks to Stack Overflow and Jörg Battermann, I just found the following post here. The short of the post is that installing VS 2010 replaces a file (SMConfigInstaller) which is requ... [More]

Tags: , ,

Mar 7 2009

Create Dictionaries From Two IEnumerables With Zip In .Net

I've been borrowing some functionality from our Haskell brethren (thanks to Jeff Cutsinger for enlightening me). There is a function in Haskell called Zip; you can see the Haskell documentation here. It essentially creates a Tuple, which is basically a generically typed, primitive data structure used in Haskell to return multiple values from a function, which, in the case of Zip, would be composed like a key-value pair. I keep running into instances in .Net where I need to take two li... [More]

Tags:

Aug 25 2008

Translate List<A> to List<B> With LINQ

Category: .Net Framework | TipsAlexRobson @ 17:23
Let me just skip to the fun bit that the title promised before going off on some rant-flavored-jelly-filled-technical-jargon-journey that you really didn't pay for. If you have a generic List of type A and you want a generic List of type B, AND you know A can be cast as B then you could do the following: List<B> TranslateList<A, B>(List<A> listofATypeThingies) { List<B> listofBTypeThingies; foreach(A item in listofATypeTh... [More]

Tags: ,

Jul 26 2008

Faster Than Reflection - Lambda Almighty

Category: .Net FrameworkAlexRobson @ 10:22
In my previous post Using Lambdas To Write A Faster Factory I was demonstrating a neat use of lambdas in conjunction with a dictionary to create a concise and quick factory pattern. Since then I've found some other really nice uses for lambdas and stumbled across some other LINQ related goodness. In this post, I'm going to demonstrate a way to use Lambdas in place of reflection for reading and writing values at runtime and run some performance numbers by you. In order to do this, let's def... [More]

Tags:

Jul 23 2008

Using Lambdas To Write A Faster Factory

Category: .Net FrameworkAlexRobson @ 00:07
How to implement a factory using a dictionary and anonymous functions (via lambda expressions) [More]

Tags: ,

Jul 16 2008

Eliminating Nulls

Category: .Net Framework | Best PracticeAlexRobson @ 14:51
Why eliminating nulls from the code base and database is best practice. [More]

Tags: ,