Wasabi Peas & Soy Nut Encrusted Rack of Lamb

Whenever I go shopping, I always look for products I haven’t tried before. Sometimes I discover really yummy things, and other times I discover things that stump me. Soy nuts are a food that didn’t make much sense to me.

They are fairly bland, crispy to the point of being sharp, and very dry. I tried munching on them as a snack, but it just wasn’t worth cutting up the roof of my mouth. So, what could I do with them now?
wasabi peas and soy nuts

Mix them with Wasabi peas and encrust meat, of course : ) Continue reading


Performance testing LINQ to Objects Except Method

When .NET introduced LINQ and lambdas, I was blown away by the efficiency improvements in writing code. But, after reading countless articles online about how horribly slow and inefficient LINQ (even to objects) was compared with just plain for-loops, I’ve always felt guilty about using it.

The other day, however, I wanted to see how much slower linq would be in comparing 2 lists of objects to find all of the items from list1 that were not in list2. LINQ has an extension method called “Except” just for this.

I coded the solution in LINQ, and then coded a few “solutions” using pre-LINQ techniques…spoiler alert: LINQ was the best for large sets of objects.
Continue reading


Generate MERGE scripts for all tables in a database

If you have been using the Database Projects (.sqlproj) in Visual Studio 2010 to maintain your database schema in version control, you probably need a good way to store static data for your application in version control as well. There are pre and post deployment scripts to handle that, but one of the cool things about SQL Server 2008 is that it allows for MERGE statements to perform the correct operation on the database side based on the state of the data in your target DB.

This let’s you specify what the static (also called seed, lookup table, and default) data needs to look like in a declarative way!

It’s very powerful, but often times by the time you get around to storing your database in version control, you already have tons of tables with tons of static data in there… and it would be a pain to hand-code all of the SQL MERGE statements.
Continue reading


Entity Framework Mocking template with IDisposable implementation

I’m working on a C#/.NET StackOverflow clone and wanted to create mock data contexts for unit testing with Entity Framework.

I found a great T4 template that does this from Rab Hallett’s blog, but it did not include the IDisposable interfaces used by the .NET ObjectContext.

I’ve modified the template to include these additions to the generated Mock context so that I can now use the interface in a using block.

            using (var db = DataContextFactory.CreateContentContext(_isMock))
            { //actual code goes here
            }

The entire T4 template (ContentModelGenerator.Context.tt) is on my bitbucket if you want to use it.


HEAD.JS, Twitter Bootstrap, Django, and Google App Engine… Oh my!

After watching an awesome presentation about Twitter Bootstrap at this year’s CodeStock, I really wanted to give it a try.

As with most web projects that I want to deploy rapidly, I turned to Django (nonrel) and Google App Engine and started tweaking the default template I’ve got for creating a new website. I use mediagenerator to combine all of my JS into a single minified file which I include at the bottom of the page to ensure faster load times and so that the DOM is ready for my JS.

It only took a few minutes to make the updates to my template, and then I was ready to deploy and start playing.

Continue reading


Caprese Salad (30 Day Do It – Vegetarian)

Caprese Salad picture

It’s been a week since I started eating a vegetarian diet, and I’ve had a lot of really delicious food that I would have never tried before!

So far, my favorite this week has been a fresh Caprese salad made with vine ripened heirloom tomatoes, fresh picked basil from my herb garden, extra virgin olive oil, cracked black pepper, sea salt, balsamic vinegar, and assorted olives.

This dish only underscored the importance of quality ingredients when preparing a meal : )


30 Day Do It Challange: Go Vegetarian for a 30 Days

A few months ago I watched a TED video about trying something new for 30 Days. It was an interesting idea, and I have been looking for something to try… I also love playing around with cooking different foods, and have decided it would be a great challenge to go vegetarian for the month of June 2012.

By limiting my ingredients, I hope to learn more about developing flavors without using meat as a crutch.

I created an account and group to track my progress here on 30DayDoIt.com

The 30 Day video is for reference here:


Follow

Get every new post delivered to your Inbox.