Developing for Windows Phone 7

I spent some time today watching parts one and two of Windows Phone 7 Jump Start presented by Rob Miles and Andy Wigley. After a slow start there were clear demos of basic coding for Microsoft’s new phone; and I’d guess that most Microsoft platform developers would be reassured that if they can code for Silverlight, or do games in XNA, they will not have any problem coding for Windows Phone 7. The further implication is that it will be relatively easy, with the proviso that complex applications with good performance and excellent design are never easy. There is also the challenge of learning Expression Blend, if needed.

All participants were asked to state what other mobile platforms they had developed for; and while we were not shown the results of these polls there was a comment to the effect that “Windows mobile and None are neck and neck”, which I found interesting. It suggests that iPhone and Android developers are in no hurry to learn about Microsoft’s phone. If Microsoft gets enough customers they may then take an interest. Competing with Apple was always a given; but it is the rise of Google Android which must be most troubling to Microsoft, since it has given the non-Apple phone vendors what they need.

Still, the combination of Visual Studio plus Windows Phone 7 does make sense for .NET developers.

An early slide presented the Windows 7 hardware, which is worth reviewing as it is a reasonable specification. Supposedly Microsoft is taking a hard line with OEMs to keep the spec at or better than this minimum:

Display

480×800 QVGA
320×480 HVGA

Capacitive touch

4 or more contact points

Sensors

A-GPS, Accelerometer, Compass, Light

Camera

5 mega pixels or more

Hardware buttons

Start, Search, Back

Memory

256 MB RAM or more

8GB Flash storage or more

GPU

DirectX 9 acceleration

Reviewing the Belkin Play Max wireless router

I’ve just reviewed Belkin’s Play Max wireless router. It’s a Wireless N access point and router; it works, though I was disappointed with the range. That said, I’m increasingly impatient with this kind of product, good value in one sense but chucked out with technical deficiencies, inadequate documentation, and poor supporting software. It is not too bad if you are familiar with networking and follow the principle of never installing any software that comes with a router/modem; but if you do what it says on the packet you end up with a suite of software installed that you probably do not want – including a bit torrent client that comes in uninvited – and I would think a high chance that you will run into some issues with the configuration.

The Belkin unit is ambitious and promises you extra features including a DLNA music server, automatic tagging of your music files, and scheduled backup of your computers. It also claims to be “self-healing”, a feature which turns out to be a scheduled reboot just in case, you know, something has gone slightly wrong. None of this stuff works well, and Belkin would have been better off focusing on the core features for which you might buy a wireless N router.

Using backup on Windows Hyper-V Server or Server Core

Hyper-V Server 2008 R2 is a free virtualisation platform from Microsoft and an excellent bargain; I guess it is something Microsoft feels it has to do in order to compete with VMWare’s vSphere Hypervisor (ESXi) which is also free. Of course Microsoft still gets your money if you run Windows Server on the VMs, in either case. Hyper-V Server is in essence Windows Server Core with just the Hyper-V Role enabled, which means there is no full GUI, just a command window and a few odd GUI apps like Task Manager, Notepad and Registry Editor which Microsoft decided we cannot live without.

So what happens if you want to backup Hyper-V Server with built-in tools? Windows Server Backup is not available, first because it is a GUI application, and second because it is not installed.

There is a way. Windows Server Backup has a command-line version called Wbadmin. In some ways it is better, because you can script it, schedule it, and easily configure it through command-line arguments. It is not installed by default on Hyper-V Server or Server Core, but you can add it:

ocsetup WindowsServerBackup

Aside: If you want to see what else you can install with ocsetup, try oclist. You can install all sorts of things on Hyper-V Server, using this and third-party software, but note the terms of the EULA:

2(b). The instance of the server software running in the physical operating system environment may be used only to:
· provide hardware virtualization services, and/or
· run software to manage and service operating system environments on the licensed server.

Backup comes into that category in my opinion, but there could be areas of uncertainty. Using Hyper-V Server as a general-purpose file server would be a breach of the license, but using a file share on Hyper-V Server to copy some utilities which which to manage the server should be OK. I think – consult your lawyer.

Once you have Wbadmin installed you can backup the server. Attach an external hard drive, say to drive E, and run:

