Impressions from Microsoft Build – day 2

This year we are three developers representing Jayway at Microsofts Build conference. This blog-post summarizes just some of the stuff we’ve seen on day two of the conference.

Microsoft Cognitive Services: Give Your Apps A Human Side

An overview of some of the Azure APIs newly released by Microsoft Cognitive Services. They showed an example of the emotion API, which can analyze people’s faces to decide their emotion. Examples given for this API was using it for maybe focus groups to see how people feel about products, but also having avatars that mimic users mood, giving the app they are interacting with a more personal feeling. They also showed the search API, which basically returns all the results of a bing search, but it can also give specific parameters if you give  specific subset. For example going to image search api, you can search for a specific dominant color or style. They also showed off the caption api and the face recognition api, and how to create some interesting mashups. Finally, people from Tele2 and ProDeaf were given time to talk about the translation API and how they used it to translate communications in real time.

All in all this was a very interesting session, but I had expected code to show off HOW some of these interactions worked, and left a bit disappointed. Good to watch for people who want a high level introduction to the cognitive APIs

Azure Service Fabric for Developers

A.k.a. “Introduction to service fabric”. This was a talk about how to use the Service fabric to set up a collection of “microservices”. While it was really impressive that Service Fabric can run practically anywhere (azure, aws, other clouds, on premise..), it felt a bit disappointing that the entire distributed app needs to run in the same visual studio solution, removing some of the agility of microservices. Again this is an interesting talk but not  as much code examples as I would like, but there are some good ideas there, along with some I don’t agree with. Looking forward to where they are taking this.

VM Scale Sets and Open PAAS On Azure: A Deep Dive

Finally Azure is getting proper scale sets – a proper equivalent to the autoscaling groups in AWS. This session went through all the many ways we can set them up. Via resource groups, the portal or the REST API ( shown with  a handy python example ). It also showed the integration of Netflix’ Spinnaker cloud orchestration app with the scale sets, and that is looking really promising. The other half of the talk was about Cloud Foundry and Open PAAS, which I unfortunately am not that knowledgable about, but it seemed real easy to use to provision your vms and bind them to OSS Paas apps.

LUIS: Set Up Your Own Language Model in a Matter of Minutes, and Understand Your Users!

LUIS, as mentioned earlier, is Microsoft’s cloud service for natural language processing, and it’s really impressive. This session is just a short talk, but works really well at highlighting the strengths of the project. Basically you teach the service how to  convert a given sentence into intents (i.e. “book a flight”) and entities (i.e. “destination = london”)

The model learns really fast, and after giving it just a few phrases it is surprisingly good at converting your phrases into actions.

NativeScript and Visual Studio Code: Together at Last!’

So Telerik is also jumping into the “javascript as native”, naming their addition NativeScript. I have to admit it seems solidly built, using a XAML like syntax to invoke the native controls in the different environments (The usual suspects, iOS, Android, and Windows Phone are all supported). Most of the javasc.. – sorry, nativescript – is written in TypeScript, and the developers are very careful to point out just how well this project works with Angular. The Visual Studio Code part is shoehorned in at the end, but doesn’t really add much to the session in general ( but it’s good to see Code’s extension ecosystem growing ). It’s a good time to be a JS developer if you want to make the jump to native.

What’s new in Visual Studio for Universal Windows App Development

This session mostly covered new features coming in Visual Studio “15”. Some of them are in the recently released preview, some are coming later.

But one thing you can take advantage of today already in Visual Studio 2015 is an updated version of the Microsoft.NETCore.UniversalWindowsPlatform NuGet package, now at version 5.1.0. A quality update with stability and correctness fixes.

There was nothing groundbreaking mentioned, but a lot of smaller things that together will make your life as a XAML/UWP developer more pleasant.

Perhaps the biggest new feature is the added support for Edit and Continue (EnC) for XAML. This will let you modify your XAML while debugging and directly see the impact it has on the UI. There will be limitations and not all kinds of changes will be supported in the first release. For example, don’t expect to be able to change visual styles or triggers.

A UWP App Analysis tool is added that will give you insights about the app’s performance and accessibility characteristics at runtime. Here you will get a warning if you for example use {Binding} instead of {x:Bind}, or if you have missed setting AccessibilityProperties.Name on  control that should have it.

VS 15 also gets a new menu option Debug App for Accessibility. This will launch the app along with the Narrator tool in Windows. However, the app’s UI will be all black, so you will be forced to use accessibility tools or your keyboard to navigate it. This is to help you envision what it is like to use your app when you can’t see it.

Another new command, Debug Installed App Package, lets you start a remote debugging session on another device just by selecting which installed package to start.

