IE9 Try and Fail

I decided to give IE9 a try. What’s not to like about a browser that’s supposed to be faster, cleaner, and support new HTML features?

They really nailed the faster and cleaner parts. I didn’t findthe user interface in IE8 too busy, but seeing the improvement I’m happy for the extra space.

Plunking a site onto my task bar like it were an application is pretty awesome. There are a couple of websites that I’ll do this for without hesitation.I wonder howlong it’ll take to see adoption of the magichtml jump list task extensions. I’m not terribly optimistic myself; I’m hoping someone willfind a way to add tasks and maybe an overlay tosites that don’t have them built in.

In spite of all of that, sadly, I had to remove it.

The most severe issue I found was with the Live Mesh Remote Desktop service. My mouse cursorkept flicking to the the busycursors and back again a few times a second no matter what application I was using.Also, myCPU was running at about 26% where it normally hovers closer to 2%. Closing the browser doesn’t fix it either.

It took a bit of digging around in Resource Monitor, but I was able to find the problem. It wasn’t a single app running the CPU, it was dozens ofprocesses starting and terminatingeverysecond. That explains the mouse cursor. The two apps in question werethe Windows error reporting service and the Live Mesh Remote Desktop service.

The solution was easy: set the Mesh Remove Desktopservice to disabled. You won’t be able to access the desktop, but using everything else won’t suck. I don’t use Mesh desktop sharing enough that it’s a problem for me, but anyone who does may want to try it’s new replacement.

I could have lived withthe disabled desktop sharing if it were the only problem, but a few hideosrendering problems inGoogle Calendar, and WordPress failing to save my posts was a deal breaker. The compatibility mode doesn’t seem to be compatible enough, andtweaking the settings in the developer console (F12) is too much of a nuisance to do every day.

IE9 came off pretty easy once I figured out how to do it. It’s listed as an update, not as an application, so you need to click on the the “View installed updates” thingy of thePrograms and Featuresmenu.

I hopethey get the bugs worked out soon; it’s only been a day and I’m starting to miss it already.

Themis: System Design

I’m charging forward on the Shared Resource Schedule Service. There are a lot of things I’m getting into place before I start writing code. Don’t try to tell me that I’m not being agile either, youaways need to design a little to write good code. The key to being agile is designing onlyas much as you need, and being prepared to change your mind later.

The Name

The first order of business was to choose a name. It helps to know the name before you create a project. I’m also hoping to put the source in a public repository right away so that I can talk about the coding process while I build it.

Themis comes from Greek mythology. According toWikipedia, she “is the embodiment of divine order, law, and custom.” That seems somewhat applicable to the subject at hand. I know thatGreek mythology isn’t too creative, but we can always change the name later if anyone has a better idea.

Application Structure

A diagram showing the two main applications and the database that they both reference.

This system should be very simple. It’ll have a windows service to check for invitation emails, a web page to view schedules and configure the service, and a database to hold all the information so that both apps can access it. For simplicity, I want to put most of thecode into a single assembly.I want to the web UI and the service runner to be a thin veneer over the main assembly.

Application Design

Although this is just a home project I do want it to be good quality, even if my name weren’t going to be pasted into every source file with the license. To achieve this, I willbe using unit tests in as many areas as I can add them; not only to catch mymistakes but to help others understand and maintain the systemafter I’m gone. To make unit testing easier, I want to use anIoC / DIcoding style.

I’m going to use Entity Framework to keep the application code ignorant about the database. I don’t want to be tied to a particular database system, though I suspect most installations would usea sqlce database. I could use any ORM, but I’ve been wanting to try EF.

Processing Mail

Now that enough of the design (and some of the non-coding elements) have been straightened out, I can start to really focus on the first part of the project:Processing email.

A sequence diagram showing the mail processing sequence.

I want tobuild the email handling logicas agroup of small components,each responsible for asingle aspect of the process. Aside from some shared types to hold email or request data, and the controller that knows how to orchestrate them, none of the components will know anything about each other. Even then the controller won’t know which typescontain theactual implementation thanks to the IoC container.

By building each part in isolation I get a few good advantages. First, I’m able to test each component completely and separately from the rest of the system. Second, it becomesposible to replace any part of the chain with nothing more than a configuration change, which will be especially handy if anyone wants to fork the code. Third, I can reuse the individual components for other parts of the system, and they are likely to require less refactoring before they can be reused.

This is the new coding style: you build a system with complimentary building blocks loosly hooked together. You end up with a lot of classes, but you avoid the pain of complex inheritance trees.

The Next Step

Now that I’ve figured out my approach, I see that myfirst step is too big for an afternoon. Instead, I’m going to tackle it in three smaller steps:

  1. Receive any email and send a simple response back.
  2. Receive event invitationsby emailand send a human-readable response listing the details of the invitation.
  3. Receive event invitations by email and send an acceptance email. (The original requirement.)

AllI haveleftis to makea good cup of tea, turn up the music,and bang some keys.

My First Open Source Project

I’ve been spending time on the first part of the shared resource service project: “Receive event invitations by email and send an acceptance email”. I hadn’t considered the difficulty I would face receiving emails. This is the most important part of the application, and if I can’t make it work, there’s really no point to continue.

I don’t want to write my own POP3 library, I’ve done that before and it’s much more complicated than it appears. Buying a commercial component isn’t going to happen either. That left me with one option: To scour the Internet for an open source library.

Most of my career has been spent in companies that are paranoid about using third-party code. Finding something was easy enough (though I must say there are surprisingly few .Net POP3 libraries around), and testing a couple libraries didn’t take long at all. The most difficult part was figuring out how to use an open source library properly.

My favourite of the contenders is released under the GNU LGPL license. This shouldnt impose any awkward restrictions. I have additional freedom because Im planning to release my project as open source, but I can see how this would be more difficult for a company building a commercial product.

Since I was reading about licenses, it seemed as good a time as any to pick one for my project. After a lot of reading, I decided to go with the GNU GPL license. I want my project to be freely available, and I dont want anyone to use it to make a profit without me being involved. If I were unsure this would be the safest choice anyway, because I always have the ability to switch to a less restrictive license later.

Now if I can just find an IoC container, a unit testing framework, and a mocking framework that are also compatible with GPL, Ill be ready to get started.