wbadmin start backup -backupTarget:e: -include:c:,d: -quiet

Actually that is not quite right, though it was my first effort. If you run this, even on a system with only C and D drives, you will get a warning:

Note: The list of volumes included for backup does not include all the volumes that contain operating system components. This backup cannot be used to perform a system recovery. However, you can recover other items if the destination media type supports it.

The reason for this is that current versions of Windows use a hidden system partition by default. This partition does not have a drive letter, but is needed for system recovery. In order to include it, add the –allCritical argument:

wbadmin start backup -backupTarget:e: -include:c:,d -quiet -allCritical

This will add the hidden partition to the backup, and enable system recovery, where you can restore the OS and all its data in once operation.

Another important argument is –vssFull. This switch in effect tells the operating system it has been backed up. The archive bit on changed files is flipped. You want this to happen if this is your only backup, but you don’t want this to happen if you are also using another type of backup.

Note that you can quit the backup with Ctrl-C but in fact it continues running. If you quit and then want to check the status, type:

wbadmin get status

and if you really want to quit:

wbadmin stop job

Backing up running VMs

Now the interesting bit. Can we backup VMs while they are running?

It should be possible, though Microsoft does not make it easy. The idea is that the backup saves the state of the VM in a snapshot, and backs up the snapshot. This means it should start cleanly on restore. But there are several tricky points.

First, if you want to backup VMs from the host, you need to set a registry key – see the following article. I would like to know why this is not set by default – it must be deliberate, since the requirement has stayed the same in Server 2008 and Server 2008 R2.

Second, there are actually two different snapshot mechanisms, one operating entirely on the host called “saved state”, and one operating in conjunction with integration services in the VM, called “Child VM snapshot”, according to the most detailed official article on the subject. This feature is shown in Hyper-V settings as Backup integration. For the Child VM Snapshot to work, there is a further limitation, that:

The Snapshot File Location for the VM is set to be the same volume in the host operating system as the VHD files for the VM.

I am not sure what happens if you have VHDs in several locations, as you might do if you wanted to optimize performance by having VHDs on different physical disks. [Update – apparently in Windows Server 2002 R2 the .AVHD snapshot files are always in the same location as their parent VHD, and this is on a per-VHD basis, so it should not be a problem in R2].

Third, there is a question mark about whether either method works for VMs running Active Directory:

Active Directory does not support any method that restores a snapshot of the operating system or the volume the operating system resides on. This kind of method causes an update sequence number (USN) rollback. When a USN rollback occurs, the replication partners of the incorrectly restored domain controller may have inconsistent objects in their Active Directory databases. In this situation, you cannot make these objects consistent.

I am also not clear whether archive bits are flipped in the child VM, if you use –vssfull along with the Child VM snapshot. If so, you should definitely not use –vssFull in the host if you are also backing up from the guest. I am trying to get clarification on these points.

These are more questions than I would like for something as critical as backup and restore of VMs. For peace of mind you should either shut them down first, which is unacceptable in most production environments, or else backup from the guest instead of, or in addition to, backing them up from the host. I’ll update this post when I get further information.

Data Protection Manager

Finally, note that in grown-up Microsoft environments you are meant to use Data Protection Manager (DPM) rather than fiddling around with wbadmin. There is even a white paper on how this integrates with Hyper-V. Ultimately though this is also based on VSS so some of the same issues may apply. However, if you are using the free Hyper-V Server 2008 R2, you are probably not in the market for DPM and its additional hardware, software and licensing requirements.

OpenStack takes on Amazon with open source cloud computing

Today’s big open source announcement is OpenStack, an open source cloud platform that aims to be an non-proprietary alternative to Amazon’s Elastic Computer Cloud (EC2) and Simple Storage Service (S3).

There are nearly 30 companies currently signed up to support OpenStack, including NASA, Citrix, Dell, Intel, AMD and Right Scale, but the big mover here is Rackspace, which says:

On July 19, 2010, we announced that we are opening the code on our cloud infrastructure. That’s big news for us and for the hosting industry in general. The result? Cloud technology will never look back.

The full press release is here. The initial offering is a distributed object store and a virtual machine provisioning engine.

