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: nhibernate
2a60c643-9434-471e-b6a7-5636afc5f1d7|1|5.0
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: jquery, c#
f285d2f3-11ae-4008-8cbe-20100e1c2126|0|.0
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: c#, bourne framework
5539f581-95db-4822-93cd-06de421f5e9d|0|.0
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: asp.net, mvc, vs2008
0e93028e-26c4-40c2-b68d-f26346ab664a|0|.0
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: wcf, windows 7, vs 2010
b3a90c50-057f-432e-81c3-be584a4ba1e7|0|.0
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:
b512252d-e7da-40cb-bf67-98c1343c18a8|1|1.0
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: .net, linq
7b5a4be9-479a-43cc-89d5-94cd48ee5f7e|0|.0
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:
59c63480-6269-4584-a8c7-cbf343a4acde|0|.0
How to implement a factory using a dictionary and anonymous functions (via lambda expressions)
[More]
Tags: lambda, dictionary
8f044d08-3925-4f03-b0e2-84e98902b010|0|.0
Why eliminating nulls from the code base and database is best practice.
[More]
Tags: null, .net
45c435a7-106d-4c96-bafa-fc0a71adbc61|0|.0