August14

Pick A Park Walt Disney World WP7

Pick a Park is an application I wrote for my kids on a different phone platform.  We used it to help us decide what park we wanted to visit while driving to Walt Disney World.  We originally had a Disney pin that we could spin to decide, but it would always be forgotten at home.  Since we lived about an hour away from the parks it was pretty easy for us to go, but there was always the debate about which park to visit.

The application is a very simple way to choose from two or more of the Walt Disney World theme parks and get a random choice of which one you should visit.

Pick A Park is in the Windows Phone MarketplaceMainPageScreenShot

Windows Phone 7

This version is for Windows Phone 7.  Since I work at Microsoft I got a free phone right when they first launched.  This app was my initial way to help learn the programming model.  I wrote this over Thanksgiving weekend 2010,  but I was so embarrassed by the app that I never released it until summer 2011.

The reason I finally released it was a XapFest event I attended where another internal Microsoft employee said that he felt you should always release the app while you are still a little embarrassed, it will keep you humble and motivate you to improve it.

To date there have been hundreds of downloads for what I was pretty embarrassed about at the time.  I get a few hate mail, but I get a lot of people just asking for advice on what park they should visit when they only have 1 days in Orlando after a conference.  Overall it has been a great experience.

Mango Update is interesting

I have been toying with the app more and more as Windows Phone Mango has progressed through beta.  I wanted to initially include two modes, one for picking the park, but another for just exploring which park you might want to visit.  But I couldn’t figure out how to do the data filtration because there was no database on the phone.  Now with Mango there is an embedded database (SQL CE), so I wanted to revisit the problem.  First a little about the current version.

More...

August13

The next Windows Phone 7 - Mango

I am sure that most people who follow Windows Phone 7 already know all about Mango.  But if you are just sort of casually following what Microsoft is doing around the new phone platform you will have missed a lot of what is in this video.  Joe Belfiore (Corporate Vice President) does a demo of some of the highlights for Mango.

Go watch it directly on YouTube, it is a good video.

More...

July26

My Favorite Visual Studio 2010 Plugins

I have gotten asked quite a few times why my Visual Studio looks different, or has some additional feature than another developers. There is a large community of plugins for Visual Studio (quite a few are free). I just wanted to link to two of the most popular that I send to people.

More...

June21

SqlBulkCopy should implement IDisposable

Ran into this issue today and wanted to write it down for others to hopefully find and save them some time in the future.

IDisposable means you need to cleanup, or does it?

If you use the SqlBulkCopy class (from System.Data.SqlClient) you would think that the object does not need to be cleaned up because it does not implement implicitly IDisposable, but you would be wrong.  Take a look in your favorite .net de-compiler at the Close method.

public void Close()
{
if (this._insideRowsCopiedEvent)
{
throw SQL.InvalidOperationInsideEvent();
}
this.Dispose(true);
GC.SuppressFinalize(this);
}

Notice that call to this.Dispose.  It is private, you can’t actually call it.  

It does implement the method explicitly, but you need to cast it ((IDisposable)bcp).Dispose() to get at the method.

More...

May04

WCF Web API

I listened to a really good HansleMinutes yesterday about WCF. I was actually going to skip it, but the title said “This is not your fathers’ WCF”.

I am glad I listened because the conversation was mostly around new initiatives in WCF, specifically the WCF Web API. Glenn Block has an entire blog post on the topic WCF Web APIs, HTTP your way. That post does a great job giving the high level overview.

Visit the WCF Codeplex site for the complete code and early release bits.

What’s the Big Idea?

To me the big idea was that you can expose a WCF service endpoint over HTTP with only HTTP messages (very lightweight).

Imagine you have a heavy service with lots of contracts for your “serious” API work, but you need to expose something trivial as well (think a simple time service to ensure the service endpoint is up, and our clocks are close enough together). Normally you would probably switch to using asmx or a simple SOAP service for this service. But you don’t have to do that, you could use WCF.