OpenStack is not itself a cloud provider. Rather, it is offering software that lets you build a cloud, either for public or private use. Therefore, it is of immediate use only to large organisations, though for smaller users it might make sense to purchase services from an OpenStack provider since you are protected against lock-in.

The OpenStack cloud is IAAS – infrastructure as a service – offering storage and virtual machine instances. Therefore it is going up against Amazon rather than, say, Salesforce.com or Google App Engine. It is also an open source alternative to Microsoft Azure, which is also available (or will be) for both public and private clouds.

Looking at Right Scale’s comment, it seems that concern about Amazon taking over this market is a key driver behind the initiative:

From the RightScale perspective we will of course continue to support a variety of public and private clouds. We already have basic support for RackSpace’s API, which OpenStack will start out with, and we have a number of implementations under way with Eucalyptus and Cloud.com which we’re looking forward to multiply. At the same time, having many fragmented cloud efforts doesn’t really help build a compelling alternative to Amazon which keep adding incredible new features at a blazing pace. And the industry needs an alternative to Amazon, not because of some problem with AWS, but because in the long run cloud computing cannot fulfill its promise to revolutionizing the way computing is consumed if there aren’t a multitude of vendors with offerings targeting different use-cases, different needs, different budgets, different customer segments, etc. OpenStack promises to build enough momentum to create an exciting cloud offering that is as feature rich as AWS, that is implemented by a number of service providers, like RackSpace, and that enterprises can also run internally, like NASA.

For more information see the OpenStack site.

Why is there so much junk in Apple’s App Store?

After 4 weeks with Apple’s iPhone 4 I’m mainly impressed with everything other than the call quality (I am in a poor signal area for O2). I’ve been exploring the App Store though, and while there are many great apps there, there is also a huge amount of junk. Here’s a review for an app I was looking at:

This app is such a con. The adverts are deliberately put in the most awkward places so they get pressed accidentally; there is no “would you like to make a call” dialog box, nothing, it goes straight to an 090 number and even if you cancel the call instantly you are still charged … Apple should be ashamed for letting this little con artist on to the app store!

Other users report frequent crashes, lost data and so on.

With over 200,000 apps available, it’s not surprising that some are duds. However, given Apple’s insistence on checking every one, I’d expected the overall standard to be higher. Apple cannot easily judge how useful an app is, particularly in a niche area, but things like instability or unfair advertising practices should be caught.

Another odd thing: if you browse the store on the device, you cannot sort by rating, as far as I can tell, making it hard to find the better apps quickly. I guess this could be designed to mitigate the “winner takes all” factor: if one or two apps in a common search category achieve high ratings, it is difficult for newcomers to get noticed sufficiently to drive up their own ratings. Still, give the amount of dross in there, it would help to have this as an option, even if it were not allowed to be the default sort.

The existence of so many poor apps also puts into context the Thoughts on Flash posted by Steve Jobs. I kind-of understand why Apple wants to exclude the Flash runtime from its device platform; but that does not explain the ban on Adobe’s Packager for iPhone, which compiles a Flash application to an iPhone binary. That might make sense if Jobs could point to the consistent high technical standard of iPhone Apps; but that is simply not the case.

David bowie Station to station gets the super deluxe treatment

In the autumn of 1975, David Bowie was immersed in the alien character of Thomas Newton in Nicholas Roeg’s film The Man Who Fell to Earth. He was also addicted to cocaine, suffering delusions, and by accounts of those close to him at the time, seemingly near to breakdown. It’s all a bit hard to take in, considering that during this period of his life he produced what I consider his best work, the album Station to Station – though his flirtation with fascism makes me uncomfortable.

The music is magnificent though; powerful, unsettling, emotional. Stylistically it is an amalgam of the the funk of Young Americans and the rock which preceded it; though saying that does no justice to the fact that Bowie had moved on from both.

The title itself is a pun – the track opens with white noise and chuffing train noises, a radio tuning, a train travelling. Bowie is mentally travelling too, too fast for safety. Earl Slick’s guitar is frenetic and urgent. The album is cold in feel, perfectly suited to the stark mostly black and white cover, but humanised by the two softer ballads which conclude each side on the original vinyl release: Wild is the Wind and Word on a Wing.

image

Now Station to Station is getting the super deluxe treatment. In September EMI will release a lavish special edition box which includes 5 CDS, a DVD, three vinyl records, and a pile of memorabilia. How can you get that lot from one album? Here’s how:

CD 1: 2010 transfer of Station To Station from the original stereo analogue master
CD 2: Station To Station 1985 CD master
CD 3: Station To Station single edits five track EP containing Golden Years, TVC15, Stay, Word On A Wing and Station To Station
CDs 4 & 5: Live Nassau Coliseum ’76
DVD containing the following…
Station To Station (original analogue master, 96kHz/24bit LPCM stereo)
Station To Station (new Harry Maslin 5.1 surround sound mix in DTS 96/24 and Dolby Digital)
Station To Station (original analogue master, LPCM stereo)
Station To Station (new Harry Maslin stereo mix, 48kHz/24bit LPCM stereo)
12″ heavyweight vinyl of Station To Station from the original stereo analogue master in replica sleeve
2 x 12″ heavyweight vinyl of Live Nassau Coliseum ’76 in gatefold sleeve
24-page booklet with sleevenotes by Cameron Crowe and chronology by Kevin Cann and also including…
– Previously unpublished Steve Shapiro photo
– Geoff MacCormack photos
– Andrew Kent live Nassau photos
Replica David Bowie On Stage 1976 press kit folder containing the following…
– Replica Nassau ticket from night of the show
– Replica backstage pass
– Replica A4 biog
– Replica band line-up
– 3 x 10×8″ press shots
Replica 1976 Fan Club Folder containing the following…
– Replica fan club membership card
– Fan club certificate
– 2 small collector cards
– 2 A4 photo cards
– Replica 4-page biography
– 2 badges
– 6 panel folded Steve Shapiro photo poster of Bowie kneeling

Some of this deserves a little explanation. Why is the “1985 CD master” included? This would be the first CD release, on RCA. and sought after by collectors. The reason for the popularity of these early CDs is that in general they sound closer to the original vinyl records. Bowie’s back catalogue has been remastered many times, but all the later CD versions sound quite different, from the over-bright Ryko issues to the noise-reduced later efforts. I guess someone noticed that some fans still seek out the RCA CDs and decided to include it here.

The concert from the Nassau Coliseum was a famous bootleg called The Thin White Duke, though it is to be hoped that the sound quality here will be superior. It is a great concert, and better than any of the other official live material in my opinion.

Very nice; but I find myself rather irritated by this release. Although there will also be a CD release with the remastered Station to Station and the Nassau Coliseum concert, much of the material is unique to the big box. In particular, the high resolution stereo, the new surround sound mix, and the new stereo remix. Fans who want to hear these also have to purchase the rest of the box, even though they might not have a record player for the three vinyl records, for example. It’s annoying if like me you are mainly interested in the music.

Another disappointment is the absence of any true rarities. Many of us would like to hear the unused soundtrack Bowie created for the Man Who Fell to Earth, for example.

Nevertheless, there’s a lot here to look forward to – if you can live with feeling somewhat exploited as you open your wallet for this super-deluxe, super-expensive box containing material some of which you have most likely bought at least once before.

Station to Station and Live Nassau Coliseum on Amazon

Products from Amazon.co.uk

How infectious is the GPL? Battle of words between WordPress and Thesis

Matt Mullenweg, the creator of WordPress, is engaged in a battle of words with the maker of one of its premium themes, Chris Pearson, who runs DIYthemes and offers the Thesis theme on a paid-for basis. I listened to their discussion on Mixergy; it is ill-tempered particularly on Pearson’s side.

The issue boils down to this. WordPress is licensed under the GPL, which provides that if you derive a new work from an existing GPL-licensed work, the GPL applies to your new work as well.

Pearson argues, I think, that his work is not so tightly linked to WordPress that the GPL applies. “Thesis does not inherit anything from WordPress” he says.

Mullenweg says that the way themes interact with WordPress is such that all themes much be GPL. “If you build something on top of it, it should be GPL” he says.

Pearson is refusing to license his theme under the GPL. What is to be done – would Mullenweg go to court to protect the GPL?

“You want us to sue you? That would break my heart.” he says. Then later, “I really hope it doesn’t come to that.” Then, “If people decide the GPL doesn’t apply, it’s a serious step for open source.”

