Category Archives: microsoft

Microsoft financials April-June 2016: on track but continued drift away from consumers

Microsoft has announced its latest financials, and I have made a quick table summarising the year-on-year comparison for the quarter. See the end of this post for what the confusing segment categories represent.

Quarter ending  June 30th 2016 vs quarter ending June 30th 2015, $millions

Segment Revenue Change Operating income Change
Productivity and Business Processes 6969 +308 3000 -167
Intelligent Cloud 6711 +415 2190 -443
More Personal Computing 8897 -346 964 +359
Corporate and Other -1963 -1943 -3074 +5384

A few observations.

Office 365 is Microsoft’s current big success. According to the company’s press release, Office 365 revenue grew 54%, which is huge. However, on-premise sales declined which meant that overall revenue growth in “Office commercial products and cloud services” was only 5%. Still, that’s a successful transition.

The picture was similar in consumer Office, with Office 365 consumer increasing by 23.1% while overall revenue grew by only 19%.

Dynamics CRM is moving to the cloud. Microsoft says that Dynamics CRM online grew by more than 2.5 times, while overall revenue grew only 6%. The maths may be deceptive, if CRM online grew from a small base, but it is a clear trend. Not to be confused with Dynamics 365, which is ERP/Business process management, though Nadella is also bullish on the latter.

Azure revenue grew 102%.  Microsoft’s cloud results are not quite as sparkling as those from Amazon Web Services, but still impressive.

Enterprise Mobility is growing. This is a suite of tools built around InTune, Microsoft’s Mobile Device Management solution.

Surface is doing OK. Revenue up 9% thanks to Surface Pro 4 and Surface Book.

Windows news is mixed. “Windows OEM non-Pro revenue grew 27% and OEM Pro 2%” says the release, which given the weak PC market is decent. Windows 10 is at 350 million active devices, which Nadella said in the earnings webcast is the fastest ever adoption rate for a new version Windows; hardly surprising given the free upgrade offer and high-pressure upgrade marketing.

Xbox news is mixed. Gaming revenue is down 9%. Xbox Live revenue grew 4% but Xbox console revenue is down.

Windows Phone dives towards oblivion. Revenue is down 71%, from a base that was already tiny.

Microsoft cares less and less about consumers. “We will deliver more value and innovation” in Windows, says Nadella, “particularly for enterprise customers.” I also note the remark in the press release that “Search advertising revenue excluding traffic acquisition costs grew 16% (up 17% in constant currency) with continued benefit from Windows 10 usage,” suggesting that part of the Windows 10 consumer strategy is to use it as a vehicle for advertising; this is known in the business as “adware” and does not encourage me; it will push canny users towards Mac or Linux. In the earnings call, Nadella said that 40% of search advertising revenue is from Windows 10 devices. “The Cortana search box has over 100 million monthly active users with 8 billion questions asked to date,” said Nadella.

A reminder of Microsoft’s segments:

Productivity and Business Processes: Office, both commercial and consumer, including retail sales, volume licenses, Office 365, Exchange, SharePoint, Skype for Business, Skype consumer, OneDrive, Outlook.com. Microsoft Dynamics including Dynamics CRM, Dynamics ERP, both online and on-premises sales.

Intelligent Cloud: Server products not mentioned above, including Windows server, SQL Server, Visual Studio, System Center, as well as Microsoft Azure.

More Personal Computing: What a daft name, more than what? Still, this includes Windows in all its non-server forms, Windows Phone both hardware and licenses, Surface hardware, gaming including Xbox, Xbox Live, and search advertising.

Office 365 users: beware Outlook’s mysterious Not Implemented error

Outlook broke on my laptop the other day. Well, it still received mail, but many operations threw up an error, “Not Implemented”.

It was particularly annoying that the error affected sending emails, but the error dialog only showed when I tried to force a send and receive. Therefore, emails were stuck in the outbox with no notification.

This error can indicate a corrupt installation, but in my case it was simply an Office 365 mess-up. In particular, the problem was connected to a an automatic upgrade from Office 2013 Professional Plus to Office 2016 Pro Plus, for users on Office 365 E3 subscriptions.

Users are meant to see an upgrade notification before this occurs. I don’t recall seeing this, but it is possible. I suspect my problem was related to an issue that caused Microsoft to pause “Microsoft-initiated upgrades” on May 9 2016. Perhaps I clicked the upgrade offer back in May and had forgotten about it.

As far as I was concerned, Office 2013 had not in fact been upgraded. I use Office applications by clicking shortcuts on the taskbar, and these were still for Office 2013. I had not seen any notification of an upgrade completing.

