Insights from MS Build

We will share some insights from MS Build in May in Seattle, a few intensive days with interesting sessions.

MS Build 2017

Visual Studio

During the event they showed a live demo of the new interface for unit testing. These tests run live when you code, providing a real time check if your code matches the context you have written the tests for. They also showed a new AI that can generate a code convention from an existing code base. The convention is placed in the editor configuration as usual.

Some side notes were that there is an easy way to define dockers afterwards for your containers. The support for Mac in Visual Studio is a wider, and you can deploy to Azure by a simple right click. Also, they showed that Windows now has a native support for Linux command prompt, and that Ubuntu and Suse for example can be downloaded in Store, and run virtually. This is to create a wider development support for those who not only develop to Windows environments. As a last side note, they showed that they now support the programming language R in the Visual Studio editor.

Perhaps the coolest thing in this session was when they downloaded a debugger snapshot from Azure and loaded the Visual studio debugger with this. It is a great advantage if you need to examine errors in production when it is also possible to check the variables in Visual Studio’s watcher.

Future of C#

Point releases are starting, and 7.2 will be low level code solutions. 7.3 on the other hand will be pattern matching.

In this session, there was not much more news than we already know. This was something we discussed at 3bits’ internal conference in January. The new thing was that they want to add tuples in the standard libraries instead of separately as it is now. The advantage is that it doesn’t require an upgrade of .NET that probably brakes a few dependencies of old code.

Tuples will be able to read variable names from the syntax given, syntactic suger for nameof directly in the tuple declaration. They have also added support in the Visual Studio Intellisense to change between lambda operators different expression bodies, ”=>” & ”{}”.

They talked about upcoming versions and things that they could support in the future. One of these things was mutable structs which didn’t get any applauds. Although tuples are already mutable structs that are able to deconstruct to variables, but are mutable structs originally.

They want to allow async task in main, ”public static task main() { await ...}”. This makes it a lot easier if you just want to start a console program to test some parallel programming. They also showed some auto completion that auto initiated the constructor argument, which is nice if you work a lot with dependency injection. My reaction was: “why isn’t this already available?”.

The next thing that they are working on in a point upgrade to C# 7, probably 7.3, is pattern matching, and also wildcards that will be written with underscore.

In the coming major update, C# 8, they are thinking of allowing interface to implement code. This was not given a lot of support from the audience, but it was saved when they announced that they will make the type checker stricter. This will be handled as in typescript, if you haven’t defined nullable, the compilator will complain if you don’t perform null checks or allow your method to return null without declaring it in the method signature. In this case the risk of null references is a lot less, but it will also mean a breaking change since 99 % of the code allows this unintentionally.

As a last thing, they showed a auto complete on all comparators and hash functions. This is code that you often should implement to provide the right behavior on your object, but you don’t, but now it is easier.

Signal R

The Signal R team will port the technology to the .NET Core libraries. They will also support message queueing, meaning that they can send data there as well.

They have removed the dependency to jQuery which is both good and bad, since jQuery makes it easier, but it makes your code lighter connected which makes the upgrade possibilities better.

.NET routing will be allowed to find your hubs instead of hardcoding these. This is also a part of a bigger idea to better handle scaling. One of the things that has not supported scaling has been message id and the global scope. This has now been redone, and they also allow Graceful shutdown.

They have also removed reconnect message replay which in one way is bad since it is a nice feature, but it also has impact on performance, and therefor you have to implement it yourself now.

Things that they are experimenting with, and showed a demo with is binary data and multi-platform support. In the demo they filmed themselves with an Android phone, and sent the data successfully to a web site where the picture was displayed in real time, and a Linux server where they showed the picture in ascii graphics through the command prompt in real time.

To sum it up, a lot of interesting sessions, and we take a lot of it back with us with the continuous work at 3bits.

Alexander Lundgren