The problem with WCF has always been the abstractions away from the transport (HTTP in most cases). This is fine for well designed systems with lots of layers. But when you want something quick, it can be a pain to build and deploy. And then what if you want to evolve it? Good luck with versioning. Using a simple HTTP service makes that story much easier.

Links

Visit the WCF Codeplex site for the latest details

March22

Using EF 4.1 Code First to support multiple database vendors

With the release of the Entity Framework 4.1 I was interested to see how well the code first aspect works with multiple database vendors.  Could you use the code first modeling to change the database through a connection string?  I thought it might be worth a quick sample app to find out.

Download the sample Project

About the sample databases

I have an identical database in both SQL CE 4 and VistaDB 4.1.  Since they both have ADO.Net providers for the Entity Framework I decided to use them for this test.  The databases must have identical schema for this to work, otherwise your code wouldn’t match the database.  The data in the databases is slightly different, this is from an RSS Reader app.

The schema is fairly simple, only two tables.  RssFeeds (list of feeds the user wants to get entries from), and RssEntries (the actual RSS entries from the feed).  The schema is simple enough to be used for demo, but has real world data that always makes a demo much nicer.

More...

March17

NoSQL links to more information

 

There has been a buzz and hype about the No SQL movement for quite some time.  There was the much publicized Netflix using No Sql, which turns out to be a lot more about reaching internet scale rather than a discussion about relational databases.  In most of the cases where I see people hyping replacement of relational databases they are usually really talking about relaxing ACID compliance, eventual consistency of writes, or caching.

NOSQL Site Link

I recently got a link to an interesting site from a colleague and wanted to share it.

NoSql Summer

Specific Points

There is a lot of good information on the site, but here are a few I wanted to point out.

Cassandra — A Decentralized Structured Storage System – Interesting on a number of levels about scale and failover.

On Designing and Deploying Internet-Scale Services  - A lot of the scalability of any solution comes around a proper design for the scenario.  Why enforce a complete relational validation on something that is temporary for a service?  There are lots of reasons when you should not use a database at all for a problem.

Eventually Consistent – This is perhaps one of the best topics (to me).  There are lots of scenarios where you know your data is cached on a mid tier, and you really only want to make sure the persisted data is eventually consistent.  Perhaps you are always going to read from some cache unless it is empty, then you go back to disk.

The Log-Structured Merge-Tree (LSM-Tree) – Ok, this is just for us computer science geeks…  But it is a really cool concept.  Anyone who has implemented a B-Tree and had to deal with merge operations in a multi threaded scenario will appreciate the thought in this paper.  Not for the neophyte.

If you are at all interested in these topics jump to the site and read through the complete list of papers.

February02

Almost all back

Almost the entire site came back.  While I had it down I went ahead and updated to Blog Engine.Net 2.0 as well!  And my old theme even worked.  There might be a few things that need to be updated for the theme...  Will track them down over time.  Just happy to have the site back up and running.

 

February01

Site is back (sort of)

I appear to have lost about 5 months of blogs. Sad smile   That’s ok, most of them were about shutting down the company and my move here to the Northwest.  Probably better off gone anyway.

New Year – New Blog

DSC_0646

Took the family up to Whistler Canada for New Years.  First time my kids have see FEET of snow in depth.  It was a lot of fun.

I am slowing getting my feet into things at Microsoft. I have a new improvement that is already ready to go into ship mode.  Good stuff.

 

Will try to find out what happened to all these images and get everything updated.  I may remove some of the older posts though.

January19

PLINQ and .Net Parallel Programming resources

Seems there are more and more articles popping up on PLINQ and just multi core programming in general.  Visual Studio Magazine has a great summary of the current state of affairs in multicore programming.

Key to the article is that just enabling parallel code doesn’t always make it run faster.  There are dependencies, deadlocks, and all sorts of other problems that can occur.  Programmers have to know how to take advantage of the various technologies, and shift some thinking to new design patterns as well.

There are many technologies in .Net 4 including the following list:

More...