RSS

Author Archives: Joe Heller

The Pepsi spot

Behind The Scenes

Here is a quick video of our setup for the Pepsi spot.

Location

Advertisements
 
Leave a comment

Posted by on September 30, 2011 in Artrageous with Nate

 

Tags: ,

Artrageous with Nate

The back story

About a year ago my good friend Nate Heck asked for some help filming a pilot episode for a children’s art education television show titled: Artrageous with Nate. I had recently got my brand new Canon 7D and was excited to try out the video capabilities  of the 7D. So that is what we did! We rented a bunch of gear from borrowlenses.com (lenses, fluid tripod head, Merlin Steadicam <– a giant pain to set up,  audio equipment, etc) and filmed 90% of the episode on one long weekend (3 days).  Over two more evenings we wrapped up with a few more shots in front of the green screen and then it went to post production.

The result

Despite several very long days of hard work, making episode 1 was a lot of fun! So much fun, that we are at it again…

Read the rest of this entry »

 
Leave a comment

Posted by on September 29, 2011 in Artrageous with Nate

 

Tags: , , , , ,

My Birthday Lens

EF 70-200mm f/2.8L IS II USMEF 70-200mm f/2.8L IS II USM

That’s right Canon announces their “SECOND GENERATION EF 70-200MM f/2.8L IS II USM LENS”. I first heard about it on Scott Bourne’s blog this morning.  Looks like it won’t be available to US dealers till April.

If you can’t wait these 4 months and need a good 70-200 zoom, you can get the first gen here:
Canon EF 70-200mm f/2.8L IS USM Telephoto Zoom Lens for Canon SLR Cameras

Oh, and remember it’s not too late for you to send me a birthday present. I’m not a generational discriminator.

Cheers,

Joe

 
Leave a comment

Posted by on January 5, 2010 in Photography

 

Tags: , ,

Linq Entity Caching

Okay, so here is a very brief example of caching a linq entity and the big gotcha. Below is a very simple example of a FindById function with caching.  We are using are using Velocity/AppFabric for our base cache manager and it is wrapped up with some custom code to aid in the “gets” and “puts”. There are a different ways to approach caching with linq (e.g. caching the query, results of query, etc.) but in this simple case we get the cache key as the only parameter on the function so we’ll just do a dead simple implementation of caching the result of the query. When I first looked to implement caching on this guy I thought “hey this will be super easy and will provide a lot of performance gain!”  So the first try looked like this.

public static Item FindById(Guid id)
{
    Item item = (Item)DataCache.Get(id, Region.LinqItemManager);
    if (item == null)
    {
        item = DataContext.Items.Where(i => i.ID == id).FirstOrDefault();
        DataCache.Put(id, item, Region.LinqItemManager);
    }
    return item;
}

“Man that was easy! So clean and simple, man I’m a good dev! Test it? What? Why? That is some good stuff right there!…..Oh, I didn’t see that coming…”

As it turned out in the DBML Item has many properties and a few associations, one of which is an association to Catalog. Well during a certain code path when we call FindById() and cache that Item, we never referenced Item.Catalog. On a subsequent call to FindById() for the same ID we pulled the cached version  and tried to reference Item.Catalog and it was null. Okay I seem to remember something about serializing a linq entity will cause it to become disconnected from its original context. And that makes a lot of sense in a web app where the context only exists for the life of the request but the linq object is living in a cache. Okay, so I need to re-connect it to a context so the associations will work again.  Attach() is your friend, but your friend is a snob.

public static Item FindById(Guid id)
{
    Item item = (Item)DataCache.Get(id, Region.LinqItemManager);
    if (item == null)
    {
        item = DataContext.Items.Where(i => i.ID == id).FirstOrDefault();
        DataCache.Put(id, item, Region.LinqItemManager);
    }
    else
    {
        DataContext.Items.Attach(item);
    }
    return item;
}

Cause that doesn’t work. You’ll get all kinds of exceptions. Like “Cannot add an entity with a key that is already in use” or “Attach or Add an entity that is not new, perhaps having been loaded from another DataContext.”  The answer: If you don’t have a “fresh” context you will continue to get exceptions like those. So just get a new context instance and it works just fine.

public static Item FindById(Guid id)
{
    Item item = (Item)DataCache.Get(id, Region.LinqItemManager);
    if (item == null)
    {
        item = DataContext.Items.Where(i => i.ID == id).FirstOrDefault();
        DataCache.Put(id, item, Region.LinqItemManager);
    }
    else
    {
        WebDataClassesDataContext context = new WebDataClassesDataContext();
        context.Items.Attach(item);
    }
    return item;
}

Cheers,
Joe

 
Leave a comment

Posted by on January 5, 2010 in Development

 

Tags: ,

National Bird Day

That’s right today, January 5th, is National Bird Day. It also happens to be my birthday and yet I am ambivalent toward birds. Yeah they’re cool sometimes but other times they are just annoying.  Anywho, as today is a special day that I’m sure you all are celebrating, I’m going for a two-fer. That’s right double post Tuesday. It is about time for some code! How about some Linq Entity Caching.

Cheers,

JB

 
Leave a comment

Posted by on January 5, 2010 in Life

 

Merry Christmas

Hey everyone, just a quick note to wish everyone a Merry Christmas! Happy B-Day Jesus! I hope all of you had a great celebration and spent some good times with your loved ones. I know I did.

Joe, Chloe & Sarah

Merry Christmas!

 
Leave a comment

Posted by on December 25, 2009 in Life

 

static int Main(string[] args)

Okay, I’m not really sure why I thought it was a good idea to finally start my blog right before Christmas but here we go-ish. This post won’t be long cause I just don’t have time for it but I felt the need to get something out. So I should probably talk about something cool/interesting…. Oh, I got it!

So back in August Sarah and I bought our first house. The house was built between 1913 and 1919. Yeah its old but filled with charm and coolness. With the old comes things to fix/add/redo.  I tend to be brave/naive when it comes to fixing things around the house. I would say I’m a pretty good at DIY just inexperienced. Lowes, Home Depot and DIYNetwork are my good friends right now.  But I’ve got a new best friend Home Spot. HS is a great way to stay organized with projects and regular maintenance around the house.  Even if you are not into DIY stuff, HS will help you remember to change your HVAC filters, batteries in your smoke detectors, clean your garbage disposal, drain your water heater, and what ever else you want.

Hmmm, with a title like that shouldn’t I have talked about code? Oh well.

Okay, that is good enough for now.

Cheers,

Joe

 
Leave a comment

Posted by on December 23, 2009 in Life

 

Tags: