All posts by onlyconnect

Reflections on QCon London 2016 – part one

I attended QCon in London last week. This is a software development conference focused on large-scale projects and with a tradition oriented towards Agile methodology. It is always one of the best events I get to attend, partly because it is vendor-neutral (it is organised by InfoQ), and partly because of the way it is structured. The schedule is divided into tracks, such as “Back to Java” or “Architecting for failure”, each of which has a track leader, and the track leader gets to choose who speaks on their track. This means you get a more diverse range of speakers than is typical; you also tend to hear from practitioners or academics rather than product managers or evangelists.

image

The 2016 event was well up to standard from my perspective – though bear in mind that with 6 tracks on each day I only got to attend a small fraction of the sessions.

This post is just to mention a few highlights, starting with the opening keynote from Adrian Colyer, who specialised in finding interesting IT-related research papers and writing them up on his blog. He seems to enjoy being contrarian and noted, for example, that you might be doing too much software testing – drawing I guess on this post about the art of testing less without sacrificing quality. The takeaway for me is that it is always worth analysing what you do and trying to avoid the point where the cost exceeds the benefit.

Next up was Gavin Stevenson on “love failure” – I wrote this up on the Reg – there is a perhaps obvious point here that until you break something, you don’t know its limitations.

On Monday evening we got a light-hearted (virtual) look at Babbage’s Analytical Engine (1837) which was never built but was interesting as a mechanical computer, and Ada Lovelace’s attempts to write code for it, thanks to John Graham-Cumming and illustrator Sydney Padua (author of The Thrilling Adventures of Lovelace and Babbage).

image

Tuesday and the BBC’s Stephen Godwin spoke on Microservices powering BBC iPlayer. This was a compelling talk for several reasons. The BBC is hooked on AWS (Amazon Web Services) apparently and stores 21TB daily into S3 (Simple Storage Service). This includes safety copies. iPlayer was rebuilt in 2013, Godwin told us, and the team of 25 developers achieves 34 live deployments per week on average; clearly the DevOps stuff is working here. Godwin advocates genuinely “micro” services. “How big should a microservice be? For us, about 600 Java statements,” he said.

Martin Thompson spoke on the characteristics of a good software engineer, though oddly the statement that has stayed with me is that an ORM (Object-Relational Mapping) “is the wrong abstraction for a database”, something that chimes with me even though I get the value of ORMs like Microsoft’s Entity Framework for rapid development where database performance is non-critical.

Then came another highlight: Google’s Micah Lemonik on Architecting Google Docs. This talk sadly was not recorded; a touch of paranoia from Google? This was fascinating both from a historical perspective – Lemonik was involved in a small company called 2Web technologies which developed an Excel-like engine in 2003-4, and joined Google (which acquired 2Web) in 2005 to work on Google Sheets. The big story here was the how Google Sheets became collaborative, so more than one person could work on a spreadsheet simultaneously. “Google didn’t like it initially,” said Lemonik. “They thought it was too weird.” The team persisted though, thinking about the editing process as “messages being transferred between collaborators” rather than as file updates; and it worked.

You can actually use today’s version in your own projects, with Google’s Realtime API, provided that you are happy to have your stuff on Google Drive.

I particularly enjoyed Lemonik’s question to the audience. Two people are working on a sheet, and one types “6” into a cell. Then the same person overtypes this with “7”. Then the collaborator overtypes the same cell with “8”. Next, the first person presses Ctrl-z for undo. What should be the result?

The audience split neatly into “6”, “7”, and just a few “8” (the rationale for “8” is that undo should only undo your own changes and not touch those made by others).

Google, incidentally, settled on “6”, maintaining a separate undo stack for each user. But there is no right answer.

Lemonik also discussed the problem of consistency when there are large numbers of contributors. A hard problem. “There have to be bounds to the system in order for it to perform well,” he said. “The biggest takeaway for me in building the system is that you just can’t have it all. All of engineering is this trade-off.”

image

I have more to say about QCon so look out for part two shortly.

