Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Mobility visits Perth

In a previous post I discussed some of my reservations regarding the small form factor Tablet PCs and UMPCs that we are starting to see in the market.  Last night I was fortunate enough to catch up with Hugo Ortega (Tablet MVP, Uber Tablet, GottaBeMobile and of course Tegatech Australia) who was in Perth on Thursday and Friday conducting a workshop around mobile computing. As Hugo was leaving late last night, to ensure he was home in time for his son's soccer game today, I forgo Friday night drinks in exchange for a buffet dinner at the Sheraton - I'm not normally a fan of hotel food but I have to mention that the food was awesome.  I'm glad we had the opportunity to catch as I was finally able to have a quick play with the OQO O2 device that Hugo is using as his primary screen

As I've mentioned previously I'm definitely a touch screen person so the lack of touch screen was IMHO an immediate failing of the OQO O2.  This combined with a slightly awkward keyboard and the lack of stylus holder meant that I definitely wouldn't rush out and buy one.  Credit where credit is due - the device has some really cool features.  Firstly, the screen is unbelivable: even at the highest resolution (software zoomed) it is still easy to read.  This combined with the new zoom feature in Office 2007 means that you don't run into the same navigation/operating issues you do typically with a pda style device.

Another cool feature that Hugo pointed out was the ability for the device to auto-sense lighting conditions.  Right next to the screen there is a light sensor that can tell whether the device has direct light, is in shadow or in a dimly light location.  When lighting conditions would make the keys hard to read a backlight automatically comes on, illuminating the keys.  This is similar to the backlight on the keys of the K-Jam (and a number of other windows mobile ppc devices).  I only wish they had this feature on more cars - it would save having to turn lights on and off which have always thought was a bit unnecessary.

Having spent the day in the "Resource Quarter" of Perth Hugo was also right where all the action was when it came to the announcement around free-wifi in this area of the Perth CBD.  Dubbed the ResourceNet this is an initiative that has been put together by Rio Tinto, BHP Billiton and Woodside.  Other local journalist had the scoop on Thursday when the announcement was made:

In short it was great to catch up with Hugo and to shoot the breeze on where mobility is going.  Hopefully Hugo will be back across in the next couple of months when we will try and get him along to the WA Mobility User Group and perhaps even a community dinner.


Update: From Bernard's post I saw that the Sydney Morning Herald rated a number of capital cities based on their delivery of connectivity.  Not surprisingly there weren't any Australian cities in the top 10 - I wonder with the move to providing free wireless in the Perth CBD whether we might beat Sydney in providing pervasive, free wireless internet access across the entire CBD?

User Group Library

The Perth .NET Community of Practice has recently updated the list of books available in their library and is experimenting with an online system for managing it.  Head across to the user group announcements blog for more information.

In the process of tidying up there are a couple of give aways that will go on a first-come-first-served basis:

  • Issues 1-19 of the Australian Developer Magazine
  • Microsoft Visual C#.NET Standard - Version 2003 (In the box!)
  • Developer's Guide to Moving to Microsoft .NET (guide)
  • Developer's Guide to Upgrading to Microsoft .NET

Now I know you will be saying these are old, and yeh, you're right!  But, instead of just binning them I thought it prudent to ask the question just in case someone out there still wants them.  Anyhow, if you do want either of these, please feel free to contact me and we can organise a time for you to come pick them up.

Update: The library now contains both WCF Unleashed and WPF Unleashed - recommended reading for anyone getting started with either of these technologies.

SharePod != iTunes Slayer


Recently a friend of mine showed me this cool little tool for bypassing Apple's "iPods shall only sync with 1, and only 1, iTunes instance" (honestly what a dumb constraint) called SharePod.  The user interface is quite intuitive (read simple) although it's a bit weird that you can't seem to easily queue tracks for playing without creating a separate playlist.  The best thing about the app is that it is a .NET Framework v2 application - IMHO much better than adding unnecessary WPF requirements.

After taking a quick look through the prerequisites for SharePod I went ahead and downloaded it (and as per their recommendations placed it on my iPod).  Unfortunately what they don't say is that you need to have the iTunes virus installed on your computer for it to be able to access the music database on the device - oh well, I can live in hope that one day someone builds an iTunes slayer.

Why Windows Mobile Device Center Is Broken?

