Tuesday, April 12, 2011

The Path to Windows 8 - Or How I Think Microsoft Needs a Tablet Now!

So something that has been on my mind for a little while is how do we get a tablet version of Windows that is actually usable?

Following the announcement of support for the ARM platform as well as the necessity to release a tablet version of Windows to compete with the iPad I get the feeling that this is something that has to come sooner rather than later.

If Microsoft is determined not to release a version of Windows 7 that is optimized for tablet devices and if they keep to a regular cadence schedule with Windows 8 we're not likely to see it released until either July or October next year (depending upon whether you decide that RTM or retail is the correct release date). Does this leave them dead and buried in the tablet space? Pretty much.

So why not break the mold a little and release an interim, Windows 8 for Tablets version? The interim version that Steve Ballmer is against? Is it really that mad of an idea?

Windows 8 has been demoed running on ARM processors - we've seen it running Word at CES 2011 and IE10 at Mix 2011. Granted it's not been the full updated Windows 8 experience (such as the ribbon for Windows Explorer) but for the purposes of getting a tablet version of Windows that doesn't matter - the standard Windows user interface doesn't work on a tablet device.

Step forward Metro? It's a nice interface that works on the Windows Phone 7. It would scale up quite nicely to a tablet device - certainly, I think, better than iOS does. If you've not looked at the Windows Phone 7 interface I'd recommend you take a look at it!

But there's also something else that I think would help in releasing Windows 8 for Tablets - the limited hardware that it would have to run on. As Microsoft have done with Windows Phone 7 they could release a hardware specification than must be supported in the short term. This is the only way that you're allowed to release a tablet device running the new OS. A relatively fixed hardware specification - yes you can have an HDMI output, no you can't have a parallel port, etc. - no driver incompatibilities or driver support to add to the device. Make it a consumer device at launch and you remove the need for any Active Directory or Group Policy support from the off.

Sure it's a limited version of Windows that only works on tablet devices. But by definition it's a limited version of Windows. It's a tablet (or a slate if you prefer)!

So that gets us to the tablet release in time for Christmas. So then what? You spend the next six months getting Windows 8 for Desktops sorted. A desktop version of Windows requires a lot more than a tablet version does. It will have an update to the existing Windows 7 user interface, it requires full backwards compatibility (so that the eight year old scanner than I have works), it requires full integration with Active Directory and Group Policy, it needs to be manageable through System Center. There's a lot that goes into a release of Windows.

But does that stop an early release of Windows 8 for Tablets? Not to my mind no. It's a limited version of Windows and that shouldn't stop it being released. When Windows 8 for Desktops is released send out an update (call it R2 if you want!). You then have both versions of Windows 8 back in synchronization and move forward from there.

Giving Apple and Google a massive head start will be insurmountable. Bite the bullet and release a version for tablets pretty damn quickly. Otherwise I fear that Windows as an OS will never run on tablets.

Monday, January 24, 2011

Entity Framework 4 and Partial Trust

Aaaggghhh. It’s been a little while since I’ve been plagued by trust issues on a hosting provider. And now I’ve hit one trying to move a site onto the Rackspace Cloud.

It seems that they force all code to run in partial trust and that stops Entity Framework 4 from running. It seems that it’s a known issue for EF3.5 but it seems that it also occurs in EF4.

You can see it in action running locally by adding the following to web.config:

<system.web>
<trust level="Medium" />
</system.web>
So after some considerable digging, going round in circles, and swearing at anything to do with EF4 I came upon this article on the Knowledge Base - ASP.NET Web sites That Have EDMX files do not compile and deploy in partial trust.

It seems that the website that I’ve created is not a full Web Application Project but is some half way house – there is a compiled assembly but because it’s MVC the views are left as aspx/ascx files. This means that the site is dynamically built and the metadata files extracted and then compiled into the required assembly. Which fails with a SecurityException – because System.Data.Entity.Design won’t run in partial trust and it’s used if you don’t have a fully pre-compiled Web Application Project.

So eventually I hacked a solution together…
  1. Stop the metadata files being compiled into the assembly as a resource by setting the “Metadata Artifact Processing” to “Copy to Output Directory”.
  2. Add a pre-build task to copy the three metadata files to the bin folder in the web site itself.
  3. If publishing directly from Visual Studio to the hosting provider then also set the three metadata files as Content files so that they’re transferred across.
  4. Reference the metadata files in the web.config version of the connection string correctly in the ~\bin folder.
So it’s not an easy solution and it’s not really tied to the 3.5 problem that I first thought it was.