When I got the error though, I looked a little more deeply and found that I had both Office 2013 and Office 2016 (the latter described as Microsoft Office 365 Pro Plus) installed. Control Panel – Programs and Features also showed that both were installed on 16th June 2016, two days after “Microsoft-initiated upgrades resumed for computers that had downloaded the Office 2016 upgrade files prior to May 9 2016.”

The fix was simple. Remove Office 2013. This removed my taskbar shortcuts, but I could then reinstate them with the 2016 versions and everything worked.

Just a small issue perhaps; but certain aspects of this are disappointing.

One is the incorrect error message. I know raising the right error message is challenging, but it is important.

Second, I doubt the automatic upgrade is meant to leave both versions in place. Why cannot Microsoft figure out how to remove the old version, install the new one, and even preserve my taskbar shortcuts with their equivalent upgraded versions?

Microsoft and LinkedIn: some early thoughts

Microsoft has announced its most expensive acquisition yet, taking over LinkedIn for $26.2 billion. The transaction is expected to close later in 2016.

Why? It’s about combining data from Office 365 with LinkedIn’s data on who works where. According to Microsoft, it’s “the word’s first economic graph, a digital mapping of the global economy,” said Microsoft CEO Satya Nadella. “If you connect these two graphs, that’s where the magic starts to happen.”

image

LinkedIn is not just a social network with a business flavour, but also offers online training thanks to its April 2015 acquisition of Lynda.com.

“A professional’s profile will be unified,” says the presentation, “and the right data at the right time will surface in an app, whether Outlook, Skype, Office or elsewhere.”

There is obvious synergy with Dynamics CRM for customer relationship building and “social selling” – which, at its best, is the ability to be there at the right time with the right offer for your product or service, having nurtured a relationship over a long period.

There is even an offer to “empower developers in new ways with rich APIs and new training opportunities.”

Will it work?

Microsoft is not good at acquisitions. That is in part because of its own internal politics, leading to tragedies like the takeover of Danger in 2008, a strong company with a strategic product that was so mismanaged following the takeover that it lead to the Kin disaster. Then there was Nokia, a perfect fit for Steve Ballmer’s strategy of “win at all costs” with Windows Phone, and a perfect misfit for Nadella’s “cloud plus any device” approach, leading to the dismantling of the acquired assets and most of the employees with huge destruction of value.

What about Yammer, acquired for $1.2 billion in 2012, to “accelerate Yammer’s adoption alongside complementary offerings from Microsoft SharePoint, Office 365, Microsoft Dynamics and Skype?” It is near-invisible today. Or Skype, $8.5 billion in May 2011? Skype still has lots of users, but Microsoft has failed on the technology side, fiddling with numerous different Windows and mobile clients and designs, making users unhappy, with poor connections, and absorbing Messenger to no benefit. Lync, Microsoft’s enterprise instant messaging system, has been renamed Skype for Business but still uses different technology.

Still, let’s presume the acquisition works and that LinkedIn continues to grow. Will it make sense for Microsoft? Will it make sense for Microsoft (and LinkedIn’s) customers?

Who are LinkedIn’s customers? In the first quarter of 2016, the quarterly revenue figures looked like this:

Talent solutions (recruitment): $558 million

Marketing solutions (advertising): $154 million

Premium subscriptions (users who pay): $149 million. Of LinkedIn’s 433 million members, just 2 million pay for subscriptions.

Why would you pay for a LinkedIn subscription? I’m speculating, but I’d guess that a paid subscription is excellent value for recruiters and fair value for job seekers, but little value for others. That means the recruitment aspect is if anything understated by the amount in Talent Solutions.

Those other 431 LinkedIn members are not customers. They are users whose presence forms the value of the service to the recruiters.

Microsoft could in principle find other ways to get value out of those users, by making them customers for its productivity offerings. I doubt that that this is the primary intent though. The intent is more about “the magic” of all that lovely data combined with Azure’s powerful analytics capabilities. Somehow that is meant to yield value in unexpected ways.

Google has enormous success with this approach. It services users highly value, such as search, Google Apps, YouTube, Maps, the Android operating system. Then it exploits the presence of those users to offer them contextual advertising. It becomes the portal to your life taking a little cut every time you spend money.