Last week I posted that the WMDC had replaced ActiveSync and that you should upgrade to the latest version.  This week I'm seriously considering downgrading back to Windows XP just so I can run ActiveSync again.  On my way to work this morning I decided to grab a cup of coffee and write this post on Joel's recent visit on my K-Jam.  Unfortunately when I got to the office and sync'd with my laptop I couldn't open the note that I had written.  Under XP/ActiveSync all you had to do was drag the Note (which is a .pwi file) from the device onto the local machine and it would be converted by ActiveSync.  Now when I do that it transfers the pwi file as is to my machine and when I go to open it with Word I get:


Now I'd consider myself slightly more than the average user and would suggest that if I can't work out how to transfer notes to my Vista machine then there is something BROKEN with the Windows Mobile Device Center (unless of course I'm missing something obvious....).  Seriously Microsoft is it that hard to ship a version of ActiveSync/WMDC that actually works?????

Perth Ignores Concurrency

Last Thursday the Perth .NET Community of Practice was privileged to have Joel Pobar deliver a double session on concurrent programming and the new Dynamic Language Runtime. For anyone who has used concurrency in an application they will appreciate the added level of complexity it can add. Through a detailed discussion of the evolution of hardware and the way that Intel (and others) "screwed" us, Joel presented a number of best practice techniques that can be used to reduce the issues associated with concurrency.

In the second session Joel got down to talking about what is clearly a passion for him, dynamic languages and the future of the dlr/clr. Whilst I really love the discussion of the future of programming languages I must confess that for building your standard enterprise application I do struggle to see the business value of the new dynamic languages. Of course when you are looking at massively parallel problems and systems that are constantly in a level of flux, dynamic languages clearly have the advantage as the system can continue to evolve.

People are going to tout the success of Ruby and that of course dynamic languages are the way forward for building rich web applications. However I think what is significant from looking at Ruby is the Rails framework, rather than the dynamic language capabilities of Ruby as such. If you look at project Jasper, how much of this is reliant on the dlr - atm none afaik?. Of course, this is only in its infancy but does go to illustrate that it is not necessarily the language that is delivering the benefits, rather the toolset and framework.

This discussion comes back to my criticism of some WPF advocates that claim only developers who read and write XAML are real WPF developers. Well sorry to point this out but the Age of User Experience doesn't say anything about reading or writing xml (in any shape or form). Surely we should be talking about how best to abstracting the pain associated with working at that level and building an IDE that can do ALL the heavy lifting for you. This includes getting data binding working properly!!!

Ok, back to the focus of this post - I want to sincerely thank Joel for taking the time to come out to Perth and deliver a fantastic session.  With a bit of luck he also had a great weekend down-south and will be back this side of the country again soon.

Unfortunately I must admit I was a little disappointed with the numbers.  We were just short of 40 people and whilst this is more than we usually get for our monthly user group sessions, it is significantly short of what I would have hoped for from this event.  I think we need to question why people didn't attend?  From my point of view the user group did more than their fair share of organizing and promoting the event - and it was evident that most of the regulars appreciated the event. 

I'm always amazed that the local Microsoft branch doesn't seem to think the user group is important.  In the last year I don't think we have had a single Microsoft person attend any of the sessions (other than if they were invited to present) - how's that for supporting a technology?  I understand that everyone is busy - but try having a full time job AND organising the user group (kudos to Alastair and Mitch who are running the group at the moment).  Following on from this, if the local branch don't think the user group is important then why do we waste our time, since clearly developers are going to look to Microsoft for support and if they don't point out the user group or recommend the user group then they aren't likely to attend. 

Further, we have been trying for a number of years to point out that companies should be promoting the user group internally as one of the best forms of professional development.  For the cost of 1 or 2 developer hours a month a company can support the PD of their staff, which is likely to be better value for money than having to organise training for their staff. Given the current shortage of .NET developers in the market I would have thought companies would go out of the way to encourage their staff to continue to grow and give them the flexibility to attend user group meetings.

In summary - everyone enjoyed Joel's session (and the community dinner afterwards at Nine Mary's) but I was disappointed with the attendance.  I think more needs to be done to support the user group by the local Microsoft office and that companies need to start placing a value on the professional development of their staff.

Torn Between Groups

Recently I posted about the WA Mobility User Group and their June meeting scheduled for this monday (11th June):

WAMUG - June Meeting

Presenter:   Paul Malyniak, State Manager - 3 Mobile
Date/Time:  5:30pm to 7:00pm on Monday, June 11, 2007
Venue:        Fujitsu Australia Ltd, Level 15, 191 St Georges Terrace