What complicated the solution was that I do have the EF Model in it’s own project so the metadata shouldn’t need to be interrogated. And I thought I had a Web Application Project (which I apparently don’t even though I’ve got a compiled DLL for the site).

Aaaggghhh. Three hours later and it’s working. I’m still not sure if my understanding of the problem or it’s solution is correct but it’s working. And hopefully it will keep working.

Friday, January 21, 2011

SQL Server User Instances

Note to self – remember to read this blog post when they don’t work.

  • Step 1 – Run it as Local System not Network Service.
  • Step 2 – Delete the SQLEXPRESS folder from C:\Users\<USER>\AppData\Local\Microsoft\Microsoft SQL Server Data.

Simples!

Thursday, January 20, 2011

A Week With Windows Phone 7

Due to a combination of working out whether I was moving jobs (yes), whether I was going to keep my work iPhone (now irrelevant), and whether I wanted to sign up to a new contract (not really) I’ve been very late to Windows Phone 7.

I eventually succumbed and, being on Orange for the last twelve years and not wanting to move network ,had a choice of the HTC 7 Mozart, LG Optimus 7 or the Samsung Omnia 7.  Several people I know (including @jonoble and @dmilor) have the Omnia 7 and with a quick play around with it that was the one I went for.

I’ve now had it for a week and thought I’d put some thoughts down on what I like and don’t like.  I think it’s a cracking little platform and there’s two many things to list of the the likes so I’m just going to list the don’t likes.

  • SkyDrive integration with OneNote in the Office Hub – doesn’t work correctly or does, but strangely.  Thanks to Jon Noble for the post explaining how to integrate “correctly”.
  • SkyDrive integration with the Office Hub – there doesn’t seem to be any way to get Word/Excel/PowerPoint from the Office Hub into SkyDrive.
  • Integration within the People Hub – this one was raised last night at the NEBytes Birthday Event and until then I’d not really thought about it.  We integrate Facebook feeds to people if they have an account but why don’t we link text messages and email messages?  It would be nice to see the “here’s everything I’ve done with a person from one place” and then links from there to the correct application.  And why don’t we show the call history in there as well?  Yeah!  I can see what they’ve spouted on Facebook but I can’t see when I last called/texted/emailed them?
  • Integration within the Photos Hub – why aren’t other applications in there.  Yes we can look at SkyDrive and Facebook photos but where’s the Flickr integration (which is relevant to me as  I have a Flickr Pro account but substitute your own photo-sharing application in there).

Now having written them down they seem a lot less bothersome than I thought they were.  For a first platform I’m quite happy that the main issues that I have are all to do with “integration” with things outside of the phone itself.  If you start playing around with the phone there’s an awful lot of attention to detail in the very small things – for instance slide from the “home screen” to the “application screen and watch the arrow rotate – that make it a pleasure to use.

It’s a really nice start to the platform and there looks to be plenty of updates in the pipeline for this year (including one this/next month).  I am an ex-iPhone user (under protest I must add) and this just feels a little nicer – it’s certainly a nicer phone but whether it will ever get the market penetration as the iPhone or the Android is the big question.

Thursday, January 13, 2011

Any Port? VPNs and SQL Server 2008

I’ve had problems with the VPN to my hosting server for a little while now and, thankfully, it’s all sorted.  I’ll not get into the “O2 updated their router remotely and it broke all VPNs” discussion but needless to say that I wasn’t best pleased.

Now that it’s working again I found that I couldn’t connect to the SQL Server 2008 through the VPN.  I’d not changed any rules for the firewall but any connection to the database server was failing with a network error.  SVN and MySQL would connect perfectly but for some reason SQL Server wouldn’t.

Trying to track it down was a bit of a problem but in the end I stumbled upon the problem.  Since I last connected across the VPN I’d installed a second instance of SQL Server on the hosting server and the SQL Server Browser was now running.  So as well as opening up port 1433 to connect to the default instance I had to open up port 1434 as well.  Once I’d done that it connected like a charm.

Now I’m not sure why I needed to open the extra port – the default instance of SQL Server is still saying that it’s binding to port 1433 in the logs so I’d have thought that you could connect to it without hitting port 1434.  But apparently not.

Tuesday, January 04, 2011

Changes are afoot...

Hopefully no one will notice as the feeds should still work (the wonders of FeedBurner) but this blog has moved domains.

It was originally setup when littlepond was just a domain name I had. That then became a company in it's own right and it just doesn't seem right to keep my personal blog on that domain.

With the changes that are coming this year for me it was about time that I sorted it all out so now it's here. As well as this blog - Notes from a Small Mind - there's also a Musings from a Small Mind that I'm using as a general dumping ground for things.