How does this work in a business context? This is not clear to me. What is the synergy between Office 365, which is essentially internal IT services outsourced to a public cloud, and LinkedIn, which is essentially about contact building to find work or sell services? I would say, not all that much. Yes, LinkedIn can be integrated into Office 365 such that it is easier to find freelance help for a need that arises, for example. Making it easier to leave your company by finding another job though is not likely to go down well with Office 365 customers.

Can Microsoft make LinkedIn an essential business destination, like YouTube for video or Google for search, to enable the kinds of contextual opportunities that drive Alphabet’s business? Anything could happen, but it is miles away from that at the moment. Is it the best source for business news? No. Is it the best way to keep in touch with colleagues? No, that’s your internal IT system (could be Office 365), or maybe Facebook or Twitter for social contact. Is it the best way to keep in touch with friends? No, that’s Facebook. And so on.

If you are talking Dynamics CRM, then there you can absolutely see the synergy, but that is not big enough to justify the $26 billion cost.

One of the issues is that LinkedIn is not loved. There is constant bombardment with contact requests which are just a chore. There are emails like this:

image

which mean little to me because honestly it is not a network I value – being mostly composed of people who have asked to “link in” with me in the hope that I may be useful to them by writing about their stuff. Others tell me they get constant invitations to apply for jobs; IT recruiters can be an aggressive bunch and no doubt it is the same in other professions where there is skills shortage.

In other words, getting from here to a point where LinkedIn is woven into our business lives in a mutually beneficial way looks like a difficult journey.

This might explain the lame illustration of how great life will be after the acquisition.

image

I have a meeting and Cortana is going to give me all kinds of information about the person I am meeting, social as well as professional. This is great for a salesperson going in to make a pitch. It might not be so great for the recipient of that pitch who may want to keep the meeting brief. It raises tricky questions about the overlap between personal and business data.

I recall the Outlook Connector, an add-on to Outlook that surfaced a panel of information about a person drawn mainly from Facebook. I found it intriguing but sometimes uncomfortable, that when someone emailed me for some business reason I would news of their recent holiday or some such.

Privacy and trust

One reason for choosing Microsoft over Google for cloud email and document services is that whereas Microsoft’s main business is in providing IT services, with Google you are always aware that its main business is advertising and that it wants to mine your data. Now that Microsoft wants to create “the world’s first economic graph” that distinction is less sharp. Microsoft wants to mine your data as well, in other words, and possibly not to your advantage. Now we will have to be alert, on Office 365, for checkboxes that say “Share this on my LinkedIn Profile” or “Notify my LinkedIn contacts” or some such.

I was disappointed not to hear more on the privacy and trust issues in the webcast following the announcement. It was left to a question at the end on maintaining the distinction between public and private data. “Nothing gets connected without customers opting in,” said Nadella. I would like to have heard that first. I would also like to be reassured that Nadella means “opting in” rather than “failing to opt out”, which is more the norm in this area.

The new Microsoft

What is the new Microsoft? The LinkedIn deal seems to be significant in several ways. It shows how the company is further tilting towards business rather than consumer customers. And it is not technology. Microsoft is buying data and an internet destination, not technical innovation. To me, Microsoft is at its best when it simplifies and democratizes technology – yes, it can do this, and I’d instance things like Excel, the original Visual Basic, Access, and more recently, things like HoloLens and Windows Phone (the best phone UI). You can even see this in Office 365; it has its complexities but compare it to setting up multiple servers with Active Directory, Exchange and SharePoint and you will get the point.

Right now I am not seeing the magic.

How to run Android Studio on Windows without disabling Hyper-V

Update: This post is out of date; you may still be able to get it to work but there are stability issues with the emulator. Microsoft has announced a better solution, if you are on the latest Windows 10 April 2018 Update or later, and you can now use the official Android emulator with Hyper-V. See also my more recent post here.

Original post:

If you run Windows and use the Hyper-V hypervisor, which is used by Visual Studio as well as being handy for testing stuff in virtual machines, then you will encounter an annoyance if you go on to install Android Studio, Google’s official IDE for Android.

The problem is that Google’s Android emulator uses Intel’s HAXM (Hardware Accelerated Execution Manager) which uses the same CPU virtualization extensions as Hyper-V. This means it is incompatible. It is not only that you can’t run Hyper-V and HAXM simultaneously; the PC has to be configured at boot to use one or the other.

The solution (if you do not want to disable Hyper-V) is to use Microsoft’s Android emulator, which is a free download here.

image

In order to use this with Android Studio, you need to run the emulator first. Then, in Android Studio, go to Run – Edit Configurations and select Show Device Chooser Dialog under Deployment Target Options.

image