Featuring Paul Malyniak, Western Australian State Manager of 3 Mobile, who will discuss and demonstrate the latest in mobile technologies with a look at 3 Mobile's business plans and data cards/services.

Unfortunately I just noticed that the next meeting of the Software Engineering Forum is also on tomorrow evening:

Software Engineering Forum

Topic:          Issue Tracking
Leader:       Andy Dent
Date/Time:  Monday 11 June 2007  at 5.30 pm
Venue:        Lecture Room, Engineers Australia, 712 Murray Street, West Perth

Andy Dent will lead a discussion of issue tracking systems, with examples of current open-source systems. His particular interest is in the usability of such systems and how it affects the willingness of people to adopt them, ability to expose to end-users  and changing team practice. He will also discuss how a simple 'bug-tracker' can be used to manage requirements and aid traceability throughout the software life cycle.

Attendees are encouraged to bring examples of issue tracking systems interfaces, preferably emailing them in advance to andrew.dent @

Normally it would be a simple choice as mobility is definitely one of my key interests, but to be fair I'm not sure I'm particularly interested in the phone plans of the 3 network and the topic of Issue Tracking could be a quite interesting debate.  At this stage I'm likely to go to the WAMUG meeting - which would you choose?

Update for Windows Mobile Device Center

Most of us Windows Mobile users will have at some stage cursed ActiveSync, affectionately known as ActiveStink as it is IMHO one of the most unreliable products Microsoft have ever released.  With Vista, ActiveSync is no longer - instead we have Sync Center (part of Vista) and the Windows Mobile Device Center (WMDC), which unfortunately is an additional download.  Although the user interface is quite different anyone who has spent any time with ActiveSync will feel right at home as most of the usual functionality is there.

Mel has recently announced that an updated is available for the WMDC.  The details of what is included in the update are in the post which can be downloaded here.

Qtek (aka HTC Wizard) v's the HTC Vox

So today a Qtek branded HTC Wizard (aka the K-Jam) arrived on my desk and I have once again renewed my subscription as a Pocket PC user. While I'm not sure Dave agrees with me, I definitely prefer the usability of the Pocket PC in contrast to the Smartphone navigation mechanism.  Especially when you look at the direction that HTC are taking with the HTC Touch you can see why a touch screen is absolutely essential (other advocates are Apple with their iPhone and of course Microsoft with Surface).

You might be thinking that why, since I went and bought a HTC Vox (which is definitely once of the coolest smartphones on the market) would I be keen to go back to the HTC Wizard.  Well the reason is that I think that there is going to be a larger opportunity for building rich user experience applications for pocket pc style devices in the future.  Although in recent times there has been a tendency towards the smartphone style of device I think for business applications there is going to be a need/want to move towards a more sophisticated user experience that can only be achieved through a touch screen capable of stylus and finger input. 

Pocket PC devices, or as they have now been dubbed Windows Mobile 6 Professional devices, also typically have faster processors and more RAM/ROM available.  Of course they then need more battery power which increases their weight - but so long as they don't end up being the side of mission-control for starship enterprise (ie the JasJar) they should be quite acceptable for the business user.  Something like the soon to be released HTC Kaiser could really set the standard for such devices.

What will be really interesting is the play out in the mobile space around building the next generation of applications.  In the desktop space we have seen Microsoft announce Silverlight and more recently Google Gears which is all leading towards building rich, web deployed applications that can function offline, detect connectivity and synchronise when a connection is available.  Of course despite using SqlLite (which is arguably better than SQL Server Compact Edition) Google is unfortunately a little behind with regards to a synchronisation framework - although given the Orcas ship timeframe it is likely that Google might have an offering in this space before the Microsoft Sync Services framework is available.

So back to the mobile space: Well Microsoft have already showcased Silverlight running on a mobile device but didn't indicate whether it was running in the browser (similar to the desktop) or as an extension to the .NET Compact Framework?  If it is the former then perhaps we might see a port for other devices which would mean we can finally put the boot into all those J2ME devices and really start building apps that work across platforms.  The other telling sign is that in the initial release of MS Sync Services won't be supported on the .NET Compact Framework - go figure!!!  The real question is going to be what Google does in this space - are they going to release Google Gears lite or perhaps Google Mobile Gears, specifically tailored for building mobile applications?  I'd suggest this is unlikely given the extremely limited support for javascript in most modern mobile phones.

While I'd like to be positive about the future of building mobile applications there doesn't seem to be a lot of good news in this space at the moment.  Most of the focus seems to be on getting the web to behave like a rich client (and vice versa) which has completely forgotten that most mobile developers have been working with these issues for decades!

