Window 8 Keynote

I’m watching the Windows 8 Keynote right now and so far, it’s impressive. It’s not quite clear to me yet how far you can push HTML/Javascript vs C# & XAML but I guess we’ll find out later this weekend. (By that I mean, is Entity Framework, or TPL built in now?) I guess the real question is how powerful is WinRT – so far it’s looks really powerful.

The New Microsoft?

I’m keenly waiting on next week’s Build conference because I’m unsure about how excited to be about Windows 8. There’s pieces of Windows 8 that I think are total shit, like the Windows Explorer ribbon. Calling it is an “improvement” is rather generous since think the implementation results in a visual disaster. However, that fact that Explorer is being examined is a good sign- it means that maybe there’s been a serious look in the mirror.

Another positive appears to be Jupiter, though I’ll wait until more is known about it.

Today, Sinofsky explained the new boot implementation for Windows 8. To be honest, I initially thought Steven was just another out of touch and aloof management type whose sole focus was to sell, sell, sell and never actually listen. But now I’m beginning to change my opinion (maybe one day, we’ll hung it out).  I rather like this new boot/shut down approach. Personally, my only problem with boot/shut down was time. Team Sinofsky went further and took a look at the qualitative perceptive – kudos guys. First person research told them why users choose shut down and thus they were able to elicit a design constraint that I didn’t know existed/mattered. Now I can immediately can draw the parallel to the knock against plasma TV’s and their phantom power consumption and, in hindsight, it seems like a obvious concern.

So next week, I’ll be looking forward to Mary Jo’s reports and watching the videos. I don’t care to be there, but I’ll still be paying attention.

I’ve got a good feeling about next week but I don’t want to be disappointed.

If you…


If you have a profitable business model, then you have a chance to grow.
If you grow, then you have a chance to become really big.
If you become big, then you have a chance to print money.


If you have a non-profitable business model then, with other people’s money, you have a chance to grow.
If you grow, then you have a chance to become really big.
If you become big, then you have a chance to hemorrhage money.


When you get big the approach matters.



Applied WPF 4 In Context – p5

I’m finally done with Chapter 6. It took longer than I thought (read: vacation break).  If you are struggling with Applied WPF 4 in Context by Raffaele Garofalo, below I have a list of things that might you get through Chapter 6.

Note: since it’s been a while I’m having trouble remembering all the things I did. If I missed something just ask in the comments and I’ll try to help.

The one item I struggled with the most was the test code. I just couldn’t get some of the tests to pass.  In UnitOfWorkFixture.cs, these methods had to have changes:

  • public void CanDeleteAnExistingObject()
    public void CanModifyExistingObject()
    public void CanModifyADetachedObject()

I also made similar changes to the RoleRepositoryTestFixture.cs for these methods:

    • public void CanDeleteAnExistingRole()
      public void CanUpdateAnExistingRole()

I’ll show you how I made the test pass for one method, the logic is the same for all. Here is my exact code for CanUpdateAnExistingRole:

// TDD
public void CanUpdateAnExistingRole()
        // add the entity
        var repository = new RoleRepository(uow);
        var role = new Role
                  Name = "Administrators",
                  Description = "Administrator Group."

        Assert.IsTrue(role.Id > 0); //works to here, gets new ID.
        uow.Session.Detach(role);//need to detach


        // modify the entity
        uow.Attach(role);//need to attach
        role.Name = "PowerUsers"; //change

        // try get it
        var expectedRole = uow.Session
                              .Where(r => r.Id == role.Id)
        Assert.AreNotEqual(expectedRole.Name, "Administrators");
        Assert.AreEqual(expectedRole.Name, "PowerUsers");
   catch (Exception exception)

So what I did is add the Detach and Attach statements to the existing code in the book. Without these, the test method could only add a role but not update it. It would try to update, and the context believed it was in “Modified” status, but the update never made it to the database. I still don’t fully understand why – if you do, please explain in the comments. :-)

Btw, if you do this make sure you add the Attach method before you attempt to update the role.Name property. (Otherwise the property isn’t tracked by the entity framework yet and therefore the change tracking is not “on”. )

If you repeat this same technique for the rest of the methods listed then they will end up passing. See below – both test sets now pass.

UnitOfWorkFixture Test Results

UnitOfWorkFixture Test Results


RoleRepositoryTestFixture Test Results

RoleRepositoryTestFixture.cs Test Results

The culture of Southwest at Detroit International Airport