re-examining Song for bob dylan by david bowie

I’ve always liked this song, which appears on Bowie’s 1972 album Hunky Dory, but never fully understood it. Recently I’ve given it some further thought and music forum discussion. Here are the lyrics:

Hear this Robert Zimmerman
I wrote a song for you
About a strange young man called Dylan
With a voice like sand and glue
His words in truthful vengeance
Could pin us to the floor
Brought a few more people on
Put the fear in a whole lot more

Ah, Here she comes
Here she comes
Here she comes again
The same old painted lady
From the brow of a superbrain
She’ll scratch this world to pieces
As she comes on like a friend
But a couple of songs
From your old scrapbook
Could send her home again

You gave your heart to every bedsit room
At least a picture on my wall
And you sat behind a million pair of eyes
And told them why they saw
Then we lost your train of thought
The paintings are all your own
While troubles are rising
We’d rather be scared
Together than alone

Ah, Here she comes …

Now hear this Robert Zimmerman
Though I don’t suppose we’ll meet
Ask your good friend Dylan
If he’d gaze a while down the old street
Tell him we’ve lost his poems
So they’re writing on the walls
Give us back our unity
Give us back our family
You’re every nation’s refugee
Don’t leave us with their sanity

Ah, Here she comes …

In a full-page advertisement for Hunky Dory at the time, Bowie offered some handwritten notes on the songs, and for this one he wrote “This is how some see B.D.” – perhaps distancing himself a little from the song.

I am a big Dylan fan and for me the song represents a kind of interaction between two heroes, albeit one-sided. The phrase “a voice like sand and glue” seems to me a neat summary of how some hear B.D. and the ability to get past that into the beauty of his songs and performances is a kind of shared secret among Dylan fans.

I also like Bowie’s vocal performance which captures something of Dylan’s nasal, scratchy voice but without descending into full-blown parody.

That said, there have always been things that puzzled me. Who is the “painted lady” and why does she “come on like a friend?” Since this is the chorus, it is emphatic, but I didn’t have a clue what it was about. And why do we not want the “sanity” of “every nation’s refugee” in the last verse?

An aside on critiquing Bowie’s work

As an aside, its worth noting that although Bowie has attracted reams of prose about his work, very little of it examines such puzzles. In general, pop lyrics are not treated very seriously, and if a song does not quite make sense, most of us just shrug if we even think of it at all.

Bowie himself used a cut-up technique for some of his work, in which words are rearranged to make new texts, and you might reasonably conclude that that the resulting output is unlikely to make sense in a conventional manner.

Despite the above, it seems to me that Bowie took great care over his lyrics and I am constantly finding new shades of meaning in his work. He also loved word play, as noted by his friend Brian Eno after Bowie’s death:

“I received an email from him seven days ago. It was as funny as always, and as surreal, looping through word games and allusions and all the usual stuff we did. It ended with this sentence: ‘Thank you for our good times, brian. they will never rot’. And it was signed ‘Dawn’.

"I realise now he was saying goodbye."

I do believe therefore that the lyrics deserve more attention than they usually receive, even though it means digging into Bowie’s interests in the arcane and occult, for example, which can be both demanding and uncomfortable.

Two writers deserve a shout-out here for doing a lot of this spadework. One is Nicholas Pegg, author of a book called the Complete David Bowie (now being revised) which is full of excellent research.

The other is Chris O’Leary, whose song-by-song site Pushing Ahead of the Dame and associated books are also thoughtful and full of insight.

Song for Bob Dylan

Back on point: what is this song about? It is part tribute and part open letter to Dylan, the central thought being that the man who once effortlessly created “words of truthful vengeance” has gone off in a different direction – and we need him back.

Bowie I suspect knew this to be a rather narrow view, hence his note “this is how some see B.D.” allows for other perspectives.