Disclosure: this site runs on WordPress and I regard Mullenweg as one of the heroes of open source. Like the Apache web server (also in action here), WordPress is among the greatest achievements of the open source community.

I have no legal expertise; though I know a little about how WordPress works. Themes link very tightly with WordPress and in most cases are built by modifying an existing GPL theme; but I guess if you could show that Pearson’s work does not do this but merely runs on WordPress, as opposed to modifying it, he may have a case. That’s the argument Michael Wasylik makes here. On the other hand, did Pearson really create his theme without including any tiny bit of GPL code?

Another factor: if you choose to build an extension to a platform like WordPress, it is arguably unwise to do something counter to the strong wishes of its founder. There are ethical as well as legal aspects to this.

It is an important discussion for the open source community.

Dysfunctional Microsoft?

Microsoft watchers have been scrutinising the fascinating Mini-Microsoft post on the Kin smartphone debacle and what it says about the company. If it is even slightly accurate, it is pretty bad; and it must be somewhat accurate since we know that the hopeless Kin launch happened and that the product was killed shortly afterwards. Of course it would have been better to kill the project before rather than after the launch; the negative PR impact has affected the strategically important Windows Phone 7 launch.

Handsome profits from Windows and Office have enabled Microsoft to survive and even prosper despite mistakes like Kin, or the Xbox 360 “red ring of death”, or the Vista reset and related problems – mistakes on a scale that would sink many companies.

I see frequent complaints about excessively bureaucratic management with too many layers, and a tendency towards perplexing, ineffective but expensive advertising campaigns.

There are also questions about CEO Steve Ballmer’s suitability for the task. He nearly indulged in a disastrously over-priced takeover of Yahoo, saved only by the obstinacy of the target company’s leadership. He habitually dismisses the competition, such as Apple’s iPhone, and is proved wrong by the market. He failed to see the importance of cloud computing, and even now that the company is at least partially converted he does not set the right tone on the subject. I watched his keynote at the Worldwide Partner Conference (WPC) where he sounded as if he were trying unsuccessfully to imitate Salesforce CEO Marc Benioff from ten years’ ago. Microsoft needs to present a nuanced message about its cloud initiative, not someone shouting “oh cloud oh cloud oh cloud”.

Microsoft is also copying its competition as never before. Bing has a few innovations, but is essentially a recognition that Google got it right and an attempt to muscle in with a copy of its business model – search, advertising and data mining. Windows Phone 7 occupies a similar position with respect to Apple’s iPhone and App Store. Windows 8 also seems to borrow ideas from Apple.

Nevertheless, Microsoft is not yet a dying company, and it would be a mistake to base too much analysis of the company on something like comments to Mini-Microsoft’s blog – good though it is – since it is a magnet for disaffected employees.

While Ballmer’s effort at the WPC was poor, he was followed by Bob Muglia, president of server and tools, who was excellent. Windows Azure has come on remarkably since its half-hearted preview at PDC 2008; and Muglia comes over as someone who knows what he is trying to achieve and how he intends to get there. The Azure “Appliance” idea, shipping a pre-baked cloud infrastructure to Enterprise customers, is a clever way to exploit the demand for a cloud application model but on hardware owned by the customer.

The eBay announcement at WPC was also quite a coup. eBay will “incorporate the Windows Azure platform appliance into two of its datacenters” later this year; and while it is not clear exactly how much of eBay will run on Azure, these appliance kits represent significant hardware.

We’ve seen other strong releases from Microsoft – server 2008 R2, Exchange 2010, SQL Server 2008 R2, SharePoint 2010 which whatever you think of SharePoint is a solid advance on its predecessor, and of course Windows 7 which has done a lot to rescue Microsoft’s performance and reputation after the Vista disappointment.

I also continue to be impressed by Visual Studio 2010, which is a huge release and works pretty well in my experience.

What about Windows Phone 7? With the market focused on iPhone vs Android, clearly it is in a tough market. If there is something slightly wrong with it on launch, instability or some serious hardware or software flaw, it might never recover. Nevertheless, I do not write it off. I think the design effort is intelligent and focused, and that the Silverlight/XNA/.NET development platform along with Visual Studio is an attractive one, especially for Microsoft Platform developers. VP Scott Guthrie describes the latest SDK here. People still switch phones frequently – something I dislike from an environmental point of view, but which works in favour of new entrants to the market. If Windows Phone 7 is a decent device, it can succeed; I’d rate its long-term chances ahead of HP WebOS, for example, and will be keen to try it when it becomes available.