Now run your project, and select the VS Emulator, ignoring the invitation to “Turn off Hyper-V”:

image

Now you can debug your application in the Visual Studio Emulator – which is pretty good.

image

Microsoft SQL Server is coming to Linux. What are the implications for Windows Server?

Microsoft is porting SQL Server, its popular database manager, to Linux. According to Executive VP Scott Guthrie:

Today I’m excited to announce our plans to bring SQL Server to Linux as well. This will enable SQL Server to deliver a consistent data platform across Windows Server and Linux, as well as on-premises and cloud. We are bringing the core relational database capabilities to preview today, and are targeting availability in mid-2017.

Why do this? The short answer is that like any other software company, Microsoft wants to sell more licenses, and porting its premier (and excellent) database manager to Linux extends its market and helps it compete more directly with the likes of Oracle and even MySQL.

image

However that begs a second question, which is why has Microsoft not done this before? After all, SQL Server has been around forever. The first release was in 1989, jointly with Ashton Tate and Sybase, and was for OS/2. The first Windows release was 1993. There was a significant leap forward in SQL Server 7.0, in 1998, which I think of as the beginning of the product as we know it today.

Microsoft in the nineties and in the first decade of the new millennium was all about Windows. Dominant on the desktop, the idea was to build synergies between Windows desktop and Windows server so that running server applications like Active Directory, Exchange and SQL Server was the obvious choice. The Visual Studio development environment pushed developers towards Visual Studio in subtle and not-so-subtle ways. Some programming language innovations like LINQ to SQL (a form of Language Integrated Query) only worked with SQL Server. It was not quite lock-in, it was always possible to use a different database engine, but SQL Server was always the default, used in all the examples and documentation, and the best understood when you needed support.

Today Microsoft’s circle of dominance is breaking down. Windows still has desktop dominance, but the importance of the desktop is less, thanks to mobile devices which mostly do not run Windows, and a move away from desktop applications towards web applications that do not care which operating system you use. Active Directory is still important, but cloud computing giants like Google and Amazon are encroaching on that space.

“Only on Windows Server” has become a liability rather than the key to keeping customers locked to Microsoft’s platform.

You can see this in the company’s development strategy, which is migrating towards a cross-platform implementation of .NET as well as embracing iOS and Android via the recently announced Xamarin acquisition. You can also see it in the Azure cloud platform, and Microsoft’s partnership with Red Hat for Linux on Azure. The company is happy to take your money whatever operating system you choose.

It is early days though, and Microsoft is still a Windows-centric company. SQL Server on Linux, expected sometime next year, will probably not be feature-complete compared to SQL Server on Windows – I am guessing, but things like .NET Stored Procedures may be tricky to get right, as well as features like in-memory databases that are tightly integrated with the operating system.

It is worth noting that cross-platform is actually a burden as well as a strength and may involve compromises. It will be fascinating to see how performance compares on equivalent hardware.

Microsoft is now betting than opening up new markets for SQL Server is more important than keeping customers hooked on Windows Server – especially as that last strategy is failing in the cloud computing era.

Finally, there is the question I posed in the title of this post. How does moving key server applications to Linux impact the appeal of Windows Server? After all, Linux licenses are generally cheaper than Windows Server and in some cases free. The answer is that it is one less reason to buy Windows Server, presuming SQL Server works properly on Linux.

You can see this as a process of commoditizing the operating system so that in time expensive server operating system licenses are a thing of the past. This is probably not a good trend for Microsoft. It can still prosper though if you rent your virtual infrastructure from the company and use its cloud services, like Azure and Office 365.

Another way of looking at this is that there is more pressure on Windows Server architect Jeffrey Snover and his team to make Windows Server better than Linux, so that you want to run it because of its merits, not because it is the only way to run SQL Server or Exchange.

Outlook 2016 attachment mysteries and annoyances

Microsoft Outlook 2016 has a new feature which the company highlighted when it first appeared, which is that it sends attachments as links by default, if they are stored in network-accessible locations. The idea is to prevent proliferation of different versions if several respondents make changes and email them back. It also means that everyone has the latest version. Good stuff, right?

I am not sure. Of course Outlook is meant to give you the choice about whether to send as a link or as a copy, but we all know that busy people just click and expect it to work; they mostly will not think through which method is appropriate in a particular case, or in some cases, even understand the difference. One of the implications of sending links is that the document received may not be what is sent. For example, consider this scenario:

1. Hmm, shall I send the minutes of our last meeting to this person at supplier X? Better check there is nothing sensitive in it. [Checks]. OK, send.