Perth Developer Community

In my previous post I linked to a recent podcast I did with fellow Perth MVP Brian Madsen.  Following this conversation I thought it would be a good idea to list some of the developer resources, people and activities in and around Perth.  If you think I've missed something please let me know and I'll update this post!


Perth Bloggers


Podcast with Brian Madsen

This morning I posted an interview I recorded with Brian Madsen over at The Microsoft Developer Show. Unlike previous shows where I used a Skype plugin to record a phone interview, this podcast was done in person using my iPod.  Unfortunately I suspect I need to make use of the iPod Amnesty Bin as the recording kept skipping - luckily I think that most of the important points are still there, making it a worthwhile podcast:

The iPod Amnesty Bin @ Microsoft Zune Headquarters

This podcast follows up on a previous snippet-cast that I did with Darryl Burling on TechEd 2007 Australia and TechEd 2007 NZ

.NET Compact Framework 3.5 Redistributables

Anyone working with Visual Studio "Orcas" to build mobile applications should be aware that the v3.5 Beta 1 Redistributable are now available from MS Downloads.  There is also a good list of the new features that have been added to v3.5 of the .NET CF.

If you have been following Mark's blog and have been wondering why the WCF over Email sample doesn't work you will be relieved to know it's not just you!  The redistributables are NOT the same binaries as what comes with the Orcas B1 installation/VPC. The redistributables actually contain a fix as documented on the download site.

Bug Fix
The beta1 build of the .NET Compact Framework which shipped in Visual Studio ‘Orcas’ Beta1 does not allow for any project referencing Microsoft.ServiceModel.Channels.Mail* dlls to be compiled. If you’re using Orcas Beta1 and you need to build using these dll’s, first uninstall .NET Compact Framework v3.5 beta1 then download and install this version of NETCFSetupv35.msi.

How Extraverted are you?

On the way home from my run this morning I was thinking about what differentiates developers and what employers look for when hiring new staff. Of course there are the obvious factors such as education, experience and references but what really differentiates the candidates beyond that? One of the factors I find particularly interesting is the ability to communicate and work with others. Part of this is a reflection on how intra or extraverted someone is.

While I contemplated this thought I started to take note of the behaviour of other people out walking or running. There are some that keep their heads bowed and refuse to make any acknowledgment of others; there are some who are obviously deep in thought and appear to look straight through you; there are some who nod or grunt (men only) at you as you pass; then there are a few that say good morning and maintain eye contact.  This made me think of some basic questions that will make you think about how extraverted you are:

  • When you're walking down the street do you avoid eye contact with other people?
  • If you see someone you know, do you go out of your way to say hello?
  • If you see someone you recognise but can't remember their name or perhaps where you know them from, do you avoid catching their eye or saying hi?
  • If you're talking to someone who you can't remember their name do you ask them, or do you just hope that someone else will mention it?
  • If you traveling on the bus/train do you chat with the person sitting next to you?

I'm sure there are a million other more analytical questions you could ask to determine where someone is an introvert or an extravert but these are just a few that I was thinking about this morning.

Web Resource Fail To Load

Over the last week or so a number of us here at [Intilecta] have been plugging away at an issue with the web version of the product we are building. The last 24hr or so has been my turn and while I haven't found an ideal solution I did (mostly) track down the cause of our problem.  Leaving aside my belief that web apps are the source of all evil (not really but sometimes I do feel that they can be more pain than it's worth) I'm going to try to example the issue we were seeing and why it was happening:

There are countless systems that use the .NET framework's ability to dynamically load assemblies to provide extensibility options.  In our case the entire application is based around this concept but unlike a lot of systems we don't rely on the assemblies existing on the local filesystem.  We use an override of the Assembly.Load method to load assemblies based on an array of bytes (which might arrive via a network connection, from a database or carrier pigeon).  This works brilliantly in the winforms world but fails miserably in the web world (sometimes!).  The reason that this issue was so difficult to track was that it only seemed to happen in certain circumstances which appeared at first to be completely random. 

In brief the process for dynamically loading web content goes:

  • Load assembly from byte array
  • Retrieve type from loaded assembly
  • Create web control from type either using LoadControl or Activator.CreateInstance
  • Loaded control is added to the Controls collection for the page and is subsequently rendered

This process works for very trivial pages but started to throw the following exception when we tried to add more complex content:

System.ArgumentException occurred
  Message="Illegal characters in path."
   mscorlib.dll!System.IO.Path.CheckInvalidPathChars(string path) 
   mscorlib.dll!System.IO.Path.NormalizePathFast(string path = "<Unknown>", bool fullCheck = true)
   mscorlib.dll!System.IO.Path.GetFullPathInternal(string path)
   System.Web.dll!System.Web.StringResourceManager.ReadSafeStringResource(System.Type t = {Name = "webusercontrol1_ascx" FullName = "ASP.webusercontrol1_ascx"})

If this exception was ignored (ie hit continue) it would then bubble up as the following exception:

System.Web.HttpException occurred
  Message="An error occurred while try to load the string resources (FindResource failed with error -2147023898)."
   System.Web.dll!System.Web.StringResourceManager.ReadSafeStringResource(System.Type t = {Name = "webusercontrol1_ascx" FullName = "ASP.webusercontrol1_ascx"})

As you can see from the first call stack the issue arises because the StringResourceManager (which is attempting to load content from a resource file) attempts to get the FullyQualifiedName of the module to which the control type belongs.  Unfortunately because the assembly is dynamically loaded from a byte array the method InternalGetFullyQualifiedName which is called just prior to the GetFullPathInternal returns "<unknown>" (not an empty string or null or something sensible) which of course the method CheckInvalidPathChars decides is invalid and throws the ArugmentException.

Lets take a back step and look at just how to replicate this issue:

  • You have three projects in a solution - a test website (the host), a web application project (contains the web control you are going to render) and a web deployment project (so you can deploy everything as dlls)
  • In the load event of the page in the test website you need to dynamically load the output assemblies from both the web app and the web deployment projects
  • Still in the load event you then create an instance of the control and add it to the controls collection of the page
  • For a simple web control (with say text saying "Hello World") this renders fine
  • Add more than 254 characters to the web control and it will generate the exceptions as described previously.

If you want to see this in action drag down the attachment and simply run the website - it will attempt to load the control but will fail.  Go into the web control and remove the last character and rerun the site and it will load fine!

If you use Reflector to pop the hood and look at the difference you will see that with less than 255 characters the content is rendered using:

__ctrl.AddParsedSubObject(New LiteralControl("ABCD"))

(where ABCD is the text content of the page)

__ctrl.AddParsedSubObject(Me.CreateResourceBasedLiteralControl(0, &H100, True))

So the content is now being rendered from a resource file, which as we saw from the exception earlier won't work.  Unfortunately this only really leaves us with one fairly ugly option, which is to render the assemblies to disk prior to loading them into memory.  This of course bring issues of versioning, maintaining file currency and of course security as we now need the service to have permissions to persist files to disk.

If anyone knows of a better work around, please feel free to share as it has caused us enough heartache to get to this point!

HTC Vox Alignment

In my previous post I covered a number of the nice features of the HTC S710 (ie the HTC Vox).  I did allude to the fact that the keyboard didn't feel as balanced and as natural to use as the K-Jam keyboard.  In this post I hope to be able to explain some of this:

In this picture I have marked in a number of different "centres" and as you can see they don't really align.  Starting with the red and orange markings.  The red indicates the centre of the keyboard, based around the space key, while the orange marker is the middle of the screen.  You can see from the mis-alignment that this isn't going to be a great user experience when the eyes aren't aligned with the middle of the keyboard.

The next pair to look at is the Red and Green markers.  The Green indicates the centre of the keyboard as defined by the middle of the QWERTY style keyboard - ie between the G and H keys where the responsibility generally splits between right and left hands.  This mis-alignment, although it would seem that it is only a small amount, is IMHO enough to be a little off-putting when you come from a more balanced desktop keyboard or even other devices such as the K-Jam or JasJar keyboards.

Lastly look at the Blue markers - these are the locations of the right and left menu buttons (not really centres as such).  The annoying thing about the left button, is that it is almost in the middle of the device which means in order to press it you have to take your left hand off the edge of the device (where you would normally hold it for text entry).

The one saving grace on this keyboard are the Cap and Fn key LEDs that are bright and clearly visible when you press the Cap, Shift or Fn buttons.

In so far as the keyboard goes on this device (relative to others) it is definitely a major low point!  I think that they tried to condense the keyboard too much and have failed to really provide a good user experience.

MEDC Demo Code

See attachment for the demo code for my MEDC 2007 Australia presentation - "Building Applications to take on the road - A Guide to Microsoft Synchronisation Technologies"