So here’s a quick story.

I was going through Detroit International Airport last week and I happened to be down on Level 1 in the North Terminal by baggage claim 5 (I think). There’s a men’s bathroom that’s pretty of close to an escalator and that’s where I came across three offices all for lost baggage. Frontier, Southwest, and US Airways – in that order. It’s amazing how different the Southwest office looked, not because they had prettier stuff, but simply due to the effort that their staff had made. The windows where covered with fun “flare” while Frontier’s office simply had a sign that read “Only one customer at a time in the office”. And US Airways just looked like another bland grey office.

So kudos to Southwest because someone likes working there, which to me implies that if I were to lose my luggage then I would prefer to interact with the Southwest office culture and people. (Btw, I was flying Frontier).

Oh, and I expect that my MBA professor would be proud that I noted the difference.

Applied WPF 4 In Context – p4

So I’m still working on getting through Chapter 6 – almost there. Right now I made it to Page 151, the start of the Repository pattern.  If  you are struggling with Applied WPF 4 in Context by Raffaele Garofalo, below I have a list of things that might you get through Chapter 6.

  1. Ignore the top of page 140 where it says run the test. It won’t work because IUnitOfWork is not fully implemented yet.
  2. In IUnitOfWork, change void BeginTransaction(); to be void StartTransaction(); Raffaele switches to using StartTransaction at the top of  page 141 but he doesn’t update the interface.
  3. In IUnitOfWork, change the method definition by adding the where T: class like so:
  4. void MarkDirty<T>(T entity) where T : class;
    void MarkNew<T>(T entity) where T : class;
    void MarkDeleted<T>(T entity) where T : class;
  5. On pages 143-150, Raffaele discusses the Add, Update and Remove Objects, the trouble is that he skips the MarkDeleted implementation. Look at page 145, he jumps straight to the test method. As a result I created my own:
  6. public void MarkDeleted<T>(T entity) where T : class

Screen shot of VS 2010:

Chapter 6 - Test Complete

Chapter 6 - Test Complete


Applied WPF 4 in Context – P3

So last night I managed to get Rudi’s codeproject example to work inside of the TimeTracker application.

According to Raffaele’s post here (see his comment on 6/20/11) we should be getting *full* source code sometime today. I checked the Apress site earlier but there wasn’t any new code.

Here’s a screenshot of the control in VS 2010 – I think it’s close enough to Figure 5-11 to continue moving on.

Schedule Control

Rudi's Schedule Control in VS2010

More Applied WPF 4 in Context

If you are reading Applied WPF 4 in Context…

Two issues…

a) page 108 cites:
This is wrong, the right address for Rudi’s control is

b) The code is apparently on codeplex at however this is incorrect. The project does not appear to have any relation with Rudi.



It appears that Figure 5-11, page 109, is from Rudi’s CodeProject article. Go to Rudi’s page (above) and hit Part 1 of the article. Downloading and compiling the article code gave me something that is pretty close to the Figure. Now I just need to shoehorn it into Raffaele’s TimeTracker example.

Hope that helps.

Do I care about a Microsoft ecosystem unification?

Today, Mary Jo Foley, over at ZDNet asks (read for full context) if we, the developers, care if the future Microsoft ecosystem runs the same software core. That is, how important is it for us to develop once, run anyway in the MS ecosystem.

My first thought is that it’s not so hot right now, so anything closer to a unified core is better. Technically I guess Microsoft *could* make it worse, and that would simply frustrate developers, but mostly it would just hurt their business value.

Then I think well it also depends on how much effort is involved to adapt. Like she alludes too in the article, HTML5 is a good approach, and if the effort is small then unified or not, I don’t believe it’s a big deal either. For example, maybe Visual Studio 2012(?) could be smart enough to simply change the build target? (You can always hope right)

Also, if you are writing consumer retail apps then you probably care more about a unified core than some who is writing LOB’s for an external client. A LOB may contain only a handful of scenarios that users/corporations would care to run on every device. And at the end of the day we just do what we’ve always done and adjust the scope/cost and possibly approach, to reflect the level of difficulty in making these wishes happen.

Ultimately, I’m more concerned/curious/bothered by what Win8 will and won’t support. And how and what is happening with WPF, Silverlight, etc… and porting stuff to that new API set? Unification is a great target to shoot for but right now there’s bigger issues at hand. And who knows, maybe after the September Build conference all our developer dreams will be realized.  (Or we may all jump off a cliff)