2. Colleague happens to look at minutes, thinks, why did we not minute our difficulties with supplier X? Adds section of sensitive information and proposal to switch to supplier Y.

3. Person at supplier X receives document …

OK, my scenario is somewhat contrived, but you can see the underlying issue.

There is also the question of whether the mechanism behind this feature is really robust. It is not in fact a simple feature. What is meant to happen is that Outlook detects whether your document can be sent as a link, and if it can, interacts with SharePoint to create a magic link with either view or edit permissions. In my experience, it is easy to end up sending an attachment that cannot in fact be accessed by the person at the other end.

I have an internal SharePoint and soon figured out that I had to prevent Outlook from sending documents as links. The URL I use for SharePoint internally is not accessible externally, which is perhaps a flaw in my setup, but not one that has ever caused problems before. In any case, I would prefer not to give out any magic links to documents in my SharePoint; it just seems an unnecessary security risk.

In the case of Office 365, note that external sharing may be switched off, in which case links will not work. External sharing may also be disabled for specific sites.

image

Maybe Outlook 2016 is smart enough to detect whether or not external sharing is enabled, but if so, this does seem to go wrong sometimes. I have seen cases where users send an attachment link, but the recipient cannot access the document. Rather, they click the link and get a “can’t be found in directory” error or similar.

image

Another issue is that Outlook 2016 does not always offer you the choice of link or attachment. Here is how it is meant to work. What happens sometimes though is that the attachment does not end up in the “attached” header at the top of the email, but rather in the body. In this scenario, you actually end up with a small Word table (Outlook messages use the Word editor) that cannot be converted into a standard attachment:

image

Note the little icon, an embedded image, which includes a cloud to give you a clue that this is not really attached. It also seems to mess up text formatting; note that my typing is now Times New Roman rather than Calibri. Another Outlook mystery.

This problem only seems to happen if you select a file from Outlook 2016’s recently accessed document list, which appears when you click the new Attach File button:

image

So how do you prevent this behaviour? Given the difficulties it can cause, I thought Outlook might have an option to disable sending attachments as links, or at least to prevent it happening by default. I have not found such an option yet. One point to bear in mind is that in previous versions of Outlook it was not easy to send a document from SharePoint at all, unless you could access it from Windows Explorer. This means using WebDAV (“Open in Explorer”), or the still-problematic OneDrive for Business client. So the dropdown with recently accessed SharePoint and OneDrive documents is new and potentially welcome functionality.

Here are a couple of workarounds though. If you format an email as plain text, which you can set as default if you choose, then you will not get the embedded link that cannot be changed. Instead, you will get the dialog with options to link or attach a copy:

image

What if you want Outlook 2016 to behave like Outlook 2013 and earlier? Well, the Attach File with the dropdown is not customizable directly, but you can add an old-style Attach File button. To do this, start a new email, right-click the toolbar, and click Customize the Ribbon. Right-lick the New Mail Message section on the right, and choose Add new group. Then select the Attach File command on the left, and the new group on the right, and click Add. I have called my new group Custom:

image

The effect is that you now have two Attach File commands, one of which behaves just like Outlook 2013:

image

My custom Attach File is on the right in the image above, does not have a drop-down list, and simply selects a file using an insert file dialog.

I appreciate that these are workarounds and not complete solutions.

Did Microsoft really think through this feature? Why the bugs? Why no easy way to disable it? I wish I knew.

Microsoft Office 365 and desktop friction

Microsoft would like us to think of Office 365, its hosted email and collaboration service, as “cloud”. And it is in many ways; you can even get all your email and Onedrive-stored documents direct from a web browser.

The truth though is that Microsoft has been careful not to disrupt its desktop Office software too much. Most users, in my experience, choose Office 365 in part because of its integration with Outlook, Word and Excel. You can install the software from the Office 365 portal, and open and save documents from Onedrive for Business.

Another part of the service is online chat and conferencing, for which you need the Skype for Business (formerly Lync) client on your PC.

There is an issue here though. Part of the attraction of “cloud” is that you do not have to manage software; but in the case of Office 365 you do have to manage the software that is installed on your PC. Microsoft’s investment in click-to-run installation has helped to simplify the setup, but under the covers it is as complex as ever.

Take the case of a small business I know, which was on the Office Midsize Business plan. Microsoft has retired this plan, so when it came to renewal time the customer had to change to a different plan. If they wanted to keep *all* the features of Midsize Business, including the Access database app, they could migrate to the Enterprise E3 plan – at £14.70 per month, nearly double the £7.80 per user/month for Midsized Business. On the other hand, they could migrate to the Business Premium plan for the same cost and, well, *nearly* the same features. The horrible details are here.