Hopefully there will be more coming on this domain soon - including a real site when I get round to it!

Friday, May 07, 2010

SQL Server 2008 R2 Install

Now that it’s gone to RTM I’ve just updated my development server to SQL Server 2008 R2 and hit an error that is a little weird.

The install was blocked because it thought I had the SQL Server 2005 Express Tools installed.  However this is a machine that has never had anything other that SQL Server 2008 on it.

Searching around on the internet I found a post on the sqldabtips.com blog that covered why this is the case. 

Basically the problem is that SQL Prompt and SQL Search from RedGate add a registry key (at least the version of SQL Search that I had installed did) that fools the installer.  Simply uninstalling SQL Search and hitting “re-run” in the SQL Server 2008 R2 installer solved the problem and allowed the upgrade to be applied.

Friday, March 26, 2010

Page.Title Strangeness

It’s very late and I’m madly trying to get a release out to the client so that I can go home (and have food as I’ve also not had lunch as well) and came across a rather strange problem in ASP.NET.

When trying to set the title of the page in code using a line very similar to the following:

Page.Title = "My new page";
It was ignoring it completely. Even setting the value in the watch window when debugging wouldn’t change the value of the Title property.

After a fruitless twenty minutes or so I spotted what the problem was. It was set in the mark-up to an empty string:

<%@ Page Language="C#" Title="" %>
And this stopped it being set in the code behind. Rather mental! Especially if you do the following:
<%@ Page Language="C#" Title="My page" %> 
When in this case it’s actually set correctly in the code-behind, overriding what is in the mark-up.

Thursday, February 25, 2010

NEBytes – March 2010

The details of the March NEBytes event are up on the events page.  “Visual Studio 2010” with Richard Fennell and “System Centre in the R2 Wave” with Matt McSpirit.

Hopefully the turnout at this one will be a little better than the last one (56 registered, 23 attended).  Registration opened yesterday morning and, at present, we have 26 attendees.  There’s plenty more space so get over there and register!

ASP.NET 4.0 Cometh

For all of you who are looking forward to VS2010 (after playing with BETA 2 and the RC I know I am) my good friend Dan Maharry is putting together a series of posts covering ASP.NET 4.0 that make pretty good reading.

Friday, February 12, 2010

SQL Server Table-Valued Functions Funny

Putting it here so that I have it somewhere that I can remember. Stored procedures and table-valued functions in SQL Server 2008 (I don’t know if this applies to earlier versions as I’ve not checked) behave slightly differently when using a view as their data source.

I have a view called cb_ClientView that does some jiggery-pokery to return the results that I need across several tables. It’s used in several places so that I don’t have to repeat the code several times.

Now I have both a stored procedure and a table-valued function that return data from the view. In both cases the SQL to utilise the view is pretty simple:

SELECT *
FROM cb_ClientView
WHERE @ShowEdited=1 OR cb_ClientView.IsEdited=0
Now I know that I should specify the exact columns that I want to return and not use the wildcard for columns but this method allows me to change the view to return other bits of data without having to modify all the stored procedures that use the code.

Which is exactly what I had to do. However this doesn’t work if you have a function!

Running the table-valued function still uses the old view definition. Unless you open the function in SQL Server Management Studio and run the statement, effectively altering the function, to be exactly what it was in the first place.

Seems a little inconsistent to me!

Friday, February 05, 2010

NEBytes - February 2010

The details of the February NEBytes event are up on the events page. Dynamic Consumption in C# 4.0 with Oliver Sturm and a Direct Access talk by Dan Oliver and Conrad Sidey.

We've got a bigger room this time (in a different building as well just to confuse you). It would be good to see you there.

The year in review

I’ve tried for several years to write a review of the previous year just to try and put a little perspective on what’s gone on. I’ve never really gotten round to it (or more correctly I’ve started but never finished). However this time I managed to craft together a “year-in-review” whilst away diving at New Year. It's just taken me a month to get it up here!

Diving

Diving seems to be the main theme of the year. The year started with a New Year’s Day with a dive on the Thistlegorm off a day-boat (after not much sleep due to a very rowdy bunch of Russian’s in the hotel from hell) – the only saving grace was that I helped with the tie off dive and was the first person on the boat to touch the wreck in 2009 – I even beat the dive leader down. The end of the year was equally as good with a dive on the Thistlegorm again on New Year’s Eve. Thankfully this time on a live-aboard which is a much more pleasant way to do it.

In between I did an awful lot of diving.