The caching of the app’s store association has been improved so you don’t need to sign in to the store every time you want to build packages for it.

XAML IntelliSense now lets you skip the namespace prefix when typing an element name.

Notification Futures: Action Center in the Cloud and the Windows Notification Platform

This session covered future changes to the Action Center in Windows.

These changes are opt-in, built on Cortana (which means not immediately useful for us Scandinavians) and available on Windows and Android.

Universal Dismiss is an attempt to fix the problem of having to see the same notification on multiple devices, say your phone and your tablet or PC. If you are signed in with the same Microsoft account on all these devices and dismiss or handle a notification on one of the devices, it will go away on the others as well.

If you receive a notification on a device where the corresponding app has not been installed, there will be a “Get App” button along with the notification. This is said to increase discoverability of universal apps.

Building Great UWP apps for Xbox

As was announced on the Wednesday keynote, all retail Xbox One units upgraded to Windows 10 can be turned into a developer unit. This will of course lower the barrier significantly and make it much more accessible to develop Xbox apps. My guess is that this comes as a response to Apple having opened up Apple TV to a much broader developer audience.

As someone who for the past few months has studied Apple TV and tvOS development, and the similarities and differences to targeting iOS, I can say that the messages in this session was pretty much the same.

When you take a mobile or desktop app and want to make it work on a TV instead, no matter which technology stack, there are a number of things you need to consider:

  • Scaling of the UI. It needs to be readable from meters away, not decimeters.
  • TV overscan. You need to keep all important parts of UI within the “safe” area since the edges can get cropped by the TV.
  • Focus and navigation.
  • Game controller, remote control or keyboard input support.
  • Color space differences.

Most UWP apps built with responsive layout in mind should just work as is on Xbox, but you need to take steps to make the experience really light up on the big screen.

All apps built for Windows 10 Anniversary update will get new, higher visibility focus rectangles (both on Xbox and other devices). The dotted line from before is being replaced by a thicker solid rectangle.

Apps running on Xbox will get the dark theme by default (unlike PC where the default is light theme). And the effective resolution is 960×540 pixels. The system then scales it up x2 to Full HD 1920×1080, and in doing that makes the UI better suited for a larger screen further away.

You should play system sound effects that the user is used to from the Xbox to acknowledge actions and navigation in the UI.

The future of C#

Great and entertaining last session of the day. It had a bit of a slow start and segwayed into talking about the future of Roslyn, but then the main part covered what we can expect from C# 7 and the C# support in Visual Studio “15”.

Some of the VS changes we already covered yesterday. But one other exciting new feature was enhancements to when you press Ctrl+. on an unresolved type name. VS will now have basic spelling correction so it can understand and fix some if you make some typos when entering a type name. It can also find the type in an unreferenced project in the same solution (and add the reference for you) and even find the type in a NuGet package and reference that for you as a fix.

On the language side, the feature set for C# 7 is not finalized yet, but some of the new features you can expect are:

  • Binary numeric literals (0b10_0100 == 0x24 == 36)
  • Local functions. Lets you define and call a local function definition within another function.
  • Ref return values and ref local variables. Extended use of ref, which was previously only used on in/out parameters. Essentially a safer way of returning and storing a pointer to something without having to make a copy of it or to return an index into an array.
  • Tuple types, such as (int, int). These are value types, not based on System.Tuple class. Both the tuple type definition and instances of the tuple can have named arguments. For examlpe (int a, int b) or (a: 0, b: 1).
  • Pattern matching. A feature inspired by other languages such as Swift. This extends the use of the is operator and the switch statement, among other things. You can write if (someObject is int i) and the code will only run if someObject is in fact an int, and if so i will hold its value. Or if you have multiple possibilities, a switch may be more appropriate. switch (someObject) { case int i: /*…*/ break; case string s: /*…*/ break; } You can also use the when operator, just like in exception filters, to add additional conditions. All of this can be combined to pretty complex patterns.

Enhancing Your Application with Machine Learning Through APIs

Machine Learning and Intelligent Services are noticably one of the big themes for this years //build/, and this session goes in a bit deeper dive on how to use it in practicality. The first part of the session went into how to use the machine learning studio to create a neural network and train it using test data ( suggested using 70/30 split on test and verify), and once your network has been trained, it can actually be exposed as a web service. The second part of the talk then went into detail on how to use the Cortana Intelligence suite to avoid having to create your own neural networks and doing your own machine learning. While the code examples were missing, a few of the APIs were gone through in good detail, and explain what they return and how they work around it. Examples given is using speech analysis to notice if the text is positive, negative or neutral and extract keywords, or using emotion API to see what users are feeling.

Leave a Reply