They didn’t use Access so Business Premium seemed OK. On the cloud side, the migration was straightforward. However, since Access was no longer included they had to remove and reinstall Office, as well as the Skype for Business client.

In this particular small business, most of the users needed some assistance with this operation. Unfortunately there is no single button to click that will remove the old Office and install the new one. You have to remove Office using Control Panel, then reinstall it from the Office 365 portal. Removing Office removes the old Skype for Business client, but putting it back means choosing a separate installation option in the portal, which most of them missed. One user somehow ended up with two versions of Office 2016 installed, neither of which worked properly. Office would not activate, reported an error, and offered to repair itself. This was not going to work, since it was the wrong version of Office.

Even when it goes smoothly, the business of removing Office and reinstalling both the desktop software and Skype for Business takes a long time, over an hour.

Overall, life in the Office 365 era is easier than it was in the days of 27 Office floppies, one or two of which were bound to be unreadable. Nevertheless, it is friction, and not fulfilling the seamless promise of cloud.

Microsoft’s story continues: Windows down, cloud up in financials Oct-Dec 2015

Microsoft has reported its latest financial results, for the quarter ending December 31st 2015.

Here are the latest figures (see end of post for what is in the segments):

Quarter ending  December 31st 2015 vs quarter ending December 31st 2014, $millions

Segment Revenue Change Operating income Change
Productivity and Business Processes 6690 -132 6460 -528
Intelligent Cloud 6343 +302 4977 +272
More Personal Computing 12660 -622 3542 +528
Corporate and Other -1897 -2222 -1897 -1980

A few points to note.

Revenue is down: Revenue overall was $million 23.8, $million 2.67 down on the same quarter in 2014. This is because cloud revenue has increased by less than personal computing has declined. The segments are rather opaque. We have to look at Microsoft’s comments on its results to get a better picture of how the company’s business is changing.

Windows: Revenue down 5% “due primarily to lower phone and Windows revenue and negative impact from foreign currency”.

Windows 10: Not much said about this specifically, except that search revenue grew 21% overall, and “nearly 30% of search revenue in the month of December was driven by Windows 10 devices.” That enforced Cortana/Bing search integration is beginning to pay off.

Surface: Revenue up 29%, but not enough to offset a 49% decline in phone revenue.

Azure: Azure revenue grew 140%, compute usage doubled year on year, Azure SQL database usage increased by 5 times year on year.

Office 365: 59% growth in commercial seats.

Server products: Revenue is up 5% after allowing for currency movements.

Xbox: Xbox Live revenue is growing (up 30% year on year) but hardware revenue declined, by how much is undisclosed. Microsoft attributes this to “lower volumes of Xbox 360” which is lame considering that the shiny Xbox One is also available.

Further observations

This is a continuing story of cloud growth and consumer decline, with Microsoft’s traditional business market somewhere in between. The slow, or not so slow, death of Windows Phone is sad to see; Microsoft’s dismal handling of its Nokia acquisition is among its biggest mis-steps and hugely costly.

CEO Satya Nadella came from the server side of the business and seems to be shaping the company in that direction, if he had any choice.

Azure and Office 365 are its big success stories. Nadella said in the earnings call that “the enterprise cloud opportunity is massive, larger than any market we’ve ever participated in.”

A reminder of Microsoft’s segments:

Productivity and Business Processes: Office, both commercial and consumer, including retail sales, volume licenses, Office 365, Exchange, SharePoint, Skype for Business, Skype consumer, OneDrive, Outlook.com. Microsoft Dynamics including Dynamics CRM, Dynamics ERP, both online and on-premises sales.

Intelligent Cloud: Server products not mentioned above, including Windows server, SQL Server, Visual Studio, System Center, as well as Microsoft Azure.

More Personal Computing: What a daft name, more than what? Still, this includes Windows in all its non-server forms, Windows Phone both hardware and licenses, Surface hardware, gaming including Xbox, Xbox Live, and search advertising.

Adapting a native code DLL to be called from a Store or Universal Windows app

I am writing a Bridge game in C# – yes, I have been doing this for some time, it does run now but it is not ready for public unveiling.

It is good fun though and a learning experience, as I am writing it as a Windows 8 Store app. This means it can also be a Universal Windows Platform app but I have kept it compatible with Window 8.1 as I don’t want to lose that large market of Windows 8 users who have not upgraded to 10. Hmm.