I qualified as a Divemaster with Sunderland Scuba Centre in February and lots of thanks to Steve Gibson and Jonathan Bray who made it enjoyable yet challenging and rewarding all at the same time.

Shortly after that I took a three month sabbatical from work (more on that below!) to do some diving and travelling in South East Asia. Spending two months on Koh Tao diving with Buddha View I decided to complete the instructor course and at the end of April I became an Open Water Scuba Instructor (as well as an EFR Instructor, Enriched Air Instructor, and Emergency Oxygen Provider Instructor). It wasn’t something I planned to do but it was one of the most enjoyable things I’ve done. Not only is Koh Tao a fantastic place to dive but Mark Soworko, Darius Moazzami and Gannon Murphy make a very good instructing team. It also helped that I had a great group of people on the IDC as well – John, Marie, Helen, Ewan, Nicola, Rob, Niki, Sascha, and Tom.

The only problem is that I’m (a) not diving enough back in the UK and (b) not teaching!

Travelling

As well as the time in Koh Tao I also did a month of travelling whilst I was out there. Bangkok, Singapore and Kuala Lumpur were all seen. I also got to spend some time with some university friends - Dom and Becca – in Brunei. They’ve got two kids now that it makes me feel really old.

After spending inordinate amounts of money over the three months I was away I didn’t do much more travelling – a trip to Italy to watch the Newcastle Falcons take on Petrarca Padova and a fleeting jaunt to Belgium for the F1 Grand Prix. Well, not as much as I’d like to. There’s something to be said for those people that spend a lot of time travelling!

Reviewing and Writing

Once I started writing and enjoying it I always planned to do a lot more than I actually have. If you followed this blog you’ll see that I did make a start on a fourth book not so long ago and I’ve briefly toyed with the idea of self-publishing a new book. Well, it’s one of the things that I need to do! There are maybe plans afoot to write more (and not necessarily in technical areas) and once the plans start to firm up then I can make some headway on those.

I’ve also not done as much reviewing as I’d like. If you look at the list of books that I’ve worked on (there’s a published works page on my main website – which reminds me I must update that pretty damn quick) there’s only three books in the last year (well four if you count the C# and VB versions of Professional Silverlight 3 separately). I’ve got a couple of Silverlight 4 technical reviews coming up for Apress which should be fun – I’m also trying to get some Windows Azure reviewing as it’s going to be a big growth area and definitely something that needs to be looked at.

Gigs

One of the highlights of the year for me is the number of gigs that I managed to get to. I always like to try and get to at least a gig a month and, apart from the three months away, I managed it. From seeing Metallica the day before I flew to Thailand, to Coldplay at Wembley, Bruce Springsteen and Blur in Hyde Park, Oasis at The Stadium of Light, and Papa Roach at the Newcastle Academy it was a very good year!

Work – aka The Things We Have to Do to Make the Other Things Possible

Work is one of those things that no-one wants to do but everyone has to. Last year was a particularly bad year for me work wise and not something that I’d want to repeat. If not for the three month sabbatical that I took I can’t say that I’d still be employed at the same place.

Returning from travelling was even harder. Coming back into the same job that you despised three months earlier – despite repeated promises made before I departed – tends to be a little soul destroying. Being a software developer it takes something to get you to a point where you don’t want to even look at a computer takes an awful lot.

That’s not to say that it was all bad. Well 90% of it was but there’s the 10% that was good. Things did get better towards the end of the year but it’s still the same old place – no matter how people try to change things they always stay the same.

So Where to Next?

So that was the year that was 2009. Onwards into 2010. New ideas, new people, new places.

There are lots of things that I’d like to do in 2010 – some of which are already happening, some of which need a lot more work before they become viable.

Travelling this year is pretty much out – with the Rugby World Cup being in New Zealand next year I need to spend as little as possible for the next year so that I can have three months off again. The current planning is to have two weeks in the Phillipines with Sunderland Scuba Centre, three weeks in Koh Tao, a week in Singapore for the F1 GP, then over to New Zealand for the England v Scotland game (what do you mean there are games before that – there’s only one that matters!). So it’s going to be expensive.

The user group I’m helping run, NEBytes, looks as though it’s going to be good. Over 80 people there for the launch event this month and we’re hoping that we can keep the numbers up around there – the higher the numbers we can get the bigger speakers we can get so here’s hoping.

It also may be time to start looking for another job. I was at BT for four years before I left and since then, other than two 18 month periods where I was self-employed, have worked in two year stints. I’m been in my current job for three years come April and it may be time for a change. Something challenging and worthwhile rather than a mundane 9-5!