Dylan began his career as a folk singer, with songs of “protest” that spoke out against injustice, racism and war. He went electric in 1965, escaping the “protest singer” box but not without backlash. Then in 1966 he had a motorcycle accident and went into a kind of retreat, emerging in 1967 with gentler-sounding albums like John Wesley Harding and Nashville Skyline, more country than folk or rock. Dylan’s ill-received 1970 album Self Portrait used his own child-like painting of himself on the cover; “your paintings are all your own.”

In 1971 then, when Bowie was writing Hunky Dory, Dylan seemed to have lost all interest in reforming the world as well as settling for a less energetic style of performance, losing it seemed the incandescent power he achieved on albums like Highway 61 Revisited and Blonde on Blonde.

The stage is set for Bowie’s song. The first verse is straightforward, setting the scene; but then we get the painted lady. Who is she?

A “painted lady” is slang for a prostitute; but as Pegg observes, this is also a reference to Athena, the goddess of war (among other things) in Greek mythology. The 5th century BC Greek poet Pindar writes:

"from the cleft summit of her father’s brow Athene sprang aloft, and pealed the broad sky her clarion cry of war"

There are also other references in Greek mythology to Athena being born from the forehead of Zeus and emerging fully-clothed.

Athena, in other words, was born from the brow of Zeus, god of thunder and ruler of the Olympian Gods, the “brow of the superbrain.”

In this context Athena seems to represent mankind’s sad tendency to be seduced (“painted lady”) by war and to “scratch this world to pieces”; Bowie appeals to Dylan to “send her home” by returning to his potent songs of protest.

Bowie is always inclined to the apocalyptic and the idea that “troubles are rising” and the world being “scratched to pieces” is nothing strange to him.

Bowie plays with identity in the last verse, addressing Robert Zimmerman, Dylan’s proper name, and asking him to bring back the Dylan persona. Bowie knew all about personae, “David Bowie” being in some ways a creation of David Robert Jones, his own proper name.

What about the final couplet:

You’re every nation’s refugee
Don’t leave us with their sanity

Dylan may not be a refugee as such, but is on the side of the refugees, that much makes sense. But where does sanity come in?

Bowie’s view of sanity may not tally with our own. His family had a history of madness, his brother was in an asylum, and in his earlier song All the Madmen he explored the idea that society’s division between sane and insane may be arbitrary. “I’d rather stay here, with all the madmen, I’m quite content they’re just as sane as me”.

Sanity then is not necessarily better than insanity; but the couplet is still odd. One suggestion I’ve heard is that “their” could refer to the nations, not the refugees.

I’ve found three performances of Song for Bob Dylan, one on Hunky Dory, one a rehearsal for a John Peel session where it is sung by Bowie’s friend George Underwood, and one from a 1972 live performance. In all three cases the word “their” is not clearly articulated. It could be “our sanity” or even “insanity”. Printed lyrics are not always correct. If it is “our sanity” it might mean, don’t leave us with the sanity that drives us to war.

Final thoughts

Song for Bob Dylan is a good song but not wholly satisfactory. Dylan stopped being a protest singer way back in 1964 or thereabouts and there is an uncomfortable sense that Bowie is inviting another artist to regress; perhaps this is what made him hesitant about the song in his notes.

I still like the song though. I can’t think of any better songs about Bob Dylan.

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.

New Delphi and C++ Builder Roadmap promises Linux server support

Embarcadero has published a new roadmap explaining what to expect in forthcoming editions of its RAD Studio suite, including Delphi and C++ Builder.

The company has been acquired by IDERA though the Embarcadero brand is to continue under the new ownership.

The roadmap covers two “development tracks”, though it is not completely clear what that means. One is described as the “Spring development track” which suggests a release in April, 12 months after RAD Studio XE8. However, the post adds that “The team is working the following features that will be included in 2016 releases,” raising the possibility that some features in this track may come later, perhaps in the scheduled summer update.

The Spring track, to be called “Berlin”, seems to be mainly a tidying-up exercise in any case, with features including Bluetooth LE support for Windows 10, DirectX 12 support, native support for Utf8String on all platforms (you mean it does not have this already?) and enhancements to the FireMonkey cross-platform framework.

“Spring” also offers C++ CLANG 3.3 on all platforms.

