Author: Jamie

  • Automapper Performance Testing

    I hate typing more lines of code then I need to; especially something as simple as mapping a domain model to a view model.  Enter Automapper!

    By performing a one-liner: [code] Mapper.Map<Customer, CustomerViewItem>(customer);[/code] I can quickly map my domain models to my view models.

    I was recently reviewing an old article on CodeProject: http://www.codeproject.com/Articles/61629/AutoMapper that contains a quick and easy demo.  Inside this article, it discusses performance and it indicates that Automapper is 7 times slower than manual mapping.  This test was done on 100,000 records and I must say I was shocked.

    My first thought is this requires more testing.  Especially since 100,000 records is a lot.  In most scenarios I would estimate my largest mapping might be 1,000, but even 1 would probably be a very regular use-case.  Let’s put it to the test…

    (more…)

  • Should I Leave My Job?

    This is a question I recently had to ask myself.  It’s not an easy decision.  As a father of three and the sole provider, it places a lot pressure on me.  Changing jobs is never an easy decision and this makes it even harder.

    At the end of the day, to answer this question I had to ask myself one question in turn:

    Will I or will my current employer be able to fix the issues I’m currently facing on a daily basis?

    If the answer is no, then the choice becomes much simpler.  When the answer is yes, then you need to place the focus on the new company you are thinking about.

    It’s important to not fool yourself thinking that the grass is greener on the other side.  Every company will probably have “some issues”.  It’s all about whether you can deal with those issues on a daily basis.

    Also, while the grass may not be greener, fresh sod is always greener for a short while unlike dead grass!

  • Why the Repository Pattern

    After the incredible reaction to a recent blog post, Entity Framework Beginner’s Guide Done Right, I feel like before writing some more code to further the basic example, I’ll take a step back and explain my beliefs in the repository pattern.

    I was really overwhelmed with the reaction; what started with a simple 30 minute blogging effort has turned into something absolutely incredible.  The original post was really a starting point about not placing direct querying and saving to the database mingled with the core code.

    Please note, these are my thoughts on the pattern based on current and previous pain points that I’ve/am experiencing and I’d love to hear others input in making things better.

    (more…)

  • Why is my calendar always full?

    Curse you full calendar!  I find it impossible to get anything accomplished when most of my day is spent in meetings.  More importantly, meetings with the “big wigs” always seem to be the worse.  Really, we need to spend 30 minutes to review a three page Word document that we could have read before the meeting!

    (more…)

  • Simple Things Make Me Happy

    I often go to a drive-thru, whether it’s to order food or my favorite coffee, whenever I finish ordering I always say “Thank you”.  I think this is an important thing to do.  What makes me really happy is the 1 out of 5 (maybe 10) times the person says “You’re welcome”.

    This simple statement makes me happy; it’s a really great way to start my day.

    There are of course many other examples of simple things that make me happy, as a parent for example, I watch my kids on an almost daily (even hourly) basis learn new things.  This is turn makes me really happy and it’s always the simplest things that they learn.

    I feel like this is an important trait that also applies to the world I live in: web application or web game development.  Simple things make me happy.

    (more…)