# Monday, April 29, 2013

Last week was the first dotnetconf, a virtual conference put on by Javier Lozano and Scott Hanselman.  The event was live streamed via Google Hangout and included a bunch of really cool content.  I was given the honor of presenting on test driven development in .NET during the two day conference.  If you weren’t able to catch my session live or did make the live event and are looking for the slides and demos the links are below.

posted on Monday, April 29, 2013 4:24:00 PM (Central Daylight Time, UTC-05:00)  #    Comments [3]
# Thursday, March 28, 2013

This morning I decided to try out JetBrain’s WebStorm.  I am a huge fan of ReSharper and RubyMine and have been hearing some good things about WebStorm so I thought I would give it a try.  It’s very early on in that process so I haven’t formed my opinion completely yet but I have a sour taste in my mouth after spending over an hour setting up automatic compilation of LESS in the tool.  I was unable to find any documentation on the JetBrain’s site or otherwise on how to do it, so in the hopes of saving at least one person the headache I thought it would be wise to blog it.

Step 1: Find a LESS Compiler

You need to have a less compiler that you can tell the File Watcher to run and compiles the LESS to CSS.  Fortunately I have been using LESS for awhile and have had need for the standalone compiler so I knew where to find one - https://github.com/duncansmart/less.js-windows.  You can either clone the repo or download and extract the zip.

Step 2: Setup the File Watcher in WebStorm image

  1. File –> Settings or Ctrl + Alt + S 
  2. Click on File Watchers
  3. If you have a LESS watcher listed double click it otherwise click the green “+” in the upper right and select “LESS”
  4. In the New Watcher window
    1. Check “Track only root files”
    2. In the “Program” field click the ellipsis(“…”) and select the LESS compiler you downloaded in Step 1.  If you used less.js-windows select “lessc.cmd”.
    3. In the “Arguments” filed enter $FileName$ $FileNameWithoutExtension$.css
    4. Uncheck “Create output file from stdout”
    5. Click “OK”…twice

Step 3: Watch it Work

  1. Add a new file…give it the “.less” extension.
  2. Add a style to the new file and you’ll see the corresponding .css file created under the .less file.


Hopefully this helps you out and if I missed something and this process could have been easier let me know.

posted on Thursday, March 28, 2013 7:16:09 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
# Wednesday, December 19, 2012

At BUILD, during this session by Entity Framework Program Manager Rowan Miller, Entity Framework 6 beta was announced and made publicly available.  You can get the Entity Framework 6 beta bits via NuGet.  Currently they are only available via the Package Manager Console, more info can be found on the EF NuGet page

Entity Framework 6 is the first new version of EF since the announcement earlier this year that the product would be Open Sourced.  This means that not only is the source available but the builds of EF6 beta are available as soon as the code is checked in.  Entity Framework is hosted on CodePlex.

The EF 6 roadmap defines in detail what is currently in the works and what is still on the board as far as features and improvements for EF 6.  In this post I want to focus on one new addition to Entity Framework that I find very compelling.

One of the great features introduced in .NET 4.5 was the task-based asynchronous functionality using the async and await keywords.  Now with EF 6 comes support for asynchronous querying and saving using the same async and await coding convention.  Let’s first look at asynchronous querying.

The following asynchronous extension methods have been implemented for querying your data context and as you’d expect they are the asynchronous versions of their synchronous namesakes:

  • AllAsync
  • AnyAsync
  • AverageAsync
  • ContainsAsync
  • CountAsync
  • FindAsync
  • FirstAsync
  • FirstOrDefaultAsync
  • LoadAsync
  • LongCountAsync
  • MaxAsync
  • MinAsync
  • SingleAsync
  • SingleOrDefaultAsync
  • SumAsync
  • ToArrayAsync
  • ToDictionaryAsync
  • ToListAsync

In the code snippet below you can see an example of using the ForEachAsync method to asynchronously loop through all the manufacturers in my data context and print them to the console.