The second development track “will deliver a Fall release”, to be known as “Tokyo”, following the pattern of recent years where RAD Studio has two major updates every year. The Fall track is more interesting, and includes support for Delphi and C++ Builder on Linux Server, as well as “Linux platform support for console apps with IoT support.” I guess non-GUI Linux is the common thread here.

The IDE will remain on Windows, with cross-compilation for Linux. Initially supported distributions are Ubuntu Server and RedHat Enterprise, though further distributions will be added “as demand dictates”.

It is good to see Linux support back in Delphi. I remember Borland Kylix (2001-2003) well, but this was back in the days when desktop Linux looked like more of a thing.

The feature-list for Tokyo also includes Windows Centennial support. This is potentially big news. Centennial is a Microsoft project to deliver Windows desktop applications through the Windows Store, using application virtualisation based on the existing App-V technology to remove dependency issues. You can expect to hear more about Centennial at Microsoft’s Build conference at the end of March; it was covered at last year’s Build but we have not heard much more about it since.

image

Embarcadero is also promising a new installer for RAD Studio, based on its GetIt technology, which will reduce installation time and give more flexibility in selecting features. This would be welcome; I never look forward to installing RAD Studio as it tends to be a time-consuming process. It would also be good if it messed less with system environmental variables, though I do not know if this is on the cards. The new installer will comes in two phases, phase 1 in Berlin and phase 2 in Tokyo.

My own view is that two major releases a year is one too many, so I would prefer if Embarcadero scrapped Berlin and went straight to Tokyo.

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.

David Bowie, star man

In January 1972 I started at a new school. I had enjoyed pop music on the radio but it was here that I gradually became aware of things called albums, records with other-worldly sleeves and amazing propulsive music. I wanted them.

It look a while to get a record player of my own so I started with cassettes – taping everything I could find.

In April 1972 a single was released, Starman by David Bowie. It was catchy, it was extraterrestial, it was about listening to the radio at night (just like I used to do), it was about letting the children boogie, I loved it.

Moving on to the Ziggy Stardust album, Bowie became special to me. Looking back I am sure it was because I felt a bit of a misfit and Bowie’s music and image was about acceptance and celebration of oddness, as well as exploring sexuality in ways that were appealing and mysterious to innocent young things like myself.

I kept the faith through Bowie’s ch-ch-changes, Ziggy Stardust’s retirement, the fractured world of Diamond Dogs, the strangely downbeat David Live, the funk of Young Americans, train noises and Earl Slick’s frantic guitar on Station to Station, sombre electronica on Low, and then the unforgettable “Heroes”, love in the shadow of the Berlin wall.

Bowie had his difficult middle period for sure, but was always interesting. He was an actor as much as a musician and one of the acts he performed was himself; with Bowie the difference blurs.

His work shows a deep interest in what it means to be human; he’s content that the madmen “are just as sane as me” (with all the ambiguity that implies), his writing on outer space is also about inner space because if you imagine yourself “out there” you have nothing but yourself for company.

Bowie had huge artistic courage. I much regret not seeing his 1995 “Outside” tour when apparently some audience members walked out because he focused on his dark new material and not greatest hits.

That said, I was fortunate to see Bowie in concert on several occasions, starting with Earls Court in 1978, and including Milton Keynes Bowl 1983 and (most memorably) Nottingham’s Rock City in August 1997.

image
Some Bowie memorabilia from my attic

This last was the closest I got to the man, playing in a small 1,500 capacity club venue and standing fairly close to the stage. He performed a long set with many of my favourites, the darker side of Bowie, starting with Quicksand from Hunky Dory “I’m sinking in the quicksand of my thought” and including I’m Afraid of Americans, Fashion, Fame, Under Pressure, White Light White Heat, and much of Outside.

Late period Bowie is more of an acquired taste than his early years but rewarding. I found The Next Day in 2013 moving and when he sang “Where are we now” of course I was transported back to my schooldays and asking the same question of myself.