Bridge is a card game in which a pack of 52 cards is dealt into 4 hands of 13 cards. Each hand is played as a sequence of 13 4-card “tricks”, and each trick is won one of two opposing pairs of players according to the cards played. Each pair of course tries to win as many tricks as possible, so one of the points of interests is how many tricks can be won if you play perfectly (ie with full knowledge of all four hands). Another point of interest is how each card played affects the potential number of tricks you can win with best play. For example, leading a King might cost you a trick (or more) if your opponents hold both the Ace and the Queen of that suit.

This is called “double dummy” analysis and smart people have written algorithms to calculate the answers. A double dummy analysis is useful in a bridge game for two reasons. One is that users may like to know, after playing a hand, what their best score could have been, or even to analyse the hand and see how if they played this card rather than that card at trick such-and-such the outcome would have varied. The other is that you can use it to assist the software in finding the best play. Of course it is important that the software plays fair by not using knowledge of all four hands beyond what would be known by human players; but it is legitimate to try out various possible hands that match what is currently known and use double dummy analysis on these hands.

One such smart person is Bo Haglund who wrote a C++ Windows library for double dummy analysis, called Double Dummy Solver (DDS) and released it as open source under the Apache 2 license. It works very well and is widely used in the Bridge software community, and has now been ported to Mac and Linux; you can find the latest code on Github.

Modifying a native code DLL to use with a Store app

I wanted to use the library in my own Bridge game but faced a compatibility problem. Windows Store apps can only call into DLLs that meet certain requirements, such as using only a subset of the Windows API, and DDS did not meet those requirements. My choice was either to port the DLL to C#, or to modify the code so that it would work as a Windows Runtime native DLL.

I have no doubt that the code could be ported to C# but it looks like rather a long job that would result in a library with slower performance (please feel free to prove me wrong). I thought it would be more realistic to modify the code, so I created a new Windows 8.1 DLL project in Visual Studio 2013 (I am now using Visual Studio 2015 but it is the same for this) and set about modifying the code so that it would compile.

In no particular order, here are some notes on what I learned.

I was able to get the DLL to compile after disabling the multi-threading support (more on this later), and commenting out some functions that I don’t yet need.

Another issue I hit was that Visual C++ by default performs “Security Development Lifecycle” checks (compile with /sdl). This means that that common functions like strcpy, strcat, sprintf and others will not compile. You have to use “secure” versions of those functions, strcpy_s, strcat_s, sprintf_s and so on. These are specific to Microsoft’s libraries though. Of course you can just not compile with /sdl, or define _CRT_SECURE_NO_WARNINGS, but I chose to fix all of these. Now the library compiled.

But did it work? No. I had introduced a stupid bug which took me a while to fix. Did it then work? Yes, but it took me some time to get it working from C#.

Next, I kept getting DLLNotFound exceptions. OK, so you have to add the DLL as content in your C# project, and make sure it is set to copy to your output. I still got DLLNotFound exceptions. It turns out that you get this exception even when the DLL is present, if there is a dependency in the DLL which is not found. What dependency was not found? I downloaded the Sysinternals Process Monitor utility and set the filter to monitor my C# game. I excluded SUCCESS results. Then I tried to load the DLL. This told me that it was looking for the file msvcr120_app.dll (the Windows Runtime version of the Visual C++ runtime library). My first thought was to add runtime libraries from the appx deployment packages, in:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0

image

Then I discovered that all you need to do is to add a reference to the Visual C++ runtime packages, much easier. That fixed DLLNotFound.

Next, I had some problems calling the 64-bit DLL with Platform Invoke (PInvoke) from C#. I found it easier to compile both my C# app and the DLL itself as 32-bit code. I may go back to the 64-bit option later.

Concurrency issues

Now I had everything working; except that my DDS port was far inferior to the standard one because it was single-threaded. The original used QueueUserWorkItem which is not available in a Windows Runtime DLL. I searched for what to do, and came across this MSDN article which recommends using RunAsync, WorkItemHandler and IAsyncAction. However my DLL was not currently compiled using /ZW for “Consume Windows Runtime Extension”. I could add that of course; but then my DLL would have a dependency on the Windows Runtime and if I wanted to use the code for, say, Windows 7, it would not work. or not without yet more #ifdef blocks. No big deal perhaps; but my preference was to avoid this dependency.

There may be other solutions, but the one that I found was to use the Concurrency Runtime. Previously, QueueUserWorkItem was called in a for loop. I simply modified this to use a parallel_for loop instead, using the example here for guidance. I also added:

#include <ppltasks.h>

using namespace concurrency;

to the top of the code. It works well, speeding performance by about three times on my quad-core desktop. Of course I was greatly helped by the fact that the code was already written with concurrency in mind.

image

The effect is spoiled by the time it takes to load the DLL but fortunately you can get DDS to solve multiple boards in one call though I have yet to experiment with this.

Microsoft financials July-Sept 2015: decline of Windows hits home, cloud rises

Microsoft has reported its financials for its first quarter. Making sense of these is harder than usual because the company has changed its segment breakdown (and the names are misleading). The new segments are as follows:

Productivity and Business Processes: Office, both commercial and consumer, including retail sales, volume licenses, Office 365, Exchange, SharePoint, Skype for Business, Skype consumer, OneDrive, Outlook.com. Microsoft Dynamics including Dynamics CRM, Dynamics ERP, both online and on-premises sales.

Intelligent Cloud: Server products not mentioned above, including Windows server, SQL Server, Visual Studio, System Center, as well as Microsoft Azure.

More Personal Computing: What a daft name, more than what? Still, this includes Windows in all its non-server forms, Windows Phone both hardware and licenses, Surface hardware, gaming including Xbox, Xbox Live, and search advertising.

Here are the latest figures:

Quarter ending  Sept 30th 2015 vs quarter ending Sept 30th 2014, $millions

Segment Revenue Change Operating income Change
Productivity and Business Processes 6306 -184 3105 -233
Intelligent Cloud 5892 +417 2400 +294
More Personal Computing 9381 -1855 1562 -57
Corporate and Other -1200 -1200 -1274 -55

A few points to note.

Death of Windows Phone: Microsoft acquired Nokia’s Devices and Services business in April 2014. In fiscal year 2015, according to Microsoft’s 10-Q report, the company “eliminated approximately 19,000 positions in fiscal year 2015, including approximately 13,000 professional and factory positions related to the Nokia Devices and Services business.” This was rationalisation following the acquisition; the real blow came a year later. “In June 2015, management approved a plan to restructure our phone business to better focus and align resources (the “Phone Hardware Restructuring Plan”), under which we will eliminate up to 7,800 positions in fiscal year 2016.”

Windows Phone is not quite dead, but Microsoft seems to have given up on the idea of competing with Android and iOS in the mainstream. Year on year, phone revenue is down 58%, Lumia units down from 9.3 million to 5.8 million, non-Lumia phones down from 42.9 million to 25.5 million. This is what happens when you tell the world you are giving up.

Windows: Revenue down 7% “driven by declines in the business and consumer PC markets”.

Surface: Revenue down by 26% because Surface Pro 3 launched in June 2014; this should pick up following the launch of new Surface hardware recently.

Cloud: Microsoft’s “Commercial cloud” comprises Office 365 Commercial, Azure and Dynamics CRM online. All are booming. Azure revenue and usage more than doubled year on year, with 121% revenue growth. In addition, Office 365 consumer subscribers increased by 3 million in the quarter, to 18.2 million, an increase of nearly 20%.

Server products: Revenue is up 6% thanks to “higher revenue from premium versions of Microsoft SQL Server, Windows Server, and System Center”

Xbox: Steady, with Live revenue up 17%, Minecraft adding 17% to game revenue, and hardware revenue down 17% because of Xbox 360 declining (and by implication, not being replaced by Xbox One, a worrying trend).

Further observations

Is Microsoft now facing permanent long (but slow) decline in Windows as a client or standalone operating system? It certainly looks that way. The last hope is that Windows 10 in laptop, tablet and hybrid forms wins some users over from Mac computers and iPad/Android tablets. Despite some progress, Microsoft still has work to do before Windows delivers the smooth appliance-like experience of competing tablets, so I do not regard this as likely. The app ecosystem is also a problem. Tablets need Universal Windows Platform (UWP) apps but developers can still target more Windows users with desktop apps, discouraging UWP development.

Microsoft is also busy removing the advantage of Windows by stepping up its first-party Mac, iOS and Android application development, though this makes sense as a way of promoting Office 365.

That leads on to the next question. If Windows continues to decline, can Microsoft still grow with Office 365 and Azure? Of course it is possible, and on these figures that strategy looks to be going reasonably well. That said, you can expect both Google to continue integrating Android and of course Chromebook with its rival cloud services. Apple today does not compete so much in the cloud, but may do in future. If the future Microsoft has to relying on third-party operating systems for user interaction it will be a long-term weakness.