private static async Task PrintAllManufacturers() {
    using (DataContext context = new DataContext()) {
        await context.Manufacturers.ForEachAsync(m => Console.WriteLine("{0} : {1}", m.Name, m.Country));

Another piece of Entity Framework functionality that the asynchronous goodness has been added too is saving. Below is an example of adding a manufacturer and asynchronously saving the changes.

private static async Task AddManufacturer(string name, string country) {
    using (DataContext context = new DataContext()) {
        context.Manufacturers.Add(new Manufacturer {Name = name, Country = country});
        await context.SaveChangesAsync();

Using the asynchronous pattern is a great way to provide a more responsive user experience and now loading data asynchronously with Entity Framework has become much easier.

posted on Wednesday, December 19, 2012 11:08:48 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
# Saturday, September 01, 2012

This week I had the pleasure of speaking at devLINK.  I did 5 sessions over the 3 day conference and had a blast networking with the other speakers and attendees.  Kudos to the devLINK staff on a job well done.

Here are the 5 sessions I did at devLINK 2012 and links to the associated slides and demos.

posted on Saturday, September 01, 2012 6:45:00 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]
# Thursday, August 23, 2012

As most of you know I am very active in the development community and one piece of that is my involvement with the Midwest Give Camp organization. The Midwest Give Camp organization is a small group of dedicated community leaders that plan and carry out yearly Give Camps in the Midwest. This year I had the honor of organizing/leading the Midwest Give Camp. The event was held the weekend leading in to That Conference at the same venue. I wanted to share details on the charity that we worked with and what the Give Campers were able to provide for them.

For the 2012 installment of the Midwest Give Camp we worked with the charity Katharine’s Wish. Katharine’s Wish was founded by Katharine Rhoten of Eau Claire, WI. Katharine’s father Doug is also an active member of the developer community who runs the Chippewa Valley .NET User Group. Doug also happens to be a personal friend of mind.

While on the family’s first trip to Disney World in 2008 Katharine became seriously ill and was rushed to the hospital. The Rhoten family spent 3 long days in the hospital watching Katharine undergo numerous tests, most involving painful prods and pokes. Through all of those procedures Doug and his wife Kristin where amazed at the positive attitude Katharine was able to keep. This was due, in large part, to a small gesture of the hospital staff. Prior to any painful procedure, the hospital staff gave Katharine a small stuffed animal. This always put a smile on Katharine’s face and let her know that it may hurt for a bit but in the end everything was going to be alright. To get an idea of the number of procedures Katharine was subjected to during her stay at the hospital…Doug had to ship 2 boxes of stuffed animals back to WI J

The experience provided two major life-changing events for Katharine. The first was that she was diagnosed with Type I Diabetes and the second that she vowed to “pay it forward” by doing everything she could do to make sure that children in the hospital have the same positive experience she had. Upon returning home Katharine got to work on making this happen by using her allowance, birthday money, and funds from a lucrative lemonade stand to purchase stuffed animals to donate to local hospitals that she donates each year, on the anniversary of her diagnosis, to local hospitals.

Katharine’s Wish has grown to now include multiple drop off locations where the community can drop off stuffed animals and books to be donated. In the five years since her diagnosis, Katharine, with the help of her younger brother Spencer, has donated thousands of stuffed animals and books to the hospitals in her community.

It was an honor to be able to use my skills, along with the skills of 12 other talented geeks, to provide Katharine with a platform to grow her cause. The result of our work is the official Katharine’s Wish web site. The site was coded in MVC 4/HTML5/Kendo UI on the front end and EF Code First/SQL on the back end.

I ask that you please check out http://www.KatharinesWish.org to learn more about this awesome girl and please consider donating to her cause.

posted on Thursday, August 23, 2012 4:22:00 PM (Central Daylight Time, UTC-05:00)  #    Comments [5]