phonedev

Is there a lot wrong with Microsoft? Yes. Does it need a fresh approach at the very top? Probably. Nevertheless, parts of the company still seem to deliver; and even the Windows Phone 7 team could be among them.

Google App Inventor – another go at visual programming

Google has put App Inventor for Android on Google Labs:

To use App Inventor, you do not need to be a developer. App Inventor requires NO programming knowledge. This is because instead of writing code, you visually design the way the app looks and use blocks to specify the app’s behavior.

Sharon Machlis at Computerworld says it is a breakthrough:

App Inventor has the potential to do for mobile app creation what VisiCalc did for computations — move it out of the exclusive realm of specialists in glassed-in data centers (or, in the case of mobile apps, programmers who can use a conventional SDK) into the hands of power users as well as make it easier for IT departments to create corporate apps.

I’d like to believe this but I do not. It is visual programming; it is interesting; but it is similar to other visual programming tools that we’ve seen in the past. These tools have their place for learning, and there is probably some small sub-section of programming tasks for which they are ideally suited, and some small sub-section of developers for whom they work better than text-based tools, but for most of us textual code is easier and more productive when we are coding the logic rather than the user interface of an application.

I took a look at the Quiz Me tutorial. Here’s a code snippet – it is a click event handler:

image

and here is the complete application. Note the navigator at top right, which would be vital for finding your way around a more complex app:

image

It is often a problem with visual programming tools: scaling an app beyond a few simple blocks introduces difficulties with navigation and project management. Our text-based tools are highly evolved for managing large projects with thousands of lines of code.

What about democratisation of programming through visual tools like this, coding without coding, that will allow domain specialists to develop apps without involving developers? Is visual programming really easier for the non-specialist than textual programming? I’m not convinced. It should be easier to get started: no syntax errors, no language reference to consult. In the end though, is a purple “if” block with jigsaw connections for “test” and “then-do” much easier than typing if (test) {code block}?

It is just a different way of presenting the same thing, but less concise and less flexible. I suspect the domain specialist who can succeed with App Inventor will also succeed with code; and that people who struggle with code-based programming in an accessible language like Basic will also struggle with visual programming.

Where this gets interesting is when you have powerful components that expose a simple interface. A high-level non-specialist programmer can drag a component onto a design palette and do amazing things, because of the smarts that are hidden inside. Components do democratise development. One reason for the success of Microsoft’s development platform is that from Visual Basic through COM and then .NET, the company has always made it easy to use components and fostered a strong third-party market for them. If App Inventor provides a great way to deliver components to high-level developers, it could succeed.

That said, components do not require visual programming. Microsoft has flirted with visual programming – like the abandoned PopFly – but despite using the name “visual” everywhere, Microsoft has never delivered a mainstream visual programming tool.

Small Business Server “Aurora” based on Windows Home Server and will have hooks to the cloud

The most interesting session at TechEd in New Orleans last month was one I could not talk about until today. It concerned the next version of Small Business Server, no date announced yet. The next SBS will come in two editions. SBS 7.0 will be conceptually similar to today’s SBS, but updated to Server 2008 R2, Exchange 2010 and so on.

SBS code-name “Aurora” is the compelling one though. It is based on Windows Home Server (or at least the next version of WHS, “Vail”, but with Active Directory added. There are no other apps; you are expected to use cloud services.

The reason this matters is Microsoft’s work on federated Active Directory. What this means is that your local SBS simply manages users, computers and file shares, but the same user accounts also work on cloud-hosted services such as Exchange or SharePoint – or any others that support Active Directory federation.

I love this concept; it is exactly the right thing for SMEs who need to run a properly managed Windows network while using hosted email and other cloud services.

image

Questions remain of course. Will services other than Microsoft’s own BPOS or third-party hosted Exchange and SharePoint support SBS federated Active Directory? And will Microsoft and its partners really steer small businesses in this direction, or focus on SBS 7.0?

More details in this article on The Register.

PS This version of SBS is not too far removed from what I asked for in February 2006.