Bowie was reclusive in his later years, especially after being injured on tour in 2004, and lived quietly in New York.

Today’s news brought the news of his death, “after a courageous 18-month battle with cancer” according to his son Duncan.

This means that he composed his just-released album Blackstar in full knowledge of his illness and perhaps anticipating departure.

The song Lazarus, accompanied by a New York musical of the same name, seems particuarly to the point.

“Look up here, man, I’m in danger
I’ve got nothing left to lose
I’m so high, it makes my brain whirl
Dropped my cell phone down below
Ain’t that just like me?

This way or no way
You know I’ll be free
Just like that bluebird
Now, ain’t that just like me?”

Other lyrics on the album have new significance today, like these from Dollar Days:

“If I’ll never see the English evergreens I’m running to
It’s nothing to meet, it’s nothing to see
I’m trying to
I’m dying too”

Bowie made his ending an artistic moment and one that is not without hope – Lazarus rose again after all – but also, like all his best work, full of ambiguity.

image

Thank you David Bowie.

Twitter: will longer tweets spoil the platform?

Twitter is a strange thing. Founded in 2006, it was initially promoted as a way of communicating with friends about what you are doing right now. It did not appeal to me. Who wants to know all that trivia? Who wants to publish it? Lots of people now on Facebook, apparently. But I digress. I joined Twitter eventually and discovered its two key features, first brevity, and second the ability to choose who you follow and not see tweets from anyone else. It is ideal for broadcasting or consuming news and comment, and that is how I use it. I particularly value it because it is not Google, and provides a way of making things known that is independent of Google’s all-powerful search algorithms.

Now CEO Jack Dorsey has tweeted about the lifting the 140 character limit:

At its core Twitter is public messaging. A simple way to say something, to anyone, that everyone in the world can see instantly.

We didn’t start Twitter with a 140 character restriction. We added that early on to fit into a single SMS message (160 characters).

It’s become a beautiful constraint, and I love it! It inspires creativity and brevity. And a sense of speed. We will never lose that feeling.

We’ve spent a lot of time observing what people are doing on Twitter, and we see them taking screenshots of text and tweeting it.

Instead, what if that text…was actually text? Text that could be searched. Text that could be highlighted. That’s more utility and power.

What makes Twitter, Twitter is its fast, public, live conversational nature. We will always work to strengthen that. For every person around the world, in every language!

And by focusing on conversation and messaging, the majority Of tweets will always be short and sweet and conversational!

We’re not going to be shy about building more utility and power into Twitter for people. As long as it’s consistent with what people want to do, we’re going to explore it.

And as I said at #flight, if we decide to ship what we explore, we’re telling developers well in advance, so they can prepare accordingly.

(Also: I love tweetstorms! Those won’t go away.)

Of course he really tweeted the above as an image:

image

Will this wreck Twitter? What he has in mind, I suspect, is that tweets become expandable, so you can tweet as much as you like but by default only 140 characters, or a heading of your choice, appears in the feed. In fact this often happens already, except that the link is to an external site, rather than to Twitter.

Twitter’s problem has always been how to monetize the service. The original concept was almost useless for this, until Twitter added “promoted tweets”, which you see whether or not you want them. In 2011 Twitter added images, making it a richer platform for advertisers, and providing an easy way to bypass the character limit. Vine videos, other video acquisitions (SnappyTV in 2014, Perisccope in March 2015) mean that more video appears on Twitter. Brevity is still a feature of Twitter, but much undermined, and likely to diminish further.

The removal of the character limit will enable Twitter to host more content itself, rather than being a place where people post links to other sites. This will keep users on Twitter (or in its app) for longer, which means more opportunities to advertise.

If these steps make Twitter worse for users like myself though, we might use the site less, which is not good for advertising income.

At this point I am resigned to Twitter getting worse, as it has done for the last few years. Nevertheless, I will carry on using it until something else appears which is better. I see little sign of that, so Twitter still has me for the moment.

I also see that Twitter has to be viable in order to thrive. Making customers fee-paying does not work, so advertising has